I’m trying to configure my light via MQTT.
If have command topic: “/h_room_sw-2/cmd”
To turn light On I’ve to send “GPIO,5,1” payload
To turn light Off I’ve to send “GPIO,5,0” payload
State I can get through “/h_room_sw-2/R1/State” topic.
And when light is On I get “1” and “0” when light is off.
Please consider marking my post above with the Solution tag. It will automatically place a check-mark next to the topic’s title which signals to other users that this topic is resolved. This helps other users find answers to similar questions. For more information, refer to guideline 21 in the FAQ.
Interesting thing, now the second way works fine too. May be I made some mistake in configuration that time. It’s looks better, so I will use this configuration.