Autor Thema: fhempy: googlecast  (Gelesen 24554 mal)

Offline dominik

  • Developer
  • Hero Member
  • ****
  • Beiträge: 2872
Antw:fhempy: googlecast
« Antwort #15 am: 28 Dezember 2020, 15:35:22 »
Hi,
mach bitte Mal
sudo -u fhem pip3 uninstall fhempyUnd starte danach FHEM neu.
fhempy -  https://github.com/dominikkarall/fhempy: GoogleCast, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik

Offline benedikt-wue

  • New Member
  • *
  • Beiträge: 49
Antw:fhempy: googlecast
« Antwort #16 am: 28 Dezember 2020, 17:06:39 »
Das war die Lösung, jetzt kann ich mich weiter reinfuchsen! Vielen Dank!

edit:
spotify_user
attr spotify_sp... required

aber bin nach Anleitung vorgegangen... abspielen tut er die Beispiel - Playlist leider nicht

edit2:
naja, vielleicht sollte ich geduldiger werden und FHEM einfach nochmal neu starten :-) Außerdem sind Seiler und Speer eine hervorragende Wahl :-)
« Letzte Änderung: 28 Dezember 2020, 17:21:50 von benedikt-wue »

Offline dominik

  • Developer
  • Hero Member
  • ****
  • Beiträge: 2872
Antw:fhempy: googlecast
« Antwort #17 am: 28 Dezember 2020, 18:06:45 »
 :)) Eigentlich sollte es auch ohne Neustart gehen, das muss ich mir nochmals ansehen.
fhempy -  https://github.com/dominikkarall/fhempy: GoogleCast, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik

Offline ReneH87

  • Jr. Member
  • **
  • Beiträge: 97
Antw:fhempy: googlecast
« Antwort #18 am: 29 Dezember 2020, 14:21:22 »
So, nach einigem Probieren hab ichs jetzt auch am Laufen :)

Musste allerdings aiohttp, pychromecast, spotipy, spotify_token und youtube_dl manuell installieren. Evtl. weil ich die Remote Variante am Laufen habe auf dem separaten raspi?

Ansonsten mal noch eine andere Frage: gibts die Möglichkeit, dass er nach einem "speak" Befehl mit dem vorher laufenden Stream weitermacht? Bisher hab ich mir damit beholfen, dass ich vor dem Befehl die "mediaContentId" merke und danach die URL mit "play" wieder abspiele. Funktioniert, hat aber den Nachteil, dass Cover, Texte usw. nicht mehr angezeigt werden.

Offline dominik

  • Developer
  • Hero Member
  • ****
  • Beiträge: 2872
Antw:fhempy: googlecast
« Antwort #19 am: 29 Dezember 2020, 15:09:08 »
Hi,
ja, sollte machbar sein, zumindest für Streams.

Kannst du mir mal ein Log posten wo eines der Packages nicht installiert war? Das sollte sich immer von selbst installieren.
fhempy -  https://github.com/dominikkarall/fhempy: GoogleCast, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik

Offline ReneH87

  • Jr. Member
  • **
  • Beiträge: 97
Antw:fhempy: googlecast
« Antwort #20 am: 29 Dezember 2020, 15:36:04 »
Auf dem remote Pybinding war nichts in den Logs, weder Fehler, noch andere Log Einträge zu dem Zeitpunkt. Der Fehler war immer nur innerhalb von fhem zu sehen, beim Defininieren des Cast Devices bzw. dann innerhalb vom neuen Cast Device. Davon hab ich leider keinen Log Auszug, aber im Prinzip war immer nur der Teil zu sehen, dass eines der Pakete gefehlt hat.

Offline dominik

  • Developer
  • Hero Member
  • ****
  • Beiträge: 2872
Antw:fhempy: googlecast
« Antwort #21 am: 29 Dezember 2020, 16:15:11 »
journalctl -u fhempy
Sollte dir am remote peer das Log anzeigen, vielleicht findest du da noch was. Es sollte stehen, Installation failed oder so.
fhempy -  https://github.com/dominikkarall/fhempy: GoogleCast, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik

Offline ReneH87

  • Jr. Member
  • **
  • Beiträge: 97
Antw:fhempy: googlecast
« Antwort #22 am: 29 Dezember 2020, 19:00:06 »
Ich hab mal alles von heute hier reinkopiert, ich kann darin nichts in der Richtung finden. Hatte auch während dem Einrichten "journalctl -fu fhempy" am Laufen und da kamen zu dem Zeitpunkt keine neuen Zeilen dazu

