fhempy: object_detection CPU bei 100% - endlos "Installing updates..."

Begonnen von MarkusRobertAllen, 07 Dezember 2021, 09:24:27

Vorheriges Thema - Nächstes Thema

MarkusRobertAllen

Hallo,
zuerst danke für fhempy, es hat die Möglichkeiten meiner FHEM Installation sehr erweitert.

Nachdem meine RING und Tuya Devices gut integriert sind, fhempy aus meiner Sicht vernünftig läuft, wollte ich mich nun an object_detection und Tensorflow versuchen.

Dazu bin ich der Anleitung gefolgt:

https://github.com/dominikkarall/fhempy/blob/master/FHEM/bindings/python/fhempy/lib/object_detection/README.md



Und habe auch Tensorflow_light installiert für Raspberry OS wie auf dieser Seite angegeben:

https://www.tensorflow.org/lite/guide/python


Die FHEM Devices habe ich ebenfalls angelegt, jeweils eines für den Stream und eines für das Image:

Internals:
   DEF        object_detection stream "https://rbmn-live.akamaized.net/hls/live/2002825/geoSTVATweb/master.m3u8" set obj_det start
   FHEMPYTYPE object_detection
   FUUID      61ade390-f33f-9382-da19-776ce5f08ba37b88
   IODev      local_pybinding
   NAME       obj_det
   NR         2485
   PYTHONTYPE object_detection
   STATE      Installing updates...
   TYPE       fhempy
   READINGS:
     2021-12-07 05:24:11   state           Installing updates...
   args:
     obj_det
     fhempy
     object_detection
     stream
     https://rbmn-live.akamaized.net/hls/live/2002825/geoSTVATweb/master.m3u8
     set
     obj_det
     start
   argsh:
Attributes:
   room       Garage



Internals:
   DEF        object_detection image "FHEM/www/snapshot.jpg"
   FHEMPYTYPE object_detection
   FUUID      61ade3e1-f33f-9382-1459-c66cd361a1d68b4e
   IODev      local_pybinding
   NAME       obj_det_pic
   NR         2486
   PYTHONTYPE object_detection
   STATE      Installing updates...
   TYPE       fhempy
   READINGS:
     2021-12-07 05:24:19   state           Installing updates...
   args:
     obj_det_pic
     fhempy
     object_detection
     image
     FHEM/www/snapshot.jpg
   argsh:
Attributes:
   room       Garage


Nach der Anlage hat sich der state auf "Installing Updates" verändert, die CPU (Raspi 3a) ist auf 100% gegangen:

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     ZEIT+ BEFEHL
27404 fhem      20   0  175580 159640  20096 R  94,4  16,0   0:40.78 cc1plus


Am Anfang war es noch cmake, danach cc1plus. Nach nun 2 Tagen konsequenter CPU Auslastung bin ich allerdings am Zweifeln.

Das fhempy Log zeigt:


2021-12-07 01:07:18,126 - WARNING  - asyncio: Executing <Task pending name='Task-195' coro=<miio.fct_update_loop() running at /opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/miio/miio.py:105> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x73a2e6b8>()] created at /usr/local/lib/python3.9/asyncio/base_events.py:424> created at /usr/local/lib/python3.9/asyncio/tasks.py:361> took 0.107 seconds

2021-12-07 01:07:18,958 - ERROR    - miio_device_70689145: Failed to send_command: status

2021-12-07 01:07:19,062 - WARNING  - asyncio: Executing <Task pending name='Task-198' coro=<miio.fct_update_loop() running at /opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/miio/miio.py:105> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x7485ed18>()] created at /usr/local/lib/python3.9/asyncio/base_events.py:424> created at /usr/local/lib/python3.9/asyncio/tasks.py:361> took 0.105 seconds

2021-12-07 01:08:19,095 - ERROR    - miio_device_70689145: Failed to send_command: status

2021-12-07 01:08:19,268 - WARNING  - asyncio: Executing <Task pending name='Task-198' coro=<miio.fct_update_loop() running at /opt/fhem/.local/lib/python3.9/site-packages/fhempy/lib/miio/miio.py:105> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x74d15928>()] created at /usr/local/lib/python3.9/asyncio/base_events.py:424> created at /usr/local/lib/python3.9/asyncio/tasks.py:361> took 0.173 seconds
20


Die Fehler bezüglich des miio Devices kann man aktuell ignorieren, da ich diese Devices noch nicht endgültig zum Laufen gebracht habe.

Hat hier jemand Erfahrung, ob das Verhalten noch "normal" ist, oder welche Debugging Maßnahmen hier etwas Licht ins Dunkel bringen können?

Danke




dominik

Sorry für die späte Rückmeldung. Neue Threads "finde" ich leider nicht gleich.

Probier mal
sudo -u fhem pip3 install tflit

Da solltest du dann sehen was los ist.
fhempy -  https://github.com/fhempy/fhempy: GoogleCast, Tuya, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik