bt-mqtt-gateway icon indicating copy to clipboard operation
bt-mqtt-gateway copied to clipboard

Timeout

Open ik0adr opened this issue 5 years ago • 4 comments

Describe the bug A clear and concise description of what the bug is. Not working anymore

Traceback (most recent call last): File "./gateway.py", line 49, in mqtt.publish(_WORKERS_QUEUE.get(timeout=10).execute()) File "/home/pi/bt-mqtt-gateway/workers_manager.py", line 34, in execute messages = self._callback(*self._args) File "/home/pi/bt-mqtt-gateway/workers/thermostat.py", line 78, in status_update ret += self.update_device_state(name, thermostat) File "/home/pi/bt-mqtt-gateway/workers/thermostat.py", line 115, in update_device_state thermostat.update() File "/usr/local/lib/python3.5/dist-packages/eq3bt/eq3btsmart.py", line 163, in update self._conn.make_request(PROP_WRITE_HANDLE, value) File "/usr/local/lib/python3.5/dist-packages/eq3bt/connection.py", line 71, in make_request with self: File "/usr/local/lib/python3.5/dist-packages/eq3bt/connection.py", line 36, in enter self._conn.connect(self._mac) File "/usr/local/lib/python3.5/dist-packages/bluepy/btle.py", line 445, in connect self._connect(addr, addrType, iface) File "/usr/local/lib/python3.5/dist-packages/bluepy/btle.py", line 436, in _connect rsp = self._getResp('stat') File "/usr/local/lib/python3.5/dist-packages/bluepy/btle.py", line 407, in _getResp resp = self._waitResp(wantType + ['ntfy', 'ind'], timeout) File "/usr/local/lib/python3.5/dist-packages/bluepy/btle.py", line 347, in _waitResp rv = self._helper.stdout.readline() File "/usr/local/lib/python3.5/dist-packages/interruptingcow/init.py", line 74, in handler raise exception TimeoutError: Execution of command ThermostatWorker.status_update timed out after 35 seconds

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

Config Used config

Debug gateway logs run gateway.py with -d switch and paste formatted output log

Server (please complete the following information):

  • OS: [e.g. Linux] linux
  • Distro: [e.g. Raspbian] raspbian
  • Version [e.g. November 2018] Linux zero_1 4.19.66+ #1253 Thu Aug 15 11:37:30 BST 2019 armv6l GNU/Linux Additional context Add any other context about the problem here.

ik0adr avatar Feb 08 '20 11:02 ik0adr

Try to upgrade bluez to newest version: https://github.com/zewelor/bt-mqtt-gateway/wiki/Upgrade-Bluez-on-Raspbian

zewelor avatar Feb 08 '20 12:02 zewelor

I have found the issue with the timeouts on several pi3b. Restarting the Bluetooth service solves the problem. Also with the actuallest bluez

cauer71 avatar Feb 27 '20 12:02 cauer71

Same issue on a Pi Zero W with bluez version 5.50-1.2~deb10u1+rpt2. Works for a few hours then stops sending updates.

harristom avatar Apr 04 '21 14:04 harristom

Hi, any update on this? I've started using bt-mqtt-gateway some days ago and I'm having the same issue.

jjimenezlopez avatar Sep 18 '21 19:09 jjimenezlopez