fhempy: googlecast

Begonnen von dominik, 04 Dezember 2020, 23:33:53

Vorheriges Thema - Nächstes Thema

StephanFHEM

#300
ich bekomme seit einigen Tagen wieder folgende Fehlermeldung im Log. Mein Pythonbinding startet alle paar Sekunden neu
OSError: [Errno 98] error while attempting to bind on address ('0.0.0.0', 15733): address already in use

Klingt danach, als ob an dem Port schon etwas laufen sollte. Hab schon mögliche andere fhempy-versionen deinstalliert, div. neustarts und auch versucht mit Kill die PIDs zu beenden... ich komme nicht weiter. der fehler geht einfach nicht weg

erledigt. Hab die Definitionen in FHEM jetzt auch gelöscht.. dann sudo reboot.. und alles neu eingerichtet. jetzt läuft es wieder

dominik

Hast du vielleicht bei der Installation nicht nur in FHEM installiert, sondern auch systemd eingerichtet? Weil dann startet systemd den Dienst statt FHEM. Wenn es dann in FHEM ebenfalls eingerichtet wird, kommt der Fehler.
fhempy -  https://github.com/fhempy/fhempy: GoogleCast, Tuya, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik

StephanFHEM

Dachte ich auch erst und beim deinstallieren in Raspbian hatte er auch noch eine alte Version gefunden. Aber komischerweise lief es dann erst nach dem Kompletten reboot (verstehe ich ja noch) und es ist auch erst seit ca einer Woche zu dem Fehler gekommen und ich habe vorher nichts geändert.... Dann hätte es ja davor auch schon nicht laufen dürfen

Tsadan

Zitat von: dominik am 28 Oktober 2021, 23:04:26
Ich habe gerade 0.1.166 released, bitte um test dieser Version ob der Fehler weiterhin auftritt.

Ich kann nun auch endlich bestätigen, dass das Problem mit in der Google Home App nicht konfigurierbaren Google Home Minis mit der Version 0.1.166 behoben ist.

Gruß
Tsadan

a_quadrat

Hallo zusammen,

mit Release 0.1.168 funktioniert "speak" bei mir nicht mehr. Kann das jemand bestätigen?

VG Andreas

SouzA

Zitat von: a_quadrat am 04 November 2021, 11:04:05
Hallo zusammen,

mit Release 0.1.168 funktioniert "speak" bei mir nicht mehr. Kann das jemand bestätigen?

VG Andreas
Kann bestätigen, dass es nicht funktioniert. Allerdings nicht ab welchem Release. Habe es nicht in Nutzung.

Weiterhin erscheint der log von fhempy jeden Tag erneut in "Unsorted".
Hat es jemand hingekriegt diesem Ding einen Room auf Dauer zuzuweisen?

Thx und bis denn
SouzA
Raspi 4, EnOcean TCM310 USB, HM-MOD-UART-USB, Jeelink, hue, AMAD, fully, FRITZBOX, Signalbot, VIERA, Presence BT/Mac, TPLink, Gassistant, Shelly, fhempy, ZigBee

Sommerfeld

ZitatHallo zusammen,

mit Release 0.1.168 funktioniert "speak" bei mir nicht mehr. Kann das jemand bestätigen?

VG Andreas

Kann ich auch bestätigen

dominik

Danke für die Info. Habe es behoben...Release 0.1.172
fhempy -  https://github.com/fhempy/fhempy: GoogleCast, Tuya, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik

Sommerfeld

ZitatDanke für die Info. Habe es behoben...Release 0.1.172
speak geht wieder, vielen Dank
V G

caldir65

Hallo,

ich habe gerade fhempy und googlecast für mich entdeckt und gemäß Anleitung (bis zum Schritt "Usage in fhem") auf dem Raspi4 (mit RaspiOS buster) neben fhem installiert. Der fempyserver_15733 und local_phybinding werden auch angelegt und nach kurzer Zeit als betriebsbereit angezeigt.

Leider bekomme ich bei dem cast-Device nur ein "server ist offline" angezeigt.

