embyt / enocean-mqtt

Receives messages from an enOcean serial interface (USB) and provides selected messages to an MQTT broker.
GNU General Public License v3.0
42 stars 21 forks source link

Add new feature to group received EnOcean messages #33

Closed mak-gitdev closed 2 years ago

mak-gitdev commented 2 years ago

Add new feature allowing to group received EnOcean messages depending on the value of a field of that message. This is useful for EnOcean devices with two or more channels (i.e. D2-01-12) Considering D2-01-12 as an example, by adding 'channel = IO' under such a device's configuration in enoceanmqtt.conf, all received messages featuring the IO field will be grouped such as: <sensor_name>/IOx/<prop_name> where x is the channel ID (0, 1, 2, ...). Hence, to receive channel 0 output state, one should subscribe to <sensor_name>/IO0/OV. Without that feature, the output state and the corresponding channel would be received under different topics, requiring additional work to map state to channel.

This feature is only valid for received messages !