Here is the repo https://github.com/extrablind/monithomebundle
Posts made by extrablind
Symfony Bundle as Controller for MySensors + Vuejs + Websocket
I plan to release an (bugged) alpha version of my own controller (MonitHomeBundle), soon, soon...
I will need some coders to help me with this big challenge.
So this message is to know if people could be interested in testing and contribute to the code; but first to know if you people could be interesting in another controller and specially one builded with php/symfony on top of websockets.
It could also be interesting to know what kind of features you need !
Lets see the presentation below :
Why another controller ?
- No symfony bundle can be found to use with mysensors
- Using php is a challenge for hardware communication (but it works)
- For fun and learn
What is this about ?
- It uses vue.js as front end engine to present datas and graph them.
- It uses dio extension to properly communicate with serial gateway (USB gateway)
- It uses websockets for a realtime communication between vuejs and php
- As soon as a message (new value from node) is received from gateway (and treated) it is pushed to vue, realtime here (wip : improving response time by optimizing ws network load)
- Tested with Symfony 4.2 and PHP 7.2-7.3
- A pretty good attention is given to GUI (clear and simple)
Prerequisites and limitations
- You MUST install php_dio extension (pecl extension) : this will allow php to access serial port directly and it is the only way to do good job with serial port.
- You need to run daemons in background via cron, nohup or screen (~4% memory on a raspberry pi)
- One for websockets
- One for retrieving and treat USB gateway infos
- Currently only works with a serial gateway (connected to USB) or emulated file gateway
- Specific server config (mod proxy for apache)
What it does ?
- Get and display current sensors status
- Easy set activators
- Set actuators
- Supported values :
V_HUMand more to come...
- Supported values :
- Log received datas
- Historical view (see when an actuator has changed status)
- Full graph with all sensors for a global view (line chart)
- Simple date range query logs
- Full and very clear gateway debugging by launching daemon in verbose mode (-vvv)
- Trigger several actuators at a time (actions)
- Build scenario based on conditions on value of one or several sensors and trigger action accordingly
- Schedule actions (using rrule RFC both side) to be executed periodically
- Graph your network topology
- File emulator gateway for local testing purpose (no fully running gateway needed to contribute)
- Dispatchs events on new messages received from gateway
- Minimalistic REST API (that need more attention)
- Software definition of logging : log periodically sensors (drop unwanted values)
The work to come...
- Allow creation and modification of nodes via gui, in fact, only yaml definition is supported for the moment
- Create new nodes and sensors on gateway's presentation message reception (auto mode not implemented)
- Test new message type (and sensors), new value, new unit and debug...
- Improve graphs datas (redondant big queries and not optimized formatting)
- Improve data socket network usage (be light)
- Unit/functionnal testing
- Support more gateway protocols (MQTT)
- Support exotic sensors
- Refactor and cleanup
So tell me...
RE: I plan to write a mysensor controller core API
I'm interesting in your work. Have you got some sources , a git repository ?
What kind of connexion do you plan to code for gateway : serial mqtt ?
BTW, i can be part of coding team.