Ein Blick ins fhempy-Log bring wiederholt diese Einträge:

2021-11-07 12:37:47,228 - INFO     - __main__: Attempting install of fhempy>=0.1.12
2021-11-07 12:38:14,225 - ERROR    - __main__: Unable to install package fhempy>=0.1.12: The directory '/mnt/SSD/fhem/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/opt/fhem/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Could not install packages due to an EnvironmentError: [Errno 13] Keine Berechtigung: '/opt/fhem/.local'
Check the permissions.
2021-11-07 12:38:14,226 - ERROR    - __main__: Failed to install fhempy, exit now...
2021-11-07 12:39:14,525 - WARNING  - __main__: Failed to load fhempy: No module named 'fhempy'


Im fhem-Log steht
021.11.07 13:13:12.064 3: fhempyserver_15733: starting
2021.11.07 13:13:12.111 3: fhempyserver_15733: using logfile: ./log/fhempy-2021-11-07.log
2021.11.07 13:14:39.133 3: fhempyserver_15733: read: end of file reached while sysread
2021.11.07 13:14:39.135 3: fhempyserver_15733: stopped


Die Devices:
Internals:
   DEF        0
   FD         24
   FUUID      6187a7cd-f33f-378b-5681-188f14d7c4ae2531
   FVERSION   10_fhempyServer.pm:0.182830/2019-01-16
   LAST_START 2021-11-07 13:22:02
   LAST_STOP  2021-11-07 13:22:02
   NAME       fhempyserver_15733
   NR         1675
   NTFY_ORDER 50-fhempyserver_15733
   PID        4672
   STARTS     44
   STATE      ???
   TYPE       fhempyServer
   currentlogfile ./log/fhempy-2021-11-07.log
   logfile    ./log/fhempy-%Y-%m-%d.log
   CoProcess:
     cmdFn      fhempyServer_getCmd
     name       fhempy
     state      running FHEM/bindings/python/bin/fhempy
   READINGS:
     2021-11-07 13:22:02   fhempy          running FHEM/bindings/python/bin/fhempy
Attributes:
   DbLogExclude .*
   devStateIcon {      my $status_img = "10px-kreis-gruen";;      my $status_txt = "running";;      if (substr(ReadingsVal($name, "fhempy", "running"),0,7) ne "running") {        $status_img = "10px-kreis-rot";;        $status_txt = "stopped";;      }      "<div><a>".FW_makeImage($status_img, $status_txt)."</a><a  href=\"/fhem?cmd.dummy=set $name restart&XHR=1\" title=\"Restart\">".FW_makeImage("audio_repeat")."</a></div>"      }
   group      fhempy
   icon       python
   logfile    ./log/fhempy-%Y-%m-%d.log
   nrarchive  10
   room       fhempy

und
Internals:
   BindingType fhempy
   CFGFN     
   DEF        fhempy
   DeviceName ws:127.0.0.1:15733
   FUUID      6187b567-f33f-378b-6ed0-f25d72eb84d45770
   IP         127.0.0.1
   NAME       local_pybinding
   NR         1761
   NTFY_ORDER 50-local_pybinding
   PORT       15733
   STATE      fhempy server offline
   TYPE       BindingsIo
   localBinding 1
   nextOpenDelay 10
   READINGS:
     2021-11-07 13:12:23   state           fhempy server offline
   args:
     local_pybinding
     BindingsIo
     fhempy
   argsh:
Attributes:
   DbLogExclude .*
   devStateIcon {      my $status_img = "10px-kreis-gruen";;      my $status_txt = "connected";;      if (ReadingsVal($name, "state", "disconnected") eq "disconnected") {        $status_img = "10px-kreis-rot";;        $status_txt = "disconnected";;      }      my $ver = ReadingsVal($name, "version", "-");;      "<div><a>".FW_makeImage($status_img, $status_txt)."</a><a> ".$ver." </a><a  href=\"/fhem?cmd.dummy=set $name update&XHR=1\" title=\"Start update\">".FW_makeImage("refresh")."</a></div>"    }
   group      fhempy
   icon       file_json-ld2
   room       fhempy
