Experimental: ESP Easy MySensors Edition
-
Hello to you all!
I've made a sketch that wraps an webgui around the GatewayESP8266. It is based on the ESP Easy sketch. You can use this to connect locally attached sensors to the ESP module and be able to configure these sensors at runtime through the webgui.
Currently it only works with a few sensors that use the existing ESP Easy native sensor code.
Also the Wifi webconfig does not work, because these parameters needs to be hardcoded using the current Mysensors library. I hope that this can be changed so we don't need to configure these things at compile time anymore.Many thanks to the developers of MySensors for making this sketch a real easy migration so far! If it seems useful, we could try to implement more sensors and using the native Mysensors libraries where possible. (many of them may not be compatible with the ESP core because they were developed for AVR platform)
This is experimental stuff. If you want to take the challenge, code can be found here:
https://github.com/ESP8266nu/ESPEasyMySensors
Upload it to an ESP8266 module instead of the GatewayESP8266 sketch and connect it to your Home Automation controller the usual way.Some pictures:
-
Good work !
-
@martinus Very nice!
Would be awesome if this (or some other) web interface could be used to give an overview of the MySensors network.
ESP8266 has plenty of power/space to run a webserver and show e.g. clients connected, sensor messages, battery levels, serial logging etc etc etc
-
@martinus
Did not expect to see you here Martinus! Maybe you remember me from the Nodo, NRF and ESP chats on the Nodo forum.
I thought you had left the NRF development on the Nodo project but here you suddenly appear?
-
Indeed I left the Nodo project mainly because the lack of development and support. For me there was no value to add to the project anymore. So I moved over to something new to spend my time and the ESP is very much alive and kicking. So is the MySensors project, so I'm just trying to combine things now.
Did you already try this experiment? There's an update on github with some fixes and more sensors supported.
-
I did try the code from github and got it working. But it seems limited compared to the normal ESP Easy edition. Is there specific reason or just not build yet, I mean the missing plugins.
-
My first try with multiple sensors attached to a single node seems to confuse Domoticz as it tries to combine things that should not be combined. Like a DHT sensor combined with BMP085 turns into a single temp/hum/baro device. Looks nice but what if one of them is used indoor and the other outdoor. You'll get outdoor humidity reported while there is no outdoor reading for that.
Maybe the MySensors protocol does not support this layer of grouping sensordata like Domoticz expects. I asked about this on the Domoticz forum but the question remains unanswered.
http://www.domoticz.com/forum/viewtopic.php?f=42&t=9363
It would be nice to know about this kind of limitations before further development will take place.
-
Are they combined even if you use separate child-ids for the DHT/BMP085?
-
Well to be more precise: If you have a DHT (temp+hum) and BMP (temp+baro) and each value has a unique child id, Domoticz seems to create two devices but each will have three values.
What I send is this:child id 4 (hum value from DHT)
child id 5 (temp value from DHT)
child id 12 (baro value from BMP)
child id 13 (temp value from BMP)End result is two temp+hum+baro devices.
So it adds the humidity value to the BMP sensor
And adds the barometric pressure value to the DHTOr could I use the same child-id for multiple values?
I though child-id's need to be unique for each value?
-
It's a bit weird they get grouped by the controller. Guess they had some nice device type they wanted to reuse.
A few device types actually allows different sensor readings. You'll find them in the last column of the presentation-table here:
http://www.mysensors.org/download/serial_api_15
I.e. For a S_BARO device you can send bot V_PRESSURE and V_FORECAST.In retrospect we probably would have splitted/organized things differently.. But this is what we have at the moment.
-
@hek said:
It's a bit weird they get grouped by the controller. Guess they had some nice device type they wanted to reuse.
A few device types actually allows different sensor readings. You'll find them in the last column of the presentation-table here:
http://www.mysensors.org/download/serial_api_15
I.e. For a S_BARO device you can send bot V_PRESSURE and V_FORECAST.In retrospect we probably would have splitted/organized things differently.. But this is what we have at the moment.
I think Domoticz can only work with a fixed number of combined sensor devices and it looks like this is the only way to transform data from MySensors to one of the build-in device types.As Domoticz is our main platform it would make not much sense to further develop on something that is not supported.
I don't know how other Home Automation controllers handle this. If you connect two similar DHT22 unit's to a single node, would they be able to figure out how to display this properly? Would they automatically create two devices with both values displayed. Or (I guess) they would create 4 devices and not combine them in any way?
-
Most controllers show them as separate devices. But I guess that if different sensor values are reported on the same chid-id it could be a candidate for combination (GUI-vise).
-
@martinus The last commit was in 2015. Is this going to be developed any further? I like the approach and would give it a try, if the project was still alive.
-
Asking me? Think you have to address @martinus .
-
well done , but anyone here can tell me is it possible with ESP easy make network of ESP module , one in AP mode and others in Station mode ? AP module receive the sensor data of all other Station ESP module and probably send back them command or acknowledgment
-
If anyone answers @Hamid-s-k, please answer in https://forum.mysensors.org/topic/4053/esp-iot-net/ instead of here so we kepe the discussion in one place.
-
@hek said:
Most controllers show them as separate devices. But I guess that if different sensor values are reported on the same chid-id it could be a candidate for combination (GUI-vise).
Well the child ID's are unique, but Domoticz seems to keeps on trying to combine stuff within the same Node ID and create a mess if you have more than one similar sensor attached to a single node. This renders this project useless.
This list is merged into 5 separate devices by Domoticz, creating incorrect and confusing information.There's a thread on the subject, and it the issue seems to count for native mysensor nodes too.
http://www.domoticz.com/forum/viewtopic.php?f=42&t=9363&start=20
I think the mysensors protocol lacks some sort of group ID. If you connect two DHT22 sensors on a single node, how to tell which temp goes with which humidity if you receive 4 arbitrary child ID's ?
-
@martinus Anoying isn't it?
I allways give a description for each child I present. E.g.
gw.present( TEMP1_CHILD_ID, S_TEMP, "DHT1 sensor", true ); // present to controller gw.present( TEMP2_CHILD_ID, S_TEMP, "DHT2 sensor", true ); // present to controller
By doing this I can see the description in Domoticz, so that I know what to add.