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

Bridge Randomly stops responding to on/off commands #6

Open
boojew opened this issue Jun 6, 2019 · 0 comments
Open

Bridge Randomly stops responding to on/off commands #6

boojew opened this issue Jun 6, 2019 · 0 comments

Comments

@boojew
Copy link
Owner

boojew commented Jun 6, 2019

When this happens, the device completely stops responding and posts the below error once. It appears when it happens that the mqttclient is no longer reading the mqtt stream as after restarting the bridge, it pops the last event.


2019-06-02 23:54:01,890 - Payload: {'userName': '[email protected]', 'uid': '2c3ae82f88b2', 'value1': 0, 'value2': 0, 'value3': 0, 'value4': 0, 'defaultResponse': 1, 'ver': '2.4.0', 'qualityOfService': 1, 'delayTime': 0, 'cmd': 15, 'deviceId': '48zdylae6h6j7wbm94sli14wn020conp', 'clientSessionId': '48zdylae6h6j7wbm94sli14wn020conp', 'order': 'off', 'serial': 4}
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "/home/ben/.local/lib/python3.6/site-packages/paho/mqtt/client.py", line 2913, in _thread_main
    self.loop_forever(retry_first_connection=True)
  File "/home/ben/.local/lib/python3.6/site-packages/paho/mqtt/client.py", line 1578, in loop_forever
    rc = self.loop(timeout, max_packets)
  File "/home/ben/.local/lib/python3.6/site-packages/paho/mqtt/client.py", line 1072, in loop
    rc = self.loop_read(max_packets)
  File "/home/ben/.local/lib/python3.6/site-packages/paho/mqtt/client.py", line 1374, in loop_read
    rc = self._packet_read()
  File "/home/ben/.local/lib/python3.6/site-packages/paho/mqtt/client.py", line 2071, in _packet_read
    rc = self._packet_handle()
  File "/home/ben/.local/lib/python3.6/site-packages/paho/mqtt/client.py", line 2560, in _packet_handle
    return self._handle_publish()
  File "/home/ben/.local/lib/python3.6/site-packages/paho/mqtt/client.py", line 2759, in _handle_publish
    self._handle_on_message(message)
  File "/home/ben/.local/lib/python3.6/site-packages/paho/mqtt/client.py", line 2902, in _handle_on_message
    callback(self, self._userdata, message)
  File "/home/ben/.local/lib/python3.6/site-packages/hassdevice/devices.py", line 48, in _on_command
    self.on_state_change(new_state)
  File "/home/ben/.local/lib/python3.6/site-packages/homemate_bridge/cli.py", line 46, in on_state_change
    self._handler.order_state_change(new_state == self.payload_on)
  File "/home/ben/.local/lib/python3.6/site-packages/homemate_bridge/cli.py", line 242, in order_state_change
    self.request.sendall(packet)
OSError: [Errno 9] Bad file descriptor
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

1 participant