sowie das Cast-DeviceInternals:
   DEF        googlecast Badezimmer
   FHEMPYTYPE googlecast
   FUUID      6187b265-f33f-378b-e5b1-5ef7a05cdc06708f
   FVERSION   10_fhempy.pm:0.182830/2019-01-16
   IODev      pybinding
   NAME       cast.Badezimmer
   NR         1680
   PYTHONTYPE googlecast
   STATE      fhempy server offline
   TYPE       fhempy
   READINGS:
     2021-11-07 13:24:14   state           fhempy server offline
   args:
     cast.Badezimmer
     fhempy
     googlecast
     Badezimmer
   argsh:
Attributes:
   DbLogExclude .*
   room       fhempy


Gruß, Christoph
Alte Techniker-Regel: "kaum macht man es richtig, funktioniert es auch"
------
Dell Wyse5070 ThinClient 16GBRam, 64GB SSD, Lubuntu 22.04LTS, fhem (aktuell), debmatic, Homematic-Devs, ConBee II und deConz, viele Shellys, Rademacher, NextCloud-Anbindung, FullyKioskBrowser+FUIP uvm.

dominik

Hi

ZitatThe directory '/opt/fhem/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Could not install packages due to an EnvironmentError: [Errno 13] Keine Berechtigung: '/opt/fhem/.local'

Hast du vielleicht irgendwo mal sudo verwendet? sudo brauchst du bei pip normal nie zu verwenden.
Mach mal
chown -R fhem:dialout /opt/fhem/.local
fhempy -  https://github.com/fhempy/fhempy: GoogleCast, Tuya, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik

caldir65

Zitat von: dominik am 07 November 2021, 15:02:54

chown -R fhem:dialout /opt/fhem/.local

chown: Zugriff auf '/opt/fhem/.local' nicht möglich: Datei oder Verzeichnis nicht gefunden

Ich habe jetzt einmal folgendes probiert:
pi@raspi-fhem:/opt/fhem $ touch .local
pi@raspi-fhem:/opt/fhem $ sudo chown -R fhem:dialout /opt/fhem/.local

und das ergebnis im Log:2021-11-07 16:28:31,766 - INFO     - __main__: Attempting install of fhempy>=0.1.12
2021-11-07 16:28:58,536 - ERROR    - __main__: Unable to install package fhempy>=0.1.12: The directory '/mnt/SSD/fhem/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/opt/fhem/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Could not install packages due to an EnvironmentError: [Errno 17] Die Datei existiert bereits: '/opt/fhem/.local'
2021-11-07 16:28:58,537 - ERROR    - __main__: Failed to install fhempy, exit now...
[/]
Alte Techniker-Regel: "kaum macht man es richtig, funktioniert es auch"
------
Dell Wyse5070 ThinClient 16GBRam, 64GB SSD, Lubuntu 22.04LTS, fhem (aktuell), debmatic, Homematic-Devs, ConBee II und deConz, viele Shellys, Rademacher, NextCloud-Anbindung, FullyKioskBrowser+FUIP uvm.

dominik

Lösch mal
/opt/fhem/.local
/opt/fhem/.cache/pip
Und die Devices fhempyServer und BindingsIo.

Danach machst nochmals ein define vom BindingsIo wie im Readme.
fhempy -  https://github.com/fhempy/fhempy: GoogleCast, Tuya, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik

caldir65

#313
Leider nicht besser
2021-11-07 19:02:22,763 - INFO     - __main__: Attempting install of fhempy>=0.1.12
2021-11-07 19:02:50,354 - ERROR    - __main__: Unable to install package fhempy>=0.1.12: The directory '/mnt/SSD/fhem/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/opt/fhem/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Could not install packages due to an EnvironmentError: [Errno 13] Keine Berechtigung: '/opt/fhem/.local'
Check the permissions.
2021-11-07 19:02:50,354 - ERROR    - __main__: Failed to install fhempy, exit now...
2021-11-07 19:03:50,644 - WARNING  - __main__: Failed to load fhempy: No module named 'fhempy'

