MQTT set issue - Printable Version +- Smart Home Automation Forum (https://www.kincony.com/forum) +-- Forum: Technical Support (https://www.kincony.com/forum/forumdisplay.php?fid=1) +--- Forum: KC868-HxB series Smart Controller (https://www.kincony.com/forum/forumdisplay.php?fid=2) +--- Thread: MQTT set issue (/showthread.php?tid=826) |
MQTT set issue - gek1925 - 10-07-2021 Hi I'm trying to set two relays at once, but only one changed. I publish via Home Assistant MQTT: relay32/xxxxxxxxxxxxx/set {"relay17":{"on":1},"relay18":{"on":1}} but only relay17 state is changed please answer Is it possible to set more than one relay by one MQTT publish command? with regards, Gene RE: MQTT set issue - uvrtar - 10-07-2021 Try to set a delay of 100ms between 17 and 18. RE: MQTT set issue - admin - 10-08-2021 yes, support multi-output by one command. you payload should as this format: {"relay17":{"on":0}}{"relay18":{"on":0}} RE: MQTT set issue - gek1925 - 10-08-2021 Hi! it is working. I have made the switch as a group of relays. platform: mqtt name: "4sqdir000" unique_id: 4sqdir000 state_topic: "relay32/xxxxxxx/state" command_topic: "relay32/xxxxxxxxx/set" payload_on: '{{"relay17":{"on":1}}{"relay18":{"on":0}}{"relay19":{"on":0}}{"relay20":{"on":1}}{"relay21":{"on":0}}{"relay22":{"on":0}}{"relay24":{"on":1}}}' payload_off: '{{"relay17":{"on":0}}{"relay18":{"on":0}}{"relay19":{"on":0}}{"relay20":{"on":0}}{"relay21":{"on":0}}{"relay22":{"on":0}}{"relay24":{"on":0}}}' value_template: "{{value_json.relay17.on}}{{value_json.relay18.on}}{{value_json.relay19.on}}{{value_json.relay20.on}}{{value_json.relay21.on}}{{value_json.relay22.on}}{{value_json.relay24.on}}" state_on: "1001001" state_off: "0000000" All works fine! Many Thanks for high effective support! with regards, Gene RE: MQTT set issue - admin - 10-08-2021 great, you are welcome. |