dib0 / elro_connects

The ELRO Connects uses a propriety protocol on the local network over UDP. This is the reversed engineered python implementation of the protocol.
MIT License
16 stars 7 forks source link

Connect Elro connect to Domoticz #15

Closed mrtpols closed 2 years ago

mrtpols commented 2 years ago

Dear developer,

I love what you made with the connection between Elro Connects and MQTT. Now its a really small step to connect with domoticz, only the MQTT stream need to change a littlebit. I hope you can help me with this (im not a python master). the MQTT must contain a idx and a nvalue and battery must start with capital.

{ "idx": 1, "nvalue": 1, "name": "Woonkamer", "id": 1, "type": "0013", "state": "normal", "Battery": 95 }

The idx number must be customizable from a config file, so ID 1 in the K1 can be IDX 77 in Domoticz.

the nvalue must be: 1 = normal 2 = warning 3 = alert 4 = alarm

I hope you can help me.

hildensia commented 2 years ago

Generally, I like to add templates so everybody can build their own message format. In the meantime you have to change the publish calls:

https://github.com/dib0/elro_connects/blob/19412a5be4f924f2ccf82801999cc7fc639155b3/elro/mqtt.py#L62 https://github.com/dib0/elro_connects/blob/19412a5be4f924f2ccf82801999cc7fc639155b3/elro/mqtt.py#L83