Dec 29 12:49:02 raspberrypi systemd[1]: Started FHEM PythonBinding.
Dec 29 12:49:05 raspberrypi fhempy[2510]: 2020-12-29 12:49:05,963 - INFO     - lib.fhem_pythonbinding: Starting pythonbinding...
Dec 29 12:49:15 raspberrypi fhempy[2510]: 2020-12-29 12:49:15,764 - INFO     - lib.fhem_pythonbinding: FHEM connection started: 192.168.5.2
Dec 29 12:49:15 raspberrypi fhempy[2510]: 2020-12-29 12:49:15,796 - INFO     - lib.fhem_pythonbinding: FHEM connection started: 192.168.5.2
Dec 29 12:49:16 raspberrypi fhempy[2510]: 2020-12-29 12:49:16,488 - ERROR    - lib.fhem_pythonbinding: Connection closed error
Dec 29 12:49:16 raspberrypi fhempy[2510]: Traceback (most recent call last):
Dec 29 12:49:16 raspberrypi fhempy[2510]:   File "/home/pi/.local/lib/python3.7/site-packages/websockets/protocol.py", line 827, in transfer_data
Dec 29 12:49:16 raspberrypi fhempy[2510]:     message = await self.read_message()
Dec 29 12:49:16 raspberrypi fhempy[2510]:   File "/home/pi/.local/lib/python3.7/site-packages/websockets/protocol.py", line 895, in read_message
Dec 29 12:49:16 raspberrypi fhempy[2510]:     frame = await self.read_data_frame(max_size=self.max_size)
Dec 29 12:49:16 raspberrypi fhempy[2510]:   File "/home/pi/.local/lib/python3.7/site-packages/websockets/protocol.py", line 971, in read_data_frame
Dec 29 12:49:16 raspberrypi fhempy[2510]:     frame = await self.read_frame(max_size)
Dec 29 12:49:16 raspberrypi fhempy[2510]:   File "/home/pi/.local/lib/python3.7/site-packages/websockets/protocol.py", line 1051, in read_frame
Dec 29 12:49:16 raspberrypi fhempy[2510]:     extensions=self.extensions,
Dec 29 12:49:16 raspberrypi fhempy[2510]:   File "/home/pi/.local/lib/python3.7/site-packages/websockets/framing.py", line 105, in read
Dec 29 12:49:16 raspberrypi fhempy[2510]:     data = await reader(2)
Dec 29 12:49:16 raspberrypi fhempy[2510]:   File "/usr/lib/python3.7/asyncio/streams.py", line 677, in readexactly
Dec 29 12:49:16 raspberrypi fhempy[2510]:     raise IncompleteReadError(incomplete, n)
Dec 29 12:49:16 raspberrypi fhempy[2510]: asyncio.streams.IncompleteReadError: 0 bytes read on a total of 2 expected bytes
Dec 29 12:49:16 raspberrypi fhempy[2510]: The above exception was the direct cause of the following exception:
Dec 29 12:49:16 raspberrypi fhempy[2510]: Traceback (most recent call last):
Dec 29 12:49:16 raspberrypi fhempy[2510]:   File "/usr/local/lib/python3.7/dist-packages/lib/fhem_pythonbinding.py", line 42, in pybinding
Dec 29 12:49:16 raspberrypi fhempy[2510]:     async for message in websocket:
Dec 29 12:49:16 raspberrypi fhempy[2510]:   File "/home/pi/.local/lib/python3.7/site-packages/websockets/protocol.py", line 439, in __aiter__
Dec 29 12:49:16 raspberrypi fhempy[2510]:     yield await self.recv()
Dec 29 12:49:16 raspberrypi fhempy[2510]:   File "/home/pi/.local/lib/python3.7/site-packages/websockets/protocol.py", line 509, in recv
Dec 29 12:49:16 raspberrypi fhempy[2510]:     await self.ensure_open()
Dec 29 12:49:16 raspberrypi fhempy[2510]:   File "/home/pi/.local/lib/python3.7/site-packages/websockets/protocol.py", line 803, in ensure_open
Dec 29 12:49:16 raspberrypi fhempy[2510]:     raise self.connection_closed_exc()
Dec 29 12:49:16 raspberrypi fhempy[2510]: websockets.exceptions.ConnectionClosedError: code = 1006 (connection closed abnormally [internal]), no reason
Dec 29 12:49:16 raspberrypi fhempy[2510]: 2020-12-29 12:49:16,512 - INFO     - lib.fhem_pythonbinding: Restart binding
Dec 29 12:49:16 raspberrypi systemd[1]: fhempy.service: Main process exited, code=exited, status=1/FAILURE
Dec 29 12:49:16 raspberrypi systemd[1]: fhempy.service: Failed with result 'exit-code'.
Dec 29 12:49:17 raspberrypi systemd[1]: fhempy.service: Service RestartSec=100ms expired, scheduling restart.
Dec 29 12:49:17 raspberrypi systemd[1]: fhempy.service: Scheduled restart job, restart counter is at 6.
Dec 29 12:49:17 raspberrypi systemd[1]: Stopped FHEM PythonBinding.
Dec 29 12:49:17 raspberrypi systemd[1]: Started FHEM PythonBinding.
Dec 29 12:49:20 raspberrypi fhempy[2512]: 2020-12-29 12:49:20,991 - INFO     - lib.fhem_pythonbinding: Starting pythonbinding...
Dec 29 12:49:27 raspberrypi fhempy[2512]: 2020-12-29 12:49:27,019 - INFO     - lib.fhem_pythonbinding: FHEM connection started: 192.168.5.2
Dec 29 12:51:35 raspberrypi fhempy[2512]: 2020-12-29 12:51:35,905 - ERROR    - lib.fhem_pythonbinding: Failed to handle message:
Dec 29 12:51:35 raspberrypi fhempy[2512]: Traceback (most recent call last):
Dec 29 12:51:35 raspberrypi fhempy[2512]:   File "/usr/local/lib/python3.7/dist-packages/lib/fhem_pythonbinding.py", line 279, in _onMessage
Dec 29 12:51:35 raspberrypi fhempy[2512]:     nmInstance = loadedModuleInstances[hash["NAME"]]
Dec 29 12:51:35 raspberrypi fhempy[2512]: KeyError: 'SmartDisplay'
Dec 29 12:53:46 raspberrypi fhempy[2512]: 2020-12-29 12:53:46,361 - ERROR    - lib.fhem_pythonbinding: Failed to handle message:
Dec 29 12:53:46 raspberrypi fhempy[2512]: Traceback (most recent call last):
Dec 29 12:53:46 raspberrypi fhempy[2512]:   File "/usr/local/lib/python3.7/dist-packages/lib/fhem_pythonbinding.py", line 279, in _onMessage
Dec 29 12:53:46 raspberrypi fhempy[2512]:     nmInstance = loadedModuleInstances[hash["NAME"]]
Dec 29 12:53:46 raspberrypi fhempy[2512]: KeyError: 'SmartDisplay'
Dec 29 12:55:01 raspberrypi fhempy[2512]: 2020-12-29 12:55:01,115 - ERROR    - lib.fhem_pythonbinding: Connection closed error
Dec 29 12:55:01 raspberrypi fhempy[2512]: Traceback (most recent call last):
Dec 29 12:55:01 raspberrypi fhempy[2512]:   File "/home/pi/.local/lib/python3.7/site-packages/websockets/protocol.py", line 827, in transfer_data
Dec 29 12:55:01 raspberrypi fhempy[2512]:     message = await self.read_message()
Dec 29 12:55:01 raspberrypi fhempy[2512]:   File "/home/pi/.local/lib/python3.7/site-packages/websockets/protocol.py", line 895, in read_message
Dec 29 12:55:01 raspberrypi fhempy[2512]:     frame = await self.read_data_frame(max_size=self.max_size)
Dec 29 12:55:01 raspberrypi fhempy[2512]:   File "/home/pi/.local/lib/python3.7/site-packages/websockets/protocol.py", line 971, in read_data_frame
Dec 29 12:55:01 raspberrypi fhempy[2512]:     frame = await self.read_frame(max_size)
Dec 29 12:55:01 raspberrypi fhempy[2512]:   File "/home/pi/.local/lib/python3.7/site-packages/websockets/protocol.py", line 1051, in read_frame
Dec 29 12:55:01 raspberrypi fhempy[2512]:     extensions=self.extensions,
Dec 29 12:55:01 raspberrypi fhempy[2512]:   File "/home/pi/.local/lib/python3.7/site-packages/websockets/framing.py", line 105, in read
Dec 29 12:55:01 raspberrypi fhempy[2512]:     data = await reader(2)
Dec 29 12:55:01 raspberrypi fhempy[2512]:   File "/usr/lib/python3.7/asyncio/streams.py", line 677, in readexactly
Dec 29 12:55:01 raspberrypi fhempy[2512]:     raise IncompleteReadError(incomplete, n)
Dec 29 12:55:01 raspberrypi fhempy[2512]: asyncio.streams.IncompleteReadError: 0 bytes read on a total of 2 expected bytes
Dec 29 12:55:01 raspberrypi fhempy[2512]: The above exception was the direct cause of the following exception:
Dec 29 12:55:01 raspberrypi fhempy[2512]: Traceback (most recent call last):
Dec 29 12:55:01 raspberrypi fhempy[2512]:   File "/usr/local/lib/python3.7/dist-packages/lib/fhem_pythonbinding.py", line 42, in pybinding
Dec 29 12:55:01 raspberrypi fhempy[2512]:     async for message in websocket:
Dec 29 12:55:01 raspberrypi fhempy[2512]:   File "/home/pi/.local/lib/python3.7/site-packages/websockets/protocol.py", line 439, in __aiter__
Dec 29 12:55:01 raspberrypi fhempy[2512]:     yield await self.recv()
Dec 29 12:55:01 raspberrypi fhempy[2512]:   File "/home/pi/.local/lib/python3.7/site-packages/websockets/protocol.py", line 509, in recv
Dec 29 12:55:01 raspberrypi fhempy[2512]:     await self.ensure_open()
Dec 29 12:55:01 raspberrypi fhempy[2512]:   File "/home/pi/.local/lib/python3.7/site-packages/websockets/protocol.py", line 803, in ensure_open
Dec 29 12:55:01 raspberrypi fhempy[2512]:     raise self.connection_closed_exc()
Dec 29 12:55:01 raspberrypi fhempy[2512]: websockets.exceptions.ConnectionClosedError: code = 1006 (connection closed abnormally [internal]), no reason
Dec 29 12:55:01 raspberrypi fhempy[2512]: 2020-12-29 12:55:01,136 - INFO     - lib.fhem_pythonbinding: Restart binding
Dec 29 12:55:01 raspberrypi systemd[1]: fhempy.service: Main process exited, code=exited, status=1/FAILURE
Dec 29 12:55:01 raspberrypi systemd[1]: fhempy.service: Failed with result 'exit-code'.
Dec 29 12:55:01 raspberrypi systemd[1]: fhempy.service: Service RestartSec=100ms expired, scheduling restart.
Dec 29 12:55:01 raspberrypi systemd[1]: fhempy.service: Scheduled restart job, restart counter is at 7.
Dec 29 12:55:01 raspberrypi systemd[1]: Stopped FHEM PythonBinding.
Dec 29 12:55:01 raspberrypi systemd[1]: Started FHEM PythonBinding.
Dec 29 12:55:05 raspberrypi fhempy[2526]: 2020-12-29 12:55:05,464 - INFO     - lib.fhem_pythonbinding: Starting pythonbinding...
Dec 29 12:55:25 raspberrypi fhempy[2526]: 2020-12-29 12:55:25,512 - INFO     - lib.fhem_pythonbinding: FHEM connection started: 192.168.5.2
Dec 29 13:00:36 raspberrypi fhempy[2526]: 2020-12-29 13:00:36,211 - ERROR    - lib.fhem_pythonbinding: Failed to handle message:
Dec 29 13:00:36 raspberrypi fhempy[2526]: Traceback (most recent call last):
Dec 29 13:00:36 raspberrypi fhempy[2526]:   File "/usr/local/lib/python3.7/dist-packages/lib/fhem_pythonbinding.py", line 279, in _onMessage
Dec 29 13:00:36 raspberrypi fhempy[2526]:     nmInstance = loadedModuleInstances[hash["NAME"]]
Dec 29 13:00:36 raspberrypi fhempy[2526]: KeyError: 'SmartDisplay'
Dec 29 13:00:47 raspberrypi fhempy[2526]: 2020-12-29 13:00:47,992 - ERROR    - lib.fhem_pythonbinding: Failed to handle message:
Dec 29 13:00:47 raspberrypi fhempy[2526]: Traceback (most recent call last):
Dec 29 13:00:47 raspberrypi fhempy[2526]:   File "/usr/local/lib/python3.7/dist-packages/lib/fhem_pythonbinding.py", line 279, in _onMessage
Dec 29 13:00:47 raspberrypi fhempy[2526]:     nmInstance = loadedModuleInstances[hash["NAME"]]
Dec 29 13:00:47 raspberrypi fhempy[2526]: KeyError: 'SmartDisplay'
Dec 29 13:01:03 raspberrypi fhempy[2526]: 2020-12-29 13:01:03,306 - ERROR    - lib.fhem_pythonbinding: Failed to handle message:
Dec 29 13:01:03 raspberrypi fhempy[2526]: Traceback (most recent call last):
Dec 29 13:01:03 raspberrypi fhempy[2526]:   File "/usr/local/lib/python3.7/dist-packages/lib/fhem_pythonbinding.py", line 279, in _onMessage
Dec 29 13:01:03 raspberrypi fhempy[2526]:     nmInstance = loadedModuleInstances[hash["NAME"]]
Dec 29 13:01:03 raspberrypi fhempy[2526]: KeyError: 'SmartDisplay'
Dec 29 13:35:46 raspberrypi systemd[1]: Stopping FHEM PythonBinding...
Dec 29 13:35:46 raspberrypi systemd[1]: fhempy.service: Main process exited, code=killed, status=15/TERM
Dec 29 13:35:46 raspberrypi systemd[1]: fhempy.service: Succeeded.
Dec 29 13:35:46 raspberrypi systemd[1]: Stopped FHEM PythonBinding.
Dec 29 13:35:46 raspberrypi systemd[1]: Started FHEM PythonBinding.
Dec 29 13:35:51 raspberrypi fhempy[5355]: 2020-12-29 13:35:51,322 - INFO     - lib.fhem_pythonbinding: Starting pythonbinding...
Dec 29 13:35:57 raspberrypi fhempy[5355]: 2020-12-29 13:35:57,103 - INFO     - lib.fhem_pythonbinding: FHEM connection started: 192.168.5.2
Dec 29 13:36:18 raspberrypi fhempy[5355]: 2020-12-29 13:36:18,304 - ERROR    - pygatt.backends.gatttool.gatttool: Timed out connecting to E8:65:F3:5F:7F:F7 after 20 seconds.
Dec 29 13:36:43 raspberrypi fhempy[5355]: 2020-12-29 13:36:43,825 - ERROR    - pygatt.backends.gatttool.gatttool: Timed out connecting to E8:65:F3:5F:7F:F7 after 20 seconds.
Dec 29 13:37:09 raspberrypi fhempy[5355]: 2020-12-29 13:37:09,347 - ERROR    - pygatt.backends.gatttool.gatttool: Timed out connecting to E8:65:F3:5F:7F:F7 after 20 seconds.
Dec 29 13:37:11 raspberrypi fhempy[5355]: 2020-12-29 13:37:11,123 - ERROR    - lib.fhem_pythonbinding: Failed to handle message:
Dec 29 13:37:11 raspberrypi fhempy[5355]: Traceback (most recent call last):
Dec 29 13:37:11 raspberrypi fhempy[5355]:   File "/usr/local/lib/python3.7/dist-packages/lib/fhem_pythonbinding.py", line 279, in _onMessage
Dec 29 13:37:11 raspberrypi fhempy[5355]:     nmInstance = loadedModuleInstances[hash["NAME"]]
Dec 29 13:37:11 raspberrypi fhempy[5355]: KeyError: 'SmartDisplay'
Dec 29 13:37:34 raspberrypi fhempy[5355]: 2020-12-29 13:37:34,917 - ERROR    - pygatt.backends.gatttool.gatttool: Timed out connecting to E8:65:F3:5F:7F:F7 after 20 seconds.
Dec 29 13:37:39 raspberrypi fhempy[5355]: 2020-12-29 13:37:39,926 - ERROR    - nespresso_ble: Failed to get_info, more than 3 times
Dec 29 13:44:41 raspberrypi systemd[1]: Stopping FHEM PythonBinding...
Dec 29 13:44:41 raspberrypi systemd[1]: fhempy.service: Main process exited, code=killed, status=15/TERM
Dec 29 13:44:41 raspberrypi systemd[1]: fhempy.service: Succeeded.
Dec 29 13:44:41 raspberrypi systemd[1]: Stopped FHEM PythonBinding.
Dec 29 13:44:41 raspberrypi systemd[1]: Started FHEM PythonBinding.
Dec 29 13:44:45 raspberrypi fhempy[5533]: 2020-12-29 13:44:45,882 - INFO     - lib.fhem_pythonbinding: Starting pythonbinding...
Dec 29 13:44:53 raspberrypi fhempy[5533]: 2020-12-29 13:44:53,987 - INFO     - lib.fhem_pythonbinding: FHEM connection started: 192.168.5.2
Dec 29 13:45:47 raspberrypi systemd[1]: Stopping FHEM PythonBinding...
Dec 29 13:45:47 raspberrypi systemd[1]: fhempy.service: Main process exited, code=killed, status=15/TERM
Dec 29 13:45:47 raspberrypi systemd[1]: fhempy.service: Succeeded.
Dec 29 13:45:47 raspberrypi systemd[1]: Stopped FHEM PythonBinding.
Dec 29 13:47:07 raspberrypi systemd[1]: Started FHEM PythonBinding.
Dec 29 13:47:09 raspberrypi fhempy[5559]: 2020-12-29 13:47:09,661 - INFO     - __main__: Attempting install of zeroconf>=0.28.6
Dec 29 13:48:03 raspberrypi fhempy[5559]: 2020-12-29 13:48:03,430 - INFO     - __main__: Successfully installed zeroconf>=0.28.6
Dec 29 13:48:06 raspberrypi fhempy[5559]: 2020-12-29 13:48:06,895 - INFO     - fhempy.lib.fhem_pythonbinding: Starting pythonbinding...
Dec 29 13:48:20 raspberrypi fhempy[5559]: 2020-12-29 13:48:20,960 - INFO     - fhempy.lib.fhem_pythonbinding: FHEM connection started: 192.168.5.2
Dec 29 13:48:29 raspberrypi systemd[1]: Stopping FHEM PythonBinding...
Dec 29 13:48:29 raspberrypi systemd[1]: fhempy.service: Main process exited, code=killed, status=15/TERM
Dec 29 13:48:29 raspberrypi systemd[1]: fhempy.service: Succeeded.
Dec 29 13:48:29 raspberrypi systemd[1]: Stopped FHEM PythonBinding.
Dec 29 13:48:29 raspberrypi systemd[1]: Started FHEM PythonBinding.
Dec 29 13:48:33 raspberrypi fhempy[5592]: 2020-12-29 13:48:33,946 - INFO     - fhempy.lib.fhem_pythonbinding: Starting pythonbinding...
Dec 29 13:48:41 raspberrypi fhempy[5592]: 2020-12-29 13:48:41,730 - INFO     - fhempy.lib.fhem_pythonbinding: FHEM connection started: 192.168.5.2
Dec 29 13:48:45 raspberrypi fhempy[5592]: 2020-12-29 13:48:45,394 - ERROR    - fhempy.lib.fhem_pythonbinding: Failed to handle message:
Dec 29 13:48:45 raspberrypi fhempy[5592]: Traceback (most recent call last):
Dec 29 13:48:45 raspberrypi fhempy[5592]:   File "/home/pi/.local/lib/python3.7/site-packages/fhempy/lib/fhem_pythonbinding.py", line 300, in _onMessage
Dec 29 13:48:45 raspberrypi fhempy[5592]:     nmInstance = loadedModuleInstances[hash["NAME"]]
Dec 29 13:48:45 raspberrypi fhempy[5592]: KeyError: 'SmartDisplay'
Dec 29 13:49:04 raspberrypi fhempy[5592]: 2020-12-29 13:49:04,669 - ERROR    - pygatt.backends.gatttool.gatttool: Timed out connecting to E8:65:F3:5F:7F:F7 after 20 seconds.
Dec 29 13:49:46 raspberrypi systemd[1]: Stopping FHEM PythonBinding...
Dec 29 13:49:46 raspberrypi systemd[1]: fhempy.service: Main process exited, code=killed, status=15/TERM
Dec 29 13:49:46 raspberrypi systemd[1]: fhempy.service: Succeeded.
Dec 29 13:49:46 raspberrypi systemd[1]: Stopped FHEM PythonBinding.
Dec 29 13:49:46 raspberrypi systemd[1]: Started FHEM PythonBinding.
Dec 29 13:49:50 raspberrypi fhempy[5616]: 2020-12-29 13:49:50,496 - INFO     - fhempy.lib.fhem_pythonbinding: Starting pythonbinding...
Dec 29 13:49:57 raspberrypi fhempy[5616]: 2020-12-29 13:49:57,194 - INFO     - fhempy.lib.fhem_pythonbinding: FHEM connection started: 192.168.5.2
Dec 29 13:53:31 raspberrypi fhempy[5616]: 2020-12-29 13:53:31,498 - ERROR    - fhempy.lib.fhem_pythonbinding: Failed to handle message:
Dec 29 13:53:31 raspberrypi fhempy[5616]: Traceback (most recent call last):
Dec 29 13:53:31 raspberrypi fhempy[5616]:   File "/home/pi/.local/lib/python3.7/site-packages/fhempy/lib/fhem_pythonbinding.py", line 300, in _onMessage
Dec 29 13:53:31 raspberrypi fhempy[5616]:     nmInstance = loadedModuleInstances[hash["NAME"]]
Dec 29 13:53:31 raspberrypi fhempy[5616]: KeyError: 'SmartDisplay'
Dec 29 13:53:55 raspberrypi fhempy[5616]: 2020-12-29 13:53:55,456 - ERROR    - fhempy.lib.fhem_pythonbinding: Failed to handle message:
Dec 29 13:53:55 raspberrypi fhempy[5616]: Traceback (most recent call last):
Dec 29 13:53:55 raspberrypi fhempy[5616]:   File "/home/pi/.local/lib/python3.7/site-packages/fhempy/lib/fhem_pythonbinding.py", line 300, in _onMessage
Dec 29 13:53:55 raspberrypi fhempy[5616]:     nmInstance = loadedModuleInstances[hash["NAME"]]
Dec 29 13:53:55 raspberrypi fhempy[5616]: KeyError: 'SmartDisplay'
Dec 29 13:54:09 raspberrypi systemd[1]: Stopping FHEM PythonBinding...
Dec 29 13:54:09 raspberrypi systemd[1]: fhempy.service: Main process exited, code=killed, status=15/TERM
Dec 29 13:54:09 raspberrypi systemd[1]: fhempy.service: Succeeded.
Dec 29 13:54:09 raspberrypi systemd[1]: Stopped FHEM PythonBinding.
Dec 29 13:54:09 raspberrypi systemd[1]: Started FHEM PythonBinding.
Dec 29 13:54:13 raspberrypi fhempy[5647]: 2020-12-29 13:54:13,834 - INFO     - fhempy.lib.fhem_pythonbinding: Starting pythonbinding...
Dec 29 13:54:21 raspberrypi fhempy[5647]: 2020-12-29 13:54:21,079 - INFO     - fhempy.lib.fhem_pythonbinding: FHEM connection started: 192.168.5.2
Dec 29 13:56:32 raspberrypi systemd[1]: Stopping FHEM PythonBinding...
Dec 29 13:56:32 raspberrypi systemd[1]: fhempy.service: Main process exited, code=killed, status=15/TERM
Dec 29 13:56:32 raspberrypi systemd[1]: fhempy.service: Succeeded.
Dec 29 13:56:32 raspberrypi systemd[1]: Stopped FHEM PythonBinding.
Dec 29 13:56:32 raspberrypi systemd[1]: Started FHEM PythonBinding.
Dec 29 13:56:37 raspberrypi fhempy[5673]: 2020-12-29 13:56:37,122 - INFO     - fhempy.lib.fhem_pythonbinding: Starting pythonbinding...
Dec 29 13:56:43 raspberrypi fhempy[5673]: 2020-12-29 13:56:43,114 - INFO     - fhempy.lib.fhem_pythonbinding: FHEM connection started: 192.168.5.2
Dec 29 13:56:47 raspberrypi fhempy[5673]: 2020-12-29 13:56:47,041 - ERROR    - fhempy.lib.fhem_pythonbinding: Failed to handle message:
Dec 29 13:56:47 raspberrypi fhempy[5673]: Traceback (most recent call last):
Dec 29 13:56:47 raspberrypi fhempy[5673]:   File "/home/pi/.local/lib/python3.7/site-packages/fhempy/lib/fhem_pythonbinding.py", line 300, in _onMessage
Dec 29 13:56:47 raspberrypi fhempy[5673]:     nmInstance = loadedModuleInstances[hash["NAME"]]
Dec 29 13:56:47 raspberrypi fhempy[5673]: KeyError: 'SmartDisplay'
Dec 29 13:57:13 raspberrypi fhempy[5673]: 2020-12-29 13:57:13,571 - ERROR    - fhempy.lib.fhem_pythonbinding: Failed to handle message:
Dec 29 13:57:13 raspberrypi fhempy[5673]: Traceback (most recent call last):
Dec 29 13:57:13 raspberrypi fhempy[5673]:   File "/home/pi/.local/lib/python3.7/site-packages/fhempy/lib/fhem_pythonbinding.py", line 300, in _onMessage
Dec 29 13:57:13 raspberrypi fhempy[5673]:     nmInstance = loadedModuleInstances[hash["NAME"]]
Dec 29 13:57:13 raspberrypi fhempy[5673]: KeyError: 'SmartDisplay'
Dec 29 13:57:21 raspberrypi systemd[1]: Stopping FHEM PythonBinding...
Dec 29 13:57:21 raspberrypi systemd[1]: fhempy.service: Main process exited, code=killed, status=15/TERM
Dec 29 13:57:21 raspberrypi systemd[1]: fhempy.service: Succeeded.
Dec 29 13:57:21 raspberrypi systemd[1]: Stopped FHEM PythonBinding.
Dec 29 13:57:21 raspberrypi systemd[1]: Started FHEM PythonBinding.
Dec 29 13:57:25 raspberrypi fhempy[5694]: 2020-12-29 13:57:25,488 - INFO     - fhempy.lib.fhem_pythonbinding: Starting pythonbinding...
Dec 29 13:57:31 raspberrypi fhempy[5694]: 2020-12-29 13:57:31,445 - INFO     - fhempy.lib.fhem_pythonbinding: FHEM connection started: 192.168.5.2
Dec 29 13:57:31 raspberrypi fhempy[5694]: 2020-12-29 13:57:31,516 - INFO     - fhempy.lib.fhem_pythonbinding: FHEM connection started: 192.168.5.2
Dec 29 13:57:32 raspberrypi fhempy[5694]: 2020-12-29 13:57:32,206 - ERROR    - fhempy.lib.fhem_pythonbinding: Connection closed error
Dec 29 13:57:32 raspberrypi fhempy[5694]: Traceback (most recent call last):
Dec 29 13:57:32 raspberrypi fhempy[5694]:   File "/home/pi/.local/lib/python3.7/site-packages/websockets/protocol.py", line 827, in transfer_data
Dec 29 13:57:32 raspberrypi fhempy[5694]:     message = await self.read_message()
Dec 29 13:57:32 raspberrypi fhempy[5694]:   File "/home/pi/.local/lib/python3.7/site-packages/websockets/protocol.py", line 895, in read_message
Dec 29 13:57:32 raspberrypi fhempy[5694]:     frame = await self.read_data_frame(max_size=self.max_size)
Dec 29 13:57:32 raspberrypi fhempy[5694]:   File "/home/pi/.local/lib/python3.7/site-packages/websockets/protocol.py", line 971, in read_data_frame
Dec 29 13:57:32 raspberrypi fhempy[5694]:     frame = await self.read_frame(max_size)
Dec 29 13:57:32 raspberrypi fhempy[5694]:   File "/home/pi/.local/lib/python3.7/site-packages/websockets/protocol.py", line 1051, in read_frame
Dec 29 13:57:32 raspberrypi fhempy[5694]:     extensions=self.extensions,
Dec 29 13:57:32 raspberrypi fhempy[5694]:   File "/home/pi/.local/lib/python3.7/site-packages/websockets/framing.py", line 105, in read
Dec 29 13:57:32 raspberrypi fhempy[5694]:     data = await reader(2)
Dec 29 13:57:32 raspberrypi fhempy[5694]:   File "/usr/lib/python3.7/asyncio/streams.py", line 677, in readexactly
Dec 29 13:57:32 raspberrypi fhempy[5694]:     raise IncompleteReadError(incomplete, n)
Dec 29 13:57:32 raspberrypi fhempy[5694]: asyncio.streams.IncompleteReadError: 0 bytes read on a total of 2 expected bytes
Dec 29 13:57:32 raspberrypi fhempy[5694]: The above exception was the direct cause of the following exception:
Dec 29 13:57:32 raspberrypi fhempy[5694]: Traceback (most recent call last):
Dec 29 13:57:32 raspberrypi fhempy[5694]:   File "/home/pi/.local/lib/python3.7/site-packages/fhempy/lib/fhem_pythonbinding.py", line 63, in pybinding
Dec 29 13:57:32 raspberrypi fhempy[5694]:     async for message in websocket:
Dec 29 13:57:32 raspberrypi fhempy[5694]:   File "/home/pi/.local/lib/python3.7/site-packages/websockets/protocol.py", line 439, in __aiter__
Dec 29 13:57:32 raspberrypi fhempy[5694]:     yield await self.recv()
Dec 29 13:57:32 raspberrypi fhempy[5694]:   File "/home/pi/.local/lib/python3.7/site-packages/websockets/protocol.py", line 509, in recv
Dec 29 13:57:32 raspberrypi fhempy[5694]:     await self.ensure_open()
Dec 29 13:57:32 raspberrypi fhempy[5694]:   File "/home/pi/.local/lib/python3.7/site-packages/websockets/protocol.py", line 803, in ensure_open
Dec 29 13:57:32 raspberrypi fhempy[5694]:     raise self.connection_closed_exc()
Dec 29 13:57:32 raspberrypi fhempy[5694]: websockets.exceptions.ConnectionClosedError: code = 1006 (connection closed abnormally [internal]), no reason
Dec 29 13:57:32 raspberrypi fhempy[5694]: 2020-12-29 13:57:32,243 - INFO     - fhempy.lib.fhem_pythonbinding: Restart binding
Dec 29 13:57:32 raspberrypi systemd[1]: fhempy.service: Main process exited, code=exited, status=1/FAILURE
Dec 29 13:57:32 raspberrypi systemd[1]: fhempy.service: Failed with result 'exit-code'.
Dec 29 13:57:32 raspberrypi systemd[1]: fhempy.service: Service RestartSec=100ms expired, scheduling restart.
Dec 29 13:57:32 raspberrypi systemd[1]: fhempy.service: Scheduled restart job, restart counter is at 1.
Dec 29 13:57:32 raspberrypi systemd[1]: Stopped FHEM PythonBinding.
Dec 29 13:57:32 raspberrypi systemd[1]: Started FHEM PythonBinding.
Dec 29 13:57:37 raspberrypi fhempy[5702]: 2020-12-29 13:57:37,281 - INFO     - fhempy.lib.fhem_pythonbinding: Starting pythonbinding...
Dec 29 13:57:46 raspberrypi fhempy[5702]: 2020-12-29 13:57:46,083 - INFO     - fhempy.lib.fhem_pythonbinding: FHEM connection started: 192.168.5.2
Dec 29 13:58:07 raspberrypi fhempy[5702]: 2020-12-29 13:58:07,087 - ERROR    - pygatt.backends.gatttool.gatttool: Timed out connecting to E8:65:F3:5F:7F:F7 after 20 seconds.
Dec 29 13:58:17 raspberrypi fhempy[5702]: 2020-12-29 13:58:17,507 - ERROR    - pygatt.backends.gatttool.gatttool: Timed out connecting to E8:65:F3:5F:7F:F7 after 20 seconds.
Dec 29 13:58:32 raspberrypi fhempy[5702]: 2020-12-29 13:58:32,614 - ERROR    - pygatt.backends.gatttool.gatttool: Timed out connecting to E8:65:F3:5F:7F:F7 after 20 seconds.
Dec 29 13:58:46 raspberrypi systemd[1]: Stopping FHEM PythonBinding...
Dec 29 13:58:46 raspberrypi systemd[1]: fhempy.service: Main process exited, code=killed, status=15/TERM
Dec 29 13:58:46 raspberrypi systemd[1]: fhempy.service: Succeeded.
Dec 29 13:58:46 raspberrypi systemd[1]: Stopped FHEM PythonBinding.
Dec 29 14:02:19 raspberrypi systemd[1]: Started FHEM PythonBinding.
Dec 29 14:02:23 raspberrypi fhempy[5749]: 2020-12-29 14:02:23,813 - INFO     - fhempy.lib.fhem_pythonbinding: Starting pythonbinding...
Dec 29 14:02:32 raspberrypi fhempy[5749]: 2020-12-29 14:02:32,411 - INFO     - fhempy.lib.fhem_pythonbinding: FHEM connection started: 192.168.5.2
Dec 29 14:02:32 raspberrypi fhempy[5749]: 2020-12-29 14:02:32,484 - INFO     - fhempy.lib.fhem_pythonbinding: FHEM connection started: 192.168.5.2
Dec 29 14:02:33 raspberrypi fhempy[5749]: 2020-12-29 14:02:33,224 - ERROR    - fhempy.lib.fhem_pythonbinding: Connection closed error
Dec 29 14:02:33 raspberrypi fhempy[5749]: Traceback (most recent call last):
Dec 29 14:02:33 raspberrypi fhempy[5749]:   File "/home/pi/.local/lib/python3.7/site-packages/websockets/protocol.py", line 827, in transfer_data
Dec 29 14:02:33 raspberrypi fhempy[5749]:     message = await self.read_message()
Dec 29 14:02:33 raspberrypi fhempy[5749]:   File "/home/pi/.local/lib/python3.7/site-packages/websockets/protocol.py", line 895, in read_message
Dec 29 14:02:33 raspberrypi fhempy[5749]:     frame = await self.read_data_frame(max_size=self.max_size)
Dec 29 14:02:33 raspberrypi fhempy[5749]:   File "/home/pi/.local/lib/python3.7/site-packages/websockets/protocol.py", line 971, in read_data_frame
Dec 29 14:02:33 raspberrypi fhempy[5749]:     frame = await self.read_frame(max_size)
Dec 29 14:02:33 raspberrypi fhempy[5749]:   File "/home/pi/.local/lib/python3.7/site-packages/websockets/protocol.py", line 1051, in read_frame
Dec 29 14:02:33 raspberrypi fhempy[5749]:     extensions=self.extensions,
Dec 29 14:02:33 raspberrypi fhempy[5749]:   File "/home/pi/.local/lib/python3.7/site-packages/websockets/framing.py", line 105, in read
Dec 29 14:02:33 raspberrypi fhempy[5749]:     data = await reader(2)
Dec 29 14:02:33 raspberrypi fhempy[5749]:   File "/usr/lib/python3.7/asyncio/streams.py", line 677, in readexactly
Dec 29 14:02:33 raspberrypi fhempy[5749]:     raise IncompleteReadError(incomplete, n)
Dec 29 14:02:33 raspberrypi fhempy[5749]: asyncio.streams.IncompleteReadError: 0 bytes read on a total of 2 expected bytes
Dec 29 14:02:33 raspberrypi fhempy[5749]: The above exception was the direct cause of the following exception:
Dec 29 14:02:33 raspberrypi fhempy[5749]: Traceback (most recent call last):
Dec 29 14:02:33 raspberrypi fhempy[5749]:   File "/home/pi/.local/lib/python3.7/site-packages/fhempy/lib/fhem_pythonbinding.py", line 63, in pybinding
Dec 29 14:02:33 raspberrypi fhempy[5749]:     async for message in websocket:
Dec 29 14:02:33 raspberrypi fhempy[5749]:   File "/home/pi/.local/lib/python3.7/site-packages/websockets/protocol.py", line 439, in __aiter__
Dec 29 14:02:33 raspberrypi fhempy[5749]:     yield await self.recv()
Dec 29 14:02:33 raspberrypi fhempy[5749]:   File "/home/pi/.local/lib/python3.7/site-packages/websockets/protocol.py", line 509, in recv
Dec 29 14:02:33 raspberrypi fhempy[5749]:     await self.ensure_open()
Dec 29 14:02:33 raspberrypi fhempy[5749]:   File "/home/pi/.local/lib/python3.7/site-packages/websockets/protocol.py", line 803, in ensure_open
Dec 29 14:02:33 raspberrypi fhempy[5749]:     raise self.connection_closed_exc()
Dec 29 14:02:33 raspberrypi fhempy[5749]: websockets.exceptions.ConnectionClosedError: code = 1006 (connection closed abnormally [internal]), no reason
Dec 29 14:02:33 raspberrypi fhempy[5749]: 2020-12-29 14:02:33,260 - INFO     - fhempy.lib.fhem_pythonbinding: Restart binding
Dec 29 14:02:33 raspberrypi systemd[1]: fhempy.service: Main process exited, code=exited, status=1/FAILURE
Dec 29 14:02:33 raspberrypi systemd[1]: fhempy.service: Failed with result 'exit-code'.
Dec 29 14:02:33 raspberrypi systemd[1]: fhempy.service: Service RestartSec=100ms expired, scheduling restart.
Dec 29 14:02:33 raspberrypi systemd[1]: fhempy.service: Scheduled restart job, restart counter is at 1.
Dec 29 14:02:33 raspberrypi systemd[1]: Stopped FHEM PythonBinding.
Dec 29 14:02:34 raspberrypi systemd[1]: Started FHEM PythonBinding.
Dec 29 14:02:38 raspberrypi fhempy[5759]: 2020-12-29 14:02:38,159 - INFO     - fhempy.lib.fhem_pythonbinding: Starting pythonbinding...
Dec 29 14:02:44 raspberrypi fhempy[5759]: 2020-12-29 14:02:44,075 - INFO     - fhempy.lib.fhem_pythonbinding: FHEM connection started: 192.168.5.2
Dec 29 14:12:37 raspberrypi fhempy[5759]: 2020-12-29 14:12:37,482 - ERROR    - Wohnzimmer.SmartDisplay: Failed to play: ed97364c-b284-4965-b614-f2fe87ef6e50
Dec 29 14:12:37 raspberrypi fhempy[5759]: Traceback (most recent call last):
Dec 29 14:12:37 raspberrypi fhempy[5759]:   File "/home/pi/.local/lib/python3.7/site-packages/fhempy/lib/googlecast/googlecast.py", line 247, in playDefaultMedia
Dec 29 14:12:37 raspberrypi fhempy[5759]:     res = await session.get(uri)
Dec 29 14:12:37 raspberrypi fhempy[5759]:   File "/usr/local/lib/python3.7/dist-packages/aiohttp/client.py", line 513, in _request
Dec 29 14:12:37 raspberrypi fhempy[5759]:     traces=traces,
Dec 29 14:12:37 raspberrypi fhempy[5759]:   File "/usr/local/lib/python3.7/dist-packages/aiohttp/client_reqrep.py", line 305, in __init__
Dec 29 14:12:37 raspberrypi fhempy[5759]:     self.update_host(url)
Dec 29 14:12:37 raspberrypi fhempy[5759]:   File "/usr/local/lib/python3.7/dist-packages/aiohttp/client_reqrep.py", line 366, in update_host
Dec 29 14:12:37 raspberrypi fhempy[5759]:     raise InvalidURL(url)
Dec 29 14:12:37 raspberrypi fhempy[5759]: aiohttp.client_exceptions.InvalidURL: ed97364c-b284-4965-b614-f2fe87ef6e50
Dec 29 14:12:37 raspberrypi fhempy[5759]: 2020-12-29 14:12:37,513 - ERROR    - asyncio: Unclosed client session
Dec 29 14:12:37 raspberrypi fhempy[5759]: client_session: <aiohttp.client.ClientSession object at 0xb2037ab0>
Dec 29 14:19:16 raspberrypi fhempy[5759]: 2020-12-29 14:19:16,004 - ERROR    - asyncio: Unclosed client session
Dec 29 14:19:16 raspberrypi fhempy[5759]: client_session: <aiohttp.client.ClientSession object at 0xae7ca510>
Dec 29 14:59:27 raspberrypi fhempy[5759]: 2020-12-29 14:59:27,213 - ERROR    - pychromecast.socket_client: [Smart Clock(192.168.5.32):8009] Failed to connect to service Lenovo-Smart-Clock-e13250dee7a25d075fa6bae980206816._googlecast._tcp.local., retrying in 5.0s
Dec 29 14:59:32 raspberrypi fhempy[5759]: 2020-12-29 14:59:32,022 - ERROR    - pychromecast.socket_client: [Smart Clock(192.168.5.32):8009] Failed to connect to service Lenovo-Smart-Clock-e13250dee7a25d075fa6bae980206816._googlecast._tcp.local., retrying in 5.0s
Dec 29 17:37:10 raspberrypi fhempy[5759]: 2020-12-29 17:37:10,339 - ERROR    - asyncio: Unclosed client session
Dec 29 17:37:10 raspberrypi fhempy[5759]: client_session: <aiohttp.client.ClientSession object at 0xb081b550>

