fhempy: eRelax Vaillant

Begonnen von dominik, 27 Juli 2021, 22:45:47

Vorheriges Thema - Nächstes Thema

dominik

Hallo zusammen,

nachdem ich seit ein paar Tagen eine eRelax Vaillant Gastherme besitze, habe ich dafür ein Modul geschrieben. Zumindest eine 1. Version mit der man die Temperatur setzen kann. Es werden auch jede Menge Readings ausgelsen. Geht alles über die Vaillant (eigentlich Netatmo) Cloud und erfordert nur einen Account. Keine Hardwareanpassung notwendig.

Installation

Zuerst fhempy installieren:
https://github.com/dominikkarall/fhempy

Danach:
define my_vaillant PythonModule erelax_vaillant USER PASSWORD
fhempy -  https://github.com/fhempy/fhempy: GoogleCast, Tuya, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik

wolger

Hallo dominik, gibt es ein update? Ich habe alles nach Deiner Anweisung installiert, bekomme aber beim Anlegen von my_vaillant die Fehlermeldung:

Module failed to load: erelax_vaillant
Maybe you need to update fhempy on this or remote peer.

Stacktrace:
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.7/site-packages/fhempy/lib/fhem_pythonbinding.py", line 218, in handle_function
    module_object = await self.import_module(hash)
  File "/opt/fhem/.local/lib/python3.7/site-packages/fhempy/lib/fhem_pythonbinding.py", line 403, in import_module
    functools.partial(importlib.import_module, pymodule)
  File "/opt/fhem/.local/lib/python3.7/site-packages/fhempy/lib/utils.py", line 34, in run_blocking
    return await asyncio.get_event_loop().run_in_executor(pool, function)
  File "/usr/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/opt/fhem/.local/lib/python3.7/site-packages/fhempy/lib/erelax_vaillant/erelax_vaillant.py", line 9, in <module>
    from httpx import AsyncClient
ModuleNotFoundError: No module named 'httpx'

dominik

Mach bitte mal
sudo -u fhem bash
pip3 install git+https://github.com/dominikkarall/vaillant-netatmo-api#vaillant-netatmo-api==0.8.2

Eigentlich sollte da das httpx Modul automatisch installiert werden.
fhempy -  https://github.com/fhempy/fhempy: GoogleCast, Tuya, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik

wolger

Hallo dominik,
bin erst jetzt nach Urlaub wieder aktiv. Nach Ausführung Deiner Anweisung wurde folgendes gemeldet:

Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting git+https://github.com/dominikkarall/vaillant-netatmo-api#vaillant-netatmo-api==0.8.2
  Cloning https://github.com/dominikkarall/vaillant-netatmo-api to /tmp/pip-req-build-1bm958rs
  Installing build dependencies ... done
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/usr/lib/python3.7/tokenize.py", line 447, in open
        buffer = _builtin_open(filename, 'rb')
    FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pip-req-build-1bm958rs/setup.py'

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-req-build-1bm958rs/



wolger

Hallo dominik, gibt es etwas Neues zu meinem Problem???

dominik

Kann es sein, dass deine Platte vollgelaufen ist? Sieht für mich danach aus, als würde nach dem Extrahieren das File nicht da sein.
fhempy -  https://github.com/fhempy/fhempy: GoogleCast, Tuya, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik

wolger

es sieht mir nicht danach aus:

pi@Raspberrypi-4:~ $ df -h
Dateisystem    Größe Benutzt Verf. Verw% Eingehängt auf
/dev/root        29G     14G   15G   48% /
devtmpfs        1,8G       0  1,8G    0% /dev
tmpfs1,9G     14M  1,9G    1% /dev/shm
tmpfs           1,9G    146M  1,8G    8% /run
tmpfs           5,0M    4,0K  5,0M    1% /run/lock
tmpfs           1,9G       0  1,9G    0% /sys/fs/cgroup
/dev/mmcblk0p1  253M     49M  204M   20% /boot
tmpfs           384M       0  384M    0% /run/user/1000

dominik

Mach mal
pip3 install --upgrade pip setuptools
und probier es dann noch einmal.
fhempy -  https://github.com/fhempy/fhempy: GoogleCast, Tuya, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik

wolger

Hab ich gemacht, aber der Fehler kommt weiterhin  :(

pi@Raspberrypi-4:~ $ sudo -u fhem bash
fhem@Raspberrypi-4:/home/pi$ pip3 install git+https://github.com/dominikkarall/vaillant-netatmo-api#vaillant-netatmo-api==0.8.2
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting git+https://github.com/dominikkarall/vaillant-netatmo-api#vaillant-netatmo-api==0.8.2
  Cloning https://github.com/dominikkarall/vaillant-netatmo-api to /tmp/pip-req-build-035c6mps
  Installing build dependencies ... done
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/usr/lib/python3.7/tokenize.py", line 447, in open
        buffer = _builtin_open(filename, 'rb')
    FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pip-req-build-035c6mps/setup.py'

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-req-build-035c6mps/

dominik

Ich glaube es liegt an Python 3.7. Kannst du auf bullseye aktualisieren, dort ist Python 3.8 default.
Ansonsten komme ich erst nächste Woche dazu es genauer anzuschauen.
fhempy -  https://github.com/fhempy/fhempy: GoogleCast, Tuya, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik

wolger

Danke für deine Bemühungen. Ich habe Python 3.8.5 installiert, aber der Fehler bleibt, muss noch etwas geändert werden?

pi@Raspberrypi-4:~ $ python3 -V
Python 3.7.3
pi@Raspberrypi-4:~ $ python3.8 -V
Python 3.8.5

dominik

Du musst noch den Link von python3 auf 3.8 machen. Such mal nach systemweiten Python Version Upgrade.
fhempy -  https://github.com/fhempy/fhempy: GoogleCast, Tuya, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik

wolger

Hallo dominik, ich habe auf Python 3.8.5 upgedatet:
pi@Raspberrypi-4:~ $ python -V
Python 3.8.5

pi@Raspberrypi-4:~ $ sudo -u fhem bash
fhem@Raspberrypi-4:/home/pi$ pip3 install git+https://github.com/dominikkarall/vaillant-netatmo-api#vaillant-netatmo-api==0.8.2
schließt ab mit:
Building wheels for collected packages: vaillant-netatmo-api
  Building wheel for vaillant-netatmo-api (pyproject.toml) ... done
  Created wheel for vaillant-netatmo-api: filename=vaillant_netatmo_api-0.8.2-py3-none-any.whl size=21453 sha256=b1e56d65d43401265d863ca751d8ef8c0b529a75b5f8565ca16c342a37e5c1ed
  Stored in directory: /tmp/pip-ephem-wheel-cache-tw5u29hu/wheels/a0/ba/69/bac64e284f3f4ed6f26c017d4d9c2c1a0bd4131110a3ae269e
Successfully built vaillant-netatmo-api
Installing collected packages: rfc3986, tenacity, sniffio, idna, h11, certifi, anyio, httpcore, httpx, vaillant-netatmo-api
  WARNING: The script httpx is installed in '/opt/fhem/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed anyio-3.6.1 certifi-2022.6.15 h11-0.12.0 httpcore-0.15.0 httpx-0.23.0 idna-3.3 rfc3986-1.5.0 sniffio-1.2.0 tenacity-8.0.1 vaillant-netatmo-api-0.8.2


In FHEM:
update
shutdown restart

BindingsIo (fhempy_local): ERROR fhempy_local - error while connecting: 127.0.0.1: Verbindungsaufbau abgelehnt (111)

Habe ich was vergessen???

dominik

Das sieht schon besser aus. Poste bitte noch das fhempy Log.
fhempy -  https://github.com/fhempy/fhempy: GoogleCast, Tuya, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik

wolger

Hallo Dominik, angefügt die Log-Datei.