Ty for your help, When im turning the switch to on i have notification: Turned on Furnace Auto Mode but its turn off after 1 sec, if i send the command to the topic manually the switch state change. I got this error in my screen when im switching state maybe the publish was not working i ll look into it.
Exception in thread Thread-1:
Traceback (most recent call last):
File “/usr/lib/python2.7/threading.py”, line 801, in __bootstrap_inner
self.run()
File “/usr/lib/python2.7/threading.py”, line 754, in run
self.__target(*self.__args, **self.__kwargs)
File “/usr/local/lib/python2.7/dist-packages/paho/mqtt/client.py”, line 2650, in _thread_main
self.loop_forever(retry_first_connection=True)
File “/usr/local/lib/python2.7/dist-packages/paho/mqtt/client.py”, line 1481, in loop_forever
rc = self.loop(timeout, max_packets)
File “/usr/local/lib/python2.7/dist-packages/paho/mqtt/client.py”, line 1003, in loop
rc = self.loop_read(max_packets)
File “/usr/local/lib/python2.7/dist-packages/paho/mqtt/client.py”, line 1284, in loop_read
rc = self._packet_read()
File “/usr/local/lib/python2.7/dist-packages/paho/mqtt/client.py”, line 1849, in _packet_read
rc = self._packet_handle()
File “/usr/local/lib/python2.7/dist-packages/paho/mqtt/client.py”, line 2305, in _packet_handle
return self._handle_publish()
File “/usr/local/lib/python2.7/dist-packages/paho/mqtt/client.py”, line 2500, in _handle_publish
self._handle_on_message(message)
File “/usr/local/lib/python2.7/dist-packages/paho/mqtt/client.py”, line 2647, in _handle_on_message
self.on_message(self, self._userdata, message)
File “broadlink-thermostat.py”, line 150, in on_message
command = cmd[4]
IndexError: list index out of range
Edit: I added a / after cmd
topic: “/broadlink/4eae9f34ea34/cmd/”
payload: “switch_to_auto”
Now i see the command in the console but the state doesnt change, my script is set to refresh at 3s maybe its to slow
Edit: I changed the refresh rate of my script but still have the same problem, the switch return to the current state after switching. I see on my screen that a topic was send but its not changing the state of the furnace