Offline dominik

  • Developer
  • Hero Member
  • ****
  • Beiträge: 2872
Antw:fhempy: googlecast
« Antwort #23 am: 29 Dezember 2020, 20:22:58 »
Ok, danke! Dann werde ich bei mir nochmals testen warum das nicht geht.

Das hier fällt mir aber noch auf
Dec 29 13:57:13 raspberrypi fhempy[5673]: 2020-12-29 13:57:13,571 - ERROR    - fhempy.lib.fhem_pythonbinding: Failed to handle message:
Dec 29 13:57:13 raspberrypi fhempy[5673]: Traceback (most recent call last):
Dec 29 13:57:13 raspberrypi fhempy[5673]:   File "/home/pi/.local/lib/python3.7/site-packages/fhempy/lib/fhem_pythonbinding.py", line 300, in _onMessage
Dec 29 13:57:13 raspberrypi fhempy[5673]:     nmInstance = loadedModuleInstances[hash["NAME"]]
Dec 29 13:57:13 raspberrypi fhempy[5673]: KeyError: 'SmartDisplay'

Kommt das nach jedem Start? Ist das dein Smart Display mit googlecast angebunden?
fhempy -  https://github.com/dominikkarall/fhempy: GoogleCast, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik

Offline a_quadrat

  • Full Member
  • ***
  • Beiträge: 318