Btw. ich habe fhem auf einer dritten Patrition, und diese Installation per Symlink nach /opt/fhem verbunden - macht sonst keine Probleme bei fhem. Könnte es hier ein Problem sein?
-- edit:
Ja, scheinbar war da noch etwas - das original Verzeichnis hatte Owner pi.pi - habe ich auch noch einmal angepasst, alles gelöscht und noch einmal angelegt, jetzt sieht das Log so aus:
2021-11-07 19:07:14,252 - ERROR    - __main__: Failed to install fhempy, exit now...
2021-11-07 19:08:14,446 - WARNING  - __main__: Failed to load fhempy: No module named 'fhempy'
2021-11-07 19:08:14,447 - INFO     - __main__: Attempting install of fhempy>=0.1.12
2021-11-07 19:08:48,570 - INFO     - __main__: Successfully installed fhempy>=0.1.12
2021-11-07 19:08:48,571 - ERROR    - __main__: Failed to import fhempy, exit now...
2021-11-07 19:10:44,090 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy...
2021-11-07 19:10:44,106 - INFO     - fhempy.lib.pkg_installer: Attempting install of async-upnp-client==0.20.0
2021-11-07 19:10:50,576 - INFO     - fhempy.lib.pkg_installer: Successfully installed async-upnp-client==0.20.0 update!
2021-11-07 19:10:50,579 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
2021-11-07 19:10:50,654 - INFO     - websockets.server: server listening on 0.0.0.0:15733


Im fhem-Log:
2021.11.07 19:10:42.190 3: BindingsIo v1.0.0
2021.11.07 19:10:42.193 3: fhempyServer v1.0.0
2021.11.07 19:10:42.206 3: fhempyserver_15733: starting
2021.11.07 19:10:42.224 3: fhempyserver_15733: using logfile: ./log/fhempy-2021-11-07.log
2021.11.07 19:10:42.302 3: defmod -temporary fhempy_log FileLog ./log/fhempy-%Y-%m-%d.log fakelog : Define -temporary first
2021.11.07 19:10:42.843 3: fhempyserver_15733: read: end of file reached while sysread
2021.11.07 19:10:42.844 3: fhempyserver_15733: stopped
2021.11.07 19:10:42.860 3: fhempyserver_15733: starting
2021.11.07 19:10:42.882 3: fhempyserver_15733: using logfile: ./log/fhempy-2021-11-07.log
2021.11.07 19:10:45.566 3: Opening local_pybinding device ws:127.0.0.1:15733
2021.11.07 19:10:45.568 1: local_pybinding: Can't connect to ws:127.0.0.1:15733: Operation now in progress
2021.11.07 19:10:45.574 1: local_pybinding: Can't connect to ws:127.0.0.1:15733: 127.0.0.1: Verbindungsaufbau abgelehnt (111)
2021.11.07 19:10:45.574 1: BindingsIo (local_pybinding): ERROR local_pybinding - error while connecting: 127.0.0.1: Verbindungsaufbau abgelehnt (111)
2021.11.07 19:13:28.218 3: fhempy v1.0.0 (googlecast)
2021.11.07 19:13:45.963 3: fhempy v1.0.0 (googlecast)
Alte Techniker-Regel: "kaum macht man es richtig, funktioniert es auch"
------
Dell Wyse5070 ThinClient 16GBRam, 64GB SSD, Lubuntu 22.04LTS, fhem (aktuell), debmatic, Homematic-Devs, ConBee II und deConz, viele Shellys, Rademacher, NextCloud-Anbindung, FullyKioskBrowser+FUIP uvm.

dominik

Sehr gut, nach ein paar Sekunden, bis zu einer Minute, sollte das BindungsIo Device auf opened stehen. Dann kannst Googlecast anlegen.
fhempy -  https://github.com/fhempy/fhempy: GoogleCast, Tuya, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik