zewelor / bt-mqtt-gateway

A simple Python script which provides a Bluetooth to MQTT gateway, easily extensible via custom workers. See https://github.com/zewelor/bt-mqtt-gateway/wiki for more information.
MIT License
549 stars 117 forks source link

EQ3 thermostat #120

Open jaroszy2 opened 4 years ago

jaroszy2 commented 4 years ago

have installed acording to manual on Zero W to control eq3 thermostat.

Installed pip3 install python-eq3bt

The MQTT topics updated only once when start the program When run ./gateway -d gives the following error

DEBUG bt-mqtt-gw.workers.thermostat thermostat.py:227:status_update - Updating thermostat device 'bedroom' (00:AE:A9:E5:68:C7) 2019-11-23 13:57:43,751 ERROR bt-mqtt-gw.workers.thermostat logger.py:50:log_exception - Error during update of thermostat device 'bedroom' (00:AE:A9:E5:68:C7): BTLEGattError Traceback (most recent call last): File "/home/pi/bt-mqtt-gateway/workers/thermostat.py", line 230, in status_update thermostat.update() File "/usr/local/lib/python3.7/dist-packages/eq3bt/eq3btsmart.py", line 205, in update self._conn.make_request(PROP_WRITE_HANDLE, value) File "/usr/local/lib/python3.7/dist-packages/eq3bt/connection.py", line 73, in make_request self._conn.writeCharacteristic(handle, value, withResponse=with_response) File "/usr/local/lib/python3.7/dist-packages/bluepy/btle.py", line 543, in writeCharacteristic return self._getResp('wr') File "/usr/local/lib/python3.7/dist-packages/bluepy/btle.py", line 407, in _getResp resp = self._waitResp(wantType + ['ntfy', 'ind'], timeout) File "/usr/local/lib/python3.7/dist-packages/bluepy/btle.py", line 368, in _waitResp raise BTLEGattError("Bluetooth command failed", resp) bluepy.btle.BTLEGattError: Bluetooth command failed (code: 1, error: Invalid handle)

merll commented 4 years ago

Could you please run the command line tool eq3cli --mac 00:AE:A9:E5:68:C7 --debug and open an issue in the python-eq3bt repo, together with the output from above. Not sure what the reason for this is, but if it is a bug or incompatibility, it needs to be addressed there. What device name shows up if you do a Bluetooth scan? Is it CC-RT-BLE-EQ, or another model?