Antw:fhempy: googlecast
« Antwort #24 am: 30 Dezember 2020, 10:32:32 »
Hi Dominik,

Spotify funktioniert super. Ich habe nur festgestellt, wenn ich den Link als Favorite abspeichere und dann abspielen will, kommt folgende Fehlermeldung.

Failed to execute function Set: Traceback (most recent call last):
  File "/opt/fhem/FHEM/bindings/python/fhempy/lib/fhem_pythonbinding.py", line 333, in _onMessage
    ret = await asyncio.wait_for(
  File "/usr/lib/python3.8/asyncio/tasks.py", line 483, in wait_for
    return fut.result()
  File "/opt/fhem/FHEM/bindings/python/fhempy/lib/googlecast/googlecast.py", line 145, in Set
    return await super().Set(hash, args, argsh)
  File "/opt/fhem/FHEM/bindings/python/fhempy/lib/generic.py", line 78, in Set
    return await utils.handle_set(self._conf_set, self, hash, args, argsh)
  File "/opt/fhem/FHEM/bindings/python/fhempy/lib/utils.py", line 210, in handle_set
    return await fct_call(hash, final_params)
  File "/opt/fhem/FHEM/bindings/python/fhempy/lib/googlecast/googlecast.py", line 161, in set_playFavorite
    url = await fhem.AttrVal(self.hash["NAME"], "favorite_" + id, "")
TypeError: can only concatenate str (not "builtin_function_or_method") to str


Wenn ich mir noch was wünschen darf, "Schuffle" wäre nicht schlecht.  ;)

