fhempy: ring (Ring Doorbell, Chime, ...)

Begonnen von dominik, 04 Januar 2021, 12:37:13

Vorheriges Thema - Nächstes Thema

bewa58

habe seit heute (nach Update FHEM und Neustart von FHEM folgende Fehlermeldung:

ZitatFailed to load module ring: Traceback (most recent call last): File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/fhem_pythonbinding.py", line 300, in _onMessage module_object = await utils.run_blocking( File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/utils.py", line 33, in run_blocking return await asyncio.get_event_loop().run_in_executor(pool, function) File "/usr/lib/python3.9/concurrent/futures/thread.py", line 52, in run result = self.fn(*self.args, **self.kwargs) File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1030, in _gcd_import File "", line 1007, in _find_and_load File "", line 986, in _find_and_load_unlocked File "", line 680, in _load_unlocked File "", line 790, in exec_module File "", line 228, in _call_with_frames_removed File "/opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/ring/ring.py", line 10, in from ring_doorbell import Auth, Ring File "/opt/fhem/.local/lib/python3.9/site-packages/ring_doorbell/__init__.py", line 15, in from .auth import Auth # noqa File "/opt/fhem/.local/lib/python3.9/site-packages/ring_doorbell/auth.py", line 5, in from requests_oauthlib import OAuth2Session File "/opt/fhem/.local/lib/python3.9/site-packages/requests_oauthlib/__init__.py", line 3, in from .oauth1_auth import OAuth1 File "/opt/fhem/.local/lib/python3.9/site-packages/requests_oauthlib/oauth1_auth.py", line 10, in from requests.utils import to_native_string File "/usr/lib/python3/dist-packages/requests/utils.py", line 24, in from .__version__ import __version__ ImportError: cannot import name '__version__' from partially initialized module 'requests.__version__' (most likely due to a circular import) (/usr/lib/python3/dist-packages/requests/__version__.py)

Da dies bereits öfter nach dem Neustart von FHEM vorgekommen ist habe ich den
fhempy_server15733 neu gestartet
und die Fehlermeldung war weg.
da die Fehlermeldung weiterhin erscheint:
komplett neu gestartet (reboot vom Raspi)

dann kommt "gleiche Fehlermeldung"

dann fhempy_server15733 wieder neu gestartet
folgende Fehlermeldung:
ZitatFunction execution >60s, cancelled: ringDoorbell - Define

dann fhempy_server15733 wieder nochmal neu gestartet

-alles läuft !!!


Gibt es wieder Probleme mit der TUYA-Cloud ???
Habe die vergangenen Tage mehrfach keine Aktualisierung meiner Lampen-Devices gehabt
und deshalb
lasse ich den fhempy_server15733 im Stundenrhytmus neu starten.
Dadurch hat sich das Problem mit der "NICHTAKTUALISIERUNG" gebessert, ist aber leider nicht ganz verschwunden!



dominik

Ja, Tuya Cloud macht wieder Probleme, bitte dazu hier: https://forum.fhem.de/index.php/topic,122288.msg1205908.html#msg1205908

Tritt der Fehler im Ring Modul noch auf?
fhempy -  https://github.com/fhempy/fhempy: GoogleCast, Tuya, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik

bewa58

ZitatJa, Tuya Cloud macht wieder Probleme, bitte dazu hier: https://forum.fhem.de/index.php/topic,122288.msg1205908.html#msg1205908

Tritt der Fehler im Ring Modul noch auf?

Ja, gerade update gemacht (07.02.2022 06:15 Uhr)
FHEM und Raspi Neustart
Fehler wird angezeigt.

Dann fhempy_server Neustart und es läuft.

dominik

Bitte mal mit 0.1.218 testen. Irgendwo entsteht da noch ein "circular import", bin mir noch nicht sicher ob ich es mit dem Update behoben hab.
fhempy -  https://github.com/fhempy/fhempy: GoogleCast, Tuya, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik

Mickie

Hallo.

hat jemand eine idee, warum der fhempy Server als offline angezeigt wird?
Habe die Installation lt. Anleitung gemacht und irgendwie passiert nichts.
1. sudo apt install python3 python3-pip python3-dev libffi-dev libssl-dev libjpeg-dev zlib1g-dev autoconf build-essential libglib2.0-dev libdbus-1-dev bluez libbluetooth-dev git
2.sudo cpan Protocol::WebSocket
in fhem:
1. update add https://raw.githubusercontent.com/dominikkarall/fhempy/master/controls_pythonbinding.txt
2. update
3. define fhempy_local BindingsIo fhempy
4.define rrring fhempy ring USERNAME@MAIL.COM RINGDEVICENAME
set rrring password PASSWORD
set rrring 2fa_code 2FACODE_FROM_MAIL (hier kam keine Mail oder SMS - Code manuell per App erstellt)
Danke für die Unterstützung

dominik

Bitte fhempy Log posten, dann kann ich besser helfen.
fhempy -  https://github.com/fhempy/fhempy: GoogleCast, Tuya, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik

Manos


Ich bin so gluecklich, dass mein RING weiterhin problemlos funktioniert... Vielen Dank Dominik  :)
(ich mache ein Neustart des Pythonbinding_15733 jeden Tag zur Sicherheit und weil ich nur so bekomme ich den Batteriestand meines RINGs aktualisiert, ansonsten laeuft es problemlos)
HP Microserver GEN8 XEON, Ubuntu 22.04, FHEM, ConBee II, CCU2, CUL433, Tradfri, Luxtronik2, Volkszaehler (und wenig Ahnung...)

pflock_y

Problemlos kann ich zwar nicht sagen, aber läuft!
DANKESCHÖN!!!!!

dominik

Achja, mit Batterie war noch was...ich schau mir das nochmal an.

Was gibt's sonst noch für Probleme? :)
fhempy -  https://github.com/fhempy/fhempy: GoogleCast, Tuya, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik

Mickie

Hallo.

Hier der Auszug aus dem Logfile. Von heute ist das Logfile leer.

Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-vo22syt7/cryptography/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read($
2022-02-21 10:26:21,890 - ERROR    - __main__: Failed to install fhempy, exit now...
2022-02-21 10:26:46,653 - WARNING  - __main__: Failed to load fhempy: No module named 'fhempy'
2022-02-21 10:26:46,653 - INFO     - __main__: Attempting install of fhempy>=0.1.12
2022-02-21 10:27:01,208 - WARNING  - __main__: Failed to load fhempy: No module named 'fhempy'
2022-02-21 10:27:01,209 - INFO     - __main__: Attempting install of fhempy>=0.1.12
2022-02-21 10:27:02,908 - ERROR    - __main__: Unable to install package fhempy>=0.1.12: Exception:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pip/_internal/cli/base_command.py", line 143, in main
    status = self.run(options, args)
  File "/usr/lib/python3/dist-packages/pip/_internal/commands/install.py", line 289, in run
    wheel_cache = WheelCache(options.cache_dir, options.format_control)
  File "/usr/lib/python3/dist-packages/pip/_internal/cache.py", line 186, in __init__
    self._ephem_cache = EphemWheelCache(format_control)
  File "/usr/lib/python3/dist-packages/pip/_internal/cache.py", line 164, in __init__
    self._temp_dir.create()
  File "/usr/lib/python3/dist-packages/pip/_internal/utils/temp_dir.py", line 73, in create
    tempfile.mkdtemp(prefix="pip-{}-".format(self.kind))
  File "/usr/lib/python3.7/tempfile.py", line 495, in mkdtemp
    prefix, suffix, dir, output_type = _sanitize_params(prefix, suffix, dir)
  File "/usr/lib/python3.7/tempfile.py", line 265, in _sanitize_params
    dir = gettempdir()
  File "/usr/lib/python3.7/tempfile.py", line 433, in gettempdir
    tempdir = _get_default_tempdir()

Danke für die Unterstützung

dominik

Hattest du schon mal fhempy am Laufen? Mach mal
sudo -u fhem bash
pip3 install -U fhempy
Und poste den Output.
fhempy -  https://github.com/fhempy/fhempy: GoogleCast, Tuya, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik

Per

Zitat
Und poste den Output.
Aber bitte in Code-Tags!

Mickie

#102
Hi. Hatte Fhempy noch nicht am laufen.
Versuche das erstmal im Testsystem ans laufen zu bekommen.

Hier der Output:

sudo -u fhem bash
fhem@RaspiVM:/home/pi$ pip3 install -U fhempy
Exception:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pip/_internal/cli/base_command.py", line 143, in main
    status = self.run(options, args)
  File "/usr/lib/python3/dist-packages/pip/_internal/commands/install.py", line 289, in run
    wheel_cache = WheelCache(options.cache_dir, options.format_control)
  File "/usr/lib/python3/dist-packages/pip/_internal/cache.py", line 186, in __init__
    self._ephem_cache = EphemWheelCache(format_control)
  File "/usr/lib/python3/dist-packages/pip/_internal/cache.py", line 164, in __init__
    self._temp_dir.create()
  File "/usr/lib/python3/dist-packages/pip/_internal/utils/temp_dir.py", line 73, in create
    tempfile.mkdtemp(prefix="pip-{}-".format(self.kind))
  File "/usr/lib/python3.7/tempfile.py", line 495, in mkdtemp
    prefix, suffix, dir, output_type = _sanitize_params(prefix, suffix, dir)
  File "/usr/lib/python3.7/tempfile.py", line 265, in _sanitize_params
    dir = gettempdir()
  File "/usr/lib/python3.7/tempfile.py", line 433, in gettempdir
    tempdir = _get_default_tempdir()
  File "/usr/lib/python3.7/tempfile.py", line 368, in _get_default_tempdir
    dirlist)
FileNotFoundError: [Errno 2] No usable temporary directory found in ['/tmp', '/var/tmp', '/usr/tmp', '/home/pi']
Danke für die Unterstützung

dominik

Bitte code Tags verwenden!

FileNotFoundError: [Errno 2] No usable temporary directory found in ['/tmp', '/var/tmp', '/usr/tmp', '/home/pi']

...die Fehlermeldung sagt denke ich alles. Was hast du da für ein System? Dürfte kein Standard Linux sein.
fhempy -  https://github.com/fhempy/fhempy: GoogleCast, Tuya, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik

Mickie

Danke für die Unterstützung