Hi
I have been playing a bit with creating a binding for openHAB.
And it is now in a state where i think it is ready for some more testing.
Links
GitHub (https://github.com/bloft/openhab)
Download (http://bkl.linux.dk/org.openhab.binding.mysensors-1.8.0-SNAPSHOT.jar)
Features
- Serial Gateway supported Only
- Supported all sensors (1.6)
- Discovery of devices (sort of)
- Support requesting values from openhab
Experimental / Not Tested
- Ethernet Gateway
- Error handling of Gateway (restart of connection)
- I_CONFIG support add mysensors:metric=true to mysensors:metric=false to openhab.cfg
Not Working
- Auto assign of Node ID
Howto Use
- Add jar to addons dir
- Modify openhab.cfg add "mysensors:port=/dev/ttyUSB0"
- Add items
Configure ethernet gateway
Modify openhab.cfg set
mysensors:type=ethernet
mysensors:host=<host ip>
mysensors:port=5003
This is still untested so please report if it is working or not.
Auto discovery
Every time a Presentation is detected, example of usage is printed to the openhab.log on INFO
Example of items:
Number Humidity "Hjemmebio [%s %%Rh]" <water> (gBio,gHumidity) {mysensors="3;0;V_HUM"}
Number Temperature "Hjemmebio [%s °C]" <temperature> (gBio,gTemperature) {mysensors="3;1;V_TEMP"}
Switch Motion "Hjemmebio [%s]" <motion> (gBio,gMotion) {mysensors="3;2;V_TRIPPED"}
Number Light "Hjemmebio [%s]" <slider> (gBio,gLightLevel) {mysensors="3;3;V_LIGHT_LEVEL"}