VG Andreas

Offline dominik

  • Developer
  • Hero Member
  • ****
  • Beiträge: 2872
Antw:fhempy: googlecast
« Antwort #25 am: 30 Dezember 2020, 10:48:08 »
Ist heute Abend erledigt...
https://github.com/dominikkarall/fhempy/commit/7aa7b26878057f86847296b729c2fc8686598008

Shuffle kann ich einbauen, das wird dann aber im spotify Modul drin sein (https://github.com/dominikkarall/fhempy/blob/master/FHEM/bindings/python/fhempy/lib/spotify/README.md), da Shuffle sonst nicht für die restlichen Cast Applikationen funktioniert. Google bietet da nur pause, play, next, prev, stop als Mediensteuerung.
fhempy -  https://github.com/dominikkarall/fhempy: GoogleCast, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik

Offline a_quadrat

  • Full Member
  • ***
  • Beiträge: 318
Antw:fhempy: googlecast
« Antwort #26 am: 30 Dezember 2020, 16:30:25 »
Alles klar, ich habe das Spotify-Modul eingebunden. Es funktioniert auch, aber es kommt folgende Fehlermeldung:

Failed to execute function FW_detailFn: Traceback (most recent call last): File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 333, in _onMessage ret = await asyncio.wait_for( File "/usr/lib/python3.8/asyncio/tasks.py", line 483, in wait_for return fut.result() File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/spotify/spotify.py", line 107, in FW_detailFn if self._attr_spotify_connect == "on": AttributeError: 'spotify' object has no attribute '_attr_spotify_connect'
VG Andreas

Offline dominik

  • Developer
  • Hero Member
  • ****
  • Beiträge: 2872
Antw:fhempy: googlecast
« Antwort #27 am: 30 Dezember 2020, 16:45:20 »
Yep, den Fehler habe ich soeben ein paar Stunden gesucht :)

Ist in den nächsten 30min behoben.
fhempy -  https://github.com/dominikkarall/fhempy: GoogleCast, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik

Offline ReneH87

  • Jr. Member
  • **
  • Beiträge: 97
Antw:fhempy: googlecast
« Antwort #28 am: 30 Dezember 2020, 20:23:54 »
Das hier fällt mir aber noch auf
Dec 29 13:57:13 raspberrypi fhempy[5673]: 2020-12-29 13:57:13,571 - ERROR    - fhempy.lib.fhem_pythonbinding: Failed to handle message:
Dec 29 13:57:13 raspberrypi fhempy[5673]: Traceback (most recent call last):
Dec 29 13:57:13 raspberrypi fhempy[5673]:   File "/home/pi/.local/lib/python3.7/site-packages/fhempy/lib/fhem_pythonbinding.py", line 300, in _onMessage
Dec 29 13:57:13 raspberrypi fhempy[5673]:     nmInstance = loadedModuleInstances[hash["NAME"]]
Dec 29 13:57:13 raspberrypi fhempy[5673]: KeyError: 'SmartDisplay'

Kommt das nach jedem Start? Ist das dein Smart Display mit googlecast angebunden?

Ja das ist eines meiner Geräte. Hatte mich verschrieben, "Smart Display" mit Leerzeichen wäre richtig gewesen. Konnte den Fehler nach der Korrektur nicht mehr entdecken.

Was mir aber noch aufgefallen ist: obwohl ich das über das remote Binding eingerichtet habe, wird bei mir ein "fhempy_peer_127_0_1_1" Device angelegt. Die IP macht auch nicht wirklich Sinn oder? Wenn dann wäre es ja 127.0.0.1?

Offline dominik

  • Developer
  • Hero Member
  • ****
  • Beiträge: 2872
Antw:fhempy: googlecast
« Antwort #29 am: 30 Dezember 2020, 20:33:53 »
Hm...kannst du mal prüfen ob fhempy mit --local Argument gestartet wurde
$ ps -efa|grep fhempy
fhem     30570   538  7 20:25 ?        00:00:27 python3 FHEM/bindings/python/bin/fhempy --local

Ein 127.0.1.1 Device sollte nie angelegt werden. 127.0.1.1 ist scheinbar eine Adresse die sich auf den Hostname bei Debian bezieht, kannte ich auch noch nicht.

fhem_peer_... wird automatisch angelegt, wenn im Netzwerk ein fhempy erkannt wird, bei lokaler Nutzung wird es durch das --local Argument deaktiviert.
fhempy -  https://github.com/dominikkarall/fhempy: GoogleCast, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik