Another MQTT question.
I have hardware which publishes to the following topic
RFLink/send/NewKaku/C7EDA
Switch One On posts a payload of {"SWITCH":1,"CMD":"ON"}
Switch One Off posts a payload of {"SWITCH":1,"CMD":"OFF"}
Switch Two On posts a payload of {"SWITCH":2,"CMD":"ON"}
Switch Two Off posts a payload of {"SWITCH":2,"CMD":"OFF"}
No issues here controlling via the UI on both switches.
Switch One is a device
Switch Two is a device
I have an issue with the stateTopic and how to parse the payload.
stateTopic is
RFLink/received/NewKaku/C7EDA
Switch One On status is {"SWITCH":1,"CMD":"ON"}
Switch One Off status is {"SWITCH":1,"CMD":"OFF"}
Switch Two On status is {"SWITCH":2,"CMD":"ON"}
Switch Two Off status is {"SWITCH":2,"CMD":"OFF"}
What value would I place in the stateValueKey on switch One device?
I have tried the following
SWITCH:1,CMD
"SWITCH":1,CMD
{“SWITCH”:1,“CMD”:
{“SWITCH”:1,“CMD”:""}
Without luck, any suggestions?