rytilahti / python-eq3bt

Python library and command-line tool for eQ-3 Smart Bluetooth thermostats
MIT License
115 stars 36 forks source link

Device list #5

Closed Solmyrus closed 7 years ago

Solmyrus commented 7 years ago

Hello. There is a list of supported devices? I have Bluetooth Smart Radiator Thermostat but from Equiva product line (http://www.eq-3.com/products/eqiva/bluetooth-smart-radiator-thermostat.html) and I have problems with communication with library. Is this thermostat supported by this library? Thanks

rytilahti commented 7 years ago

Those are exactly the same thermostats I have, I think they are just being sold under many different brands. What is the exact problem you are having?

Solmyrus commented 7 years ago

I have RPI 3 and two thermostats with same problem. I tried connect with bluetoothctl: [bluetooth]# info 00:1A:22:08:0A:09 Device 00:1A:22:08:0A:09 Name: CC-RT-BLE Alias: CC-RT-BLE Paired: yes Trusted: yes Blocked: no Connected: yes LegacyPairing: no UUID: Generic Access Profile (00001800-0000-1000-8000-00805f9b34fb) UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb) UUID: Device Information (0000180a-0000-1000-8000-00805f9b34fb) UUID: Vendor specific (3e135142-654f-9090-134a-a6ff5bb77046) UUID: Vendor specific (9e5d1e47-5c13-43a0-8635-82ad38a1386f)

but with eq3cli: eq3cli --mac 00:1A:22:08:0A:09 WARNING:eq3bt.connection:Unable to connect to the device 00:1A:22:08:0A:09, retrying: Failed to connect to peripheral 00:1A:22:08:0A:09, addr type: public ERROR:eq3bt.connection:Second connection try to 00:1A:22:08:0A:09 failed: Failed to connect to peripheral 00:1A:22:08:0A:09, addr type: public ERROR:eq3bt.connection:Got btle exception: Failed to connect to peripheral 00:1A:22:08:0A:09, addr type: public Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/eq3bt/connection.py", line 71, in make_request with self: File "/usr/local/lib/python2.7/dist-packages/eq3bt/connection.py", line 40, in __enter__ self._conn.connect(self._mac) File "/usr/local/lib/python2.7/dist-packages/bluepy/btle.py", line 367, in connect "Failed to connect to peripheral %s, addr type: %s" % (addr, addrType)) BTLEException: Failed to connect to peripheral 00:1A:22:08:0A:09, addr type: public Traceback (most recent call last): File "/usr/local/bin/eq3cli", line 9, in <module> load_entry_point('python-eq3bt==0.1.5', 'console_scripts', 'eq3cli')() File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 722, in __call__ return self.main(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 697, in main rv = self.invoke(ctx) File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1043, in invoke return Command.invoke(self, ctx) File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 895, in invoke return ctx.invoke(self.callback, **ctx.params) File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 535, in invoke return callback(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/click/decorators.py", line 17, in new_func return f(get_current_context(), *args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/eq3bt/eq3cli.py", line 27, in cli ctx.invoke(state) File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 535, in invoke return callback(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/click/decorators.py", line 17, in new_func return f(get_current_context(), *args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/eq3bt/eq3cli.py", line 149, in state click.echo(dev) File "/usr/local/lib/python2.7/dist-packages/click/utils.py", line 221, in echo message = text_type(message) File "/usr/local/lib/python2.7/dist-packages/eq3bt/eq3btsmart.py", line 97, in __str__ self.mode_readable, File "/usr/local/lib/python2.7/dist-packages/eq3bt/eq3btsmart.py", line 267, in mode_readable if mode.MANUAL: AttributeError: 'NoneType' object has no attribute 'MANUAL'

rytilahti commented 7 years ago

Are you sure you have disconnected the thermostat before calling eq3cli, after connecting it with bluetoothctl? bluetooth le devices can only be connected once at a time.

Solmyrus commented 7 years ago

It is same when I disconnect. But I have idea. I use embedded BT in clean Hassbian instalation. In HA web is:

Bluetooth is ready to use (supported models only, no Bluetooth LE). Need i some libraries for BLE in RPI?

rytilahti commented 7 years ago

I also use embedded bluetooth of Rasperry Pi 3, so that's not the problem. Although I just realized that you are using Python2, which is not supported. Please try it again with Python3.

Solmyrus commented 7 years ago

Yes. This is problem. I install everything as pip install ... but i have to pip3 install ... Thank you very much.