MQTT Payload formatting

mqtt2
Tags: #<Tag:0x00007f1e6ba4e6e8>
(wallebalboa) #1

I have a MQTT to DALI Gateway that subscribe to 1 topic and controls devices with a payload message like: {“channel”: 1 , “value”: 0 } where 1 is the dimmer adress and 0 is the dim value (0 to 254).
suggestions on how to set this up? i would like to have one item(thing) per dimmer. Do i need to use rules/scripts?

0 Likes

(CM6.5 H102) #2

What version of mqtt binding are you using?

0 Likes

(wallebalboa) #3

could be the latest :wink: i am setting up a new openHAB machine…

0 Likes

(Griff) #4

Use a number channel, set your minimum and maximum values (0 and 254), and then you should be able to use the ‘outgoing value format’, like:

{ "channel": 1 , "value" : %d }
0 Likes