Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Devices become unavailable after time-out #10

Open
botmanshassio opened this issue Sep 26, 2022 · 1 comment
Open

Devices become unavailable after time-out #10

botmanshassio opened this issue Sep 26, 2022 · 1 comment

Comments

@botmanshassio
Copy link

botmanshassio commented Sep 26, 2022

whenever a command cannot be sent due to a time-out, all of the devices become unavailable and I need to restart the service for them to become available again.
1 of my airco's keeps giving random time-outs, funny enough it's the one closest to my router.

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
services-up: info: copying legacy longrun broadlink-ac-mqtt (no readiness notification)
s6-rc: info: service legacy-services successfully started
Starting Monitor...
(200, ('192.168.1.98', 80))
(200, ('192.168.1.98', 80))
(200, ('192.168.1.98', 80))
(200, ('192.168.1.98', 80))
(200, ('192.168.1.98', 80))
(200, ('192.168.1.98', 80))
(200, ('192.168.1.98', 80))
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/share/broadlink_ac_mqtt-1.2.1b/broadlink_ac_mqtt/classes/broadlink/ac_db.py", line 252, in send_packet
response = self.cs.recvfrom(1024)
socket.timeout: timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/threading.py", line 980, in _bootstrap_inner
self.run()
File "/usr/local/lib/python3.9/threading.py", line 917, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 3591, in _thread_main
self.loop_forever(retry_first_connection=True)
File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 1756, in loop_forever
rc = self._loop(timeout)
File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 1164, in _loop
rc = self.loop_read()
File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 1556, in loop_read
rc = self._packet_read()
File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 2439, in _packet_read
rc = self._packet_handle()
File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 3033, in _packet_handle
return self._handle_publish()
File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 3327, in _handle_publish
self._handle_on_message(message)
File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 3570, in _handle_on_message
on_message(self, self._userdata, message)
File "/usr/share/broadlink_ac_mqtt-1.2.1b/broadlink_ac_mqtt/AcToMqtt.py", line 408, in _on_mqtt_message
status = self.device_objects[address].set_fanspeed(value)
File "/usr/share/broadlink_ac_mqtt-1.2.1b/broadlink_ac_mqtt/classes/broadlink/ac_db.py", line 439, in set_fanspeed
self.get_ac_states()
File "/usr/share/broadlink_ac_mqtt-1.2.1b/broadlink_ac_mqtt/classes/broadlink/ac_db.py", line 710, in get_ac_states
response = self.send_packet(0x6a, GET_STATES)
File "/usr/share/broadlink_ac_mqtt-1.2.1b/broadlink_ac_mqtt/classes/broadlink/ac_db.py", line 258, in send_packet
raise ConnectTimeout(200,self.host)
broadlink_ac_mqtt.classes.broadlink.ac_db.ConnectTimeout: (200, ('192.168.1.98', 80))

@botmanshassio botmanshassio changed the title Devices become unavailable Devices become unavailable after time-out Sep 26, 2022
@ArtemVladimirov
Copy link

The author of the script advised such a solution
liaan/broadlink_ac_mqtt#110

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants