HBDK / Eco2-Tools

The tools needed to use Eco2 thermostats with Home Assistant os
MIT License
37 stars 9 forks source link

Support for install on Hassio #25

Open njbuch opened 1 year ago

njbuch commented 1 year ago

Hi, I am using a HassIO box - Home Assistant 2022.12.8 - Supervisor 2022.12.1 - Operating System 9.4

I can add the custom repository, and add the etrv2mqtt addon using that, and start it (dont think it works though)

I can also install the etrv-scan from the same repository. But here is the limitations. It does seem to install the required dependencies. The log states:

Start scanning
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/local/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/usr/local/lib/python3.9/site-packages/libetrv/cli.py", line 80, in <module>
    fire.Fire(CLI)
  File "/usr/local/lib/python3.9/site-packages/fire/core.py", line 141, in Fire
    component_trace = _Fire(component, args, parsed_flag_args, context, name)
  File "/usr/local/lib/python3.9/site-packages/fire/core.py", line 466, in _Fire
    component, remaining_args = _CallAndUpdateTrace(
  File "/usr/local/lib/python3.9/site-packages/fire/core.py", line 681, in _CallAndUpdateTrace
    component = fn(*varargs, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/libetrv/cli.py", line 22, in scan
    for device, key in eTRVDevice.scan(timeout):
  File "/usr/local/lib/python3.9/site-packages/libetrv/device.py", line 41, in scan
    devices = btle.Scanner().scan(1)
  File "/usr/local/lib/python3.9/site-packages/bluepy/btle.py", line 852, in scan
    self.start(passive=passive)
  File "/usr/local/lib/python3.9/site-packages/bluepy/btle.py", line 800, in start
    self._mgmtCmd(self._cmd())
  File "/usr/local/lib/python3.9/site-packages/bluepy/btle.py", line 312, in _mgmtCmd
    raise BTLEManagementError("Failed to execute management command '%s'" % (cmd), rsp)
bluepy.btle.BTLEManagementError: Failed to execute management command 'scan'
Detected eTRV devices:
Done scanning

Is there a workaround for this?

JR-bva commented 1 year ago

Hi. There is a compatibility issue with Home Assistant 2022.7 and newer, based on updating Python to version 3.10. If I understand correctly, the problem is in the libetrv library. I'm not a programmer and don't know how addons work in HA, but while looking for a solution I came across a fork of libetrv that should be compatible with Python 3.10. Is it possible to use it? https://github.com/bartek56/libetrv