fhempy: googlecast

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

Vorheriges Thema - Nächstes Thema

dominik

Vielleicht geht ein simpler HTTP Server der die Files bereitstellt? Dann musst du nur "set play http://192.168.0.3/path/to/file.mp3" machen.

Könnte mir vorstellen, dass das funktioniert - selbst nicht getestet, da ich keine lokalen Musik Files mehr habe.
fhempy -  https://github.com/fhempy/fhempy: GoogleCast, Tuya, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik

Adimarantis

Hallo Dominik,

das klappt schon (schnell mal ein mp3 auf meinen webserver gelegt). Nutzt jetzt aber nur, wenn man nur eine Datei abspielen will - eine m3u Datei geht da schon nicht mehr.

Gruß,
Jörg
Raspberry 4 + HM-MOD-RPI-PCB (pivCCU) + RfxTrx433XL + 2xRaspberry 1
Module: 50_Signalbot, 52_I2C_ADS1x1x , 58_RPI_1Wire, (50_SPI_MAX31865)

NePheus

Zitat von: dominik am 22 Januar 2021, 20:36:25
Sicher, dass er das Modul nicht gefunden hat? Poste bitte mal das Log von dem Fehler.

Meinst du im FHEM Log? Da finde ich die Stelle garnicht mehr. Habe aber das hier gefunden:


2021.01.17 21:54:00 3: BindingsIo v1.0.0
2021.01.17 21:54:00 3: PythonBinding v1.0.0
2021.01.17 21:54:00 3: Pythonbinding_15733: starting
2021.01.17 21:54:00 3: Pythonbinding_15733: using logfile: ./log/PythonBinding-2021-01-17.log
2021.01.17 21:54:00 3: Pythonbinding_15733: read: end of file reached while sysread
2021.01.17 21:54:00 3: Pythonbinding_15733: stopped
2021.01.17 21:54:00 3: Pythonbinding_15733: starting
2021.01.17 21:54:00 3: Pythonbinding_15733: using logfile: ./log/PythonBinding-2021-01-17.log
2021.01.17 21:54:03 3: Opening local_pybinding device ws:127.0.0.1:15733
2021.01.17 21:54:03 1: local_pybinding: Can't connect to ws:127.0.0.1:15733: Operation now in progress
2021.01.17 21:54:03 1: local_pybinding: Can't connect to ws:127.0.0.1:15733: 127.0.0.1: Verbindungsaufbau abgelehnt (111)
2021.01.17 21:54:03 1: BindingsIo: ERROR local_pybinding - error while connecting: 127.0.0.1: Verbindungsaufbau abgelehnt (111)
2021.01.17 21:54:13 1: BindingsIo: ERROR local_pybinding - error while connecting: 127.0.0.1: Verbindungsaufbau abgelehnt (111)
2021.01.17 21:54:23 1: BindingsIo: ERROR local_pybinding - error while connecting: 127.0.0.1: Verbindungsaufbau abgelehnt (111)
2021.01.17 21:54:31 3: PythonModule v1.0.0 (discover_mdns)
2021.01.17 21:54:33 1: BindingsIo: ERROR local_pybinding - error while connecting: 127.0.0.1: Verbindungsaufbau abgelehnt (111)
2021.01.17 21:54:43 1: BindingsIo: ERROR local_pybinding - error while connecting: 127.0.0.1: Verbindungsaufbau abgelehnt (111)
2021.01.17 21:54:54 1: BindingsIo: ERROR local_pybinding - error while connecting: 127.0.0.1: Verbindungsaufbau abgelehnt (111)
2021.01.17 21:55:04 1: BindingsIo: ERROR local_pybinding - error while connecting: 127.0.0.1: Verbindungsaufbau abgelehnt (111)
2021.01.17 21:55:14 1: BindingsIo: ERROR local_pybinding - error while connecting: 127.0.0.1: Verbindungsaufbau abgelehnt (111)
2021.01.17 21:55:25 1: BindingsIo: ERROR local_pybinding - error while connecting: 127.0.0.1: Verbindungsaufbau abgelehnt (111)
2021.01.17 21:55:27 3: Pythonbinding_15733: read: end of file reached while sysread
2021.01.17 21:55:27 3: Pythonbinding_15733: stopped
2021.01.17 21:55:27 3: Pythonbinding_15733: starting
2021.01.17 21:55:27 3: Pythonbinding_15733: using logfile: ./log/PythonBinding-2021-01-17.log
2021.01.17 21:55:35 1: ws:127.0.0.1:15733 reappeared (local_pybinding)
2021.01.17 21:58:31 3: Pythonbinding_15733: read: end of file reached while sysread
2021.01.17 21:58:31 3: Pythonbinding_15733: stopped
2021.01.17 21:58:31 3: Pythonbinding_15733: starting
2021.01.17 21:58:31 3: Pythonbinding_15733: using logfile: ./log/PythonBinding-2021-01-17.log
2021.01.17 21:58:32 3: BindingsIo v1.0.0
2021.01.17 21:58:51 3: PythonModule v1.0.0 (discover_mdns)

dominik

Ja, FHEM Log meinte ich. Die Meldungen die du gepostet hast sind ok. Die kommen solange fhempy startet, in der Zeit werden noch Installationen durchgeführt.

@Jörg, ich denke eine m3u wird vom Standard Player nicht unterstützt. PyChromecast unterstützt nun aber auch das Abspielen per BubbleUPnP Cast App, vielleicht klappt es damit. Den muss ich aber noch integrieren, dann kannst du testen.
fhempy -  https://github.com/fhempy/fhempy: GoogleCast, Tuya, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik

dominik

Ich habe gerade die BubbleUPNP Version getestet, auch da geht kein m3u.

Nachdem m3u ja nur eine Playlist ist, könntest du auch folgendes machen:
set cast play LIED1
set cast addToQueue LIED2
set cast addToQueue LIED3
set cast addToQueue LIED4
set cast addToQueue LIED5

Dann werden die hintereinander abgespielt.
fhempy -  https://github.com/fhempy/fhempy: GoogleCast, Tuya, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik

wk2000

#170
Hey, kann mir jemand nen Tipp geben, wie ich das fhempy im Docker-Container zum laufen bekomme?

FHEM läuft mit dem offiziellen Docker-Container bei mir auf dem RaspberryPI3 eigentlich out of the box. Nur das Modul hier bereitet mir Probleme.
Eine Zeit lang hat es funktioniert, aber irgendwann gings nicht mehr.

Im Status des GoogleCast Devices steht:


Module failed to load: googlecast
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 243, in _onMessage
    functools.partial(importlib.import_module, pymodule)
  File "/opt/fhem/.local/lib/python3.7/site-packages/fhempy/lib/utils.py", line 32, 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/googlecast/googlecast.py", line 28, in <module>
    import spotify_token as st
ModuleNotFoundError: No module named 'spotify_token'


Und wenn ich "pip3 install fhempy" versuche im terminal:
cat log.txt
Collecting fhempy
  Using cached https://files.pythonhosted.org/packages/e1/7b/21043db7294388143ed                                                                                                                                                             c45026fa5e2bc9d6e6027c886f8f44a88fcec7455/fhempy-0.1.25-py3-none-any.whl
Collecting cryptography>=3.3.1 (from fhempy)
  Using cached https://files.pythonhosted.org/packages/b7/82/f7a4ddc1af185936c1e                                                                                                                                                             4fa000942ffa8fb2d98cff26b75afa7b3c63391c4/cryptography-3.3.1.tar.gz
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
Requirement already satisfied: importlib-metadata>=3.3.0 in /usr/local/lib/pytho                                                                                                                                                             n3.7/dist-packages (from fhempy) (3.4.0)
Requirement already satisfied: websockets>=8.1 in /usr/local/lib/python3.7/dist-                                                                                                                                                             packages (from fhempy) (8.1)
Collecting zeroconf>=0.28.6 (from fhempy)
  Using cached https://files.pythonhosted.org/packages/67/b4/bffd1025384b89fca82                                                                                                                                                             9921b1e76582dd195513879895f03ceb6e484f54b/zeroconf-0.28.8-py3-none-any.whl
Requirement already satisfied: six>=1.4.1 in /usr/lib/python3/dist-packages (fro                                                                                                                                                             m cryptography>=3.3.1->fhempy) (1.12.0)
Requirement already satisfied: cffi>=1.12 in /usr/local/lib/python3.7/dist-packa                                                                                                                                                             ges (from cryptography>=3.3.1->fhempy) (1.14.4)
Requirement already satisfied: typing-extensions>=3.6.4; python_version < "3.8"                                                                                                                                                              in /usr/local/lib/python3.7/dist-packages (from importlib-metadata>=3.3.0->fhemp                                                                                                                                                             y) (3.7.4.3)
Requirement already satisfied: zipp>=0.5 in /usr/local/lib/python3.7/dist-packag                                                                                                                                                             es (from importlib-metadata>=3.3.0->fhempy) (3.4.0)
Collecting ifaddr>=0.1.7 (from zeroconf>=0.28.6->fhempy)
  Using cached https://files.pythonhosted.org/packages/92/0f/a577a724c03982b8002                                                                                                                                                             32713874e805c8fcc14f4a2c3060902ed20b50da8/ifaddr-0.1.7-py2.py3-none-any.whl
Requirement already satisfied: pycparser in /usr/local/lib/python3.7/dist-packag                                                                                                                                                             es (from cffi>=1.12->cryptography>=3.3.1->fhempy) (2.20)
Building wheels for collected packages: cryptography
  Running setup.py bdist_wheel for cryptography: started
  Running setup.py bdist_wheel for cryptography: still running...
  Running setup.py bdist_wheel for cryptography: finished with status 'error'
  Complete output from command /usr/bin/python3 -u -c "import setuptools, tokeni                                                                                                                                                             ze;__file__='/tmp/pip-install-m_e3psfu/cryptography/setup.py';f=getattr(tokenize                                                                                                                                                             , 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(com                                                                                                                                                             pile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-c_250hd6 --python-t                                                                                                                                                             ag cp37:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-armv7l-3.7
  creating build/lib.linux-armv7l-3.7/cryptography
  copying src/cryptography/__init__.py -> build/lib.linux-armv7l-3.7/cryptograph                                                                                                                                                             y
  copying src/cryptography/utils.py -> build/lib.linux-armv7l-3.7/cryptography
  copying src/cryptography/fernet.py -> build/lib.linux-armv7l-3.7/cryptography
  copying src/cryptography/__about__.py -> build/lib.linux-armv7l-3.7/cryptograp                                                                                                                                                             hy
  copying src/cryptography/exceptions.py -> build/lib.linux-armv7l-3.7/cryptogra                                                                                                                                                             phy
  creating build/lib.linux-armv7l-3.7/cryptography/hazmat
  copying src/cryptography/hazmat/__init__.py -> build/lib.linux-armv7l-3.7/cryp                                                                                                                                                             tography/hazmat
  copying src/cryptography/hazmat/_oid.py -> build/lib.linux-armv7l-3.7/cryptogr                                                                                                                                                             aphy/hazmat
  copying src/cryptography/hazmat/_der.py -> build/lib.linux-armv7l-3.7/cryptogr                                                                                                                                                             aphy/hazmat
  creating build/lib.linux-armv7l-3.7/cryptography/x509
  copying src/cryptography/x509/certificate_transparency.py -> build/lib.linux-a                                                                                                                                                             rmv7l-3.7/cryptography/x509
  copying src/cryptography/x509/base.py -> build/lib.linux-armv7l-3.7/cryptograp                                                                                                                                                             hy/x509
  copying src/cryptography/x509/__init__.py -> build/lib.linux-armv7l-3.7/crypto                                                                                                                                                             graphy/x509
  copying src/cryptography/x509/ocsp.py -> build/lib.linux-armv7l-3.7/cryptograp                                                                                                                                                             hy/x509
  copying src/cryptography/x509/oid.py -> build/lib.linux-armv7l-3.7/cryptograph                                                                                                                                                             y/x509
  copying src/cryptography/x509/extensions.py -> build/lib.linux-armv7l-3.7/cryp                                                                                                                                                             tography/x509
  copying src/cryptography/x509/general_name.py -> build/lib.linux-armv7l-3.7/cr                                                                                                                                                             yptography/x509
  copying src/cryptography/x509/name.py -> build/lib.linux-armv7l-3.7/cryptograp                                                                                                                                                             hy/x509
  creating build/lib.linux-armv7l-3.7/cryptography/hazmat/backends
  copying src/cryptography/hazmat/backends/__init__.py -> build/lib.linux-armv7l                                                                                                                                                             -3.7/cryptography/hazmat/backends
  copying src/cryptography/hazmat/backends/interfaces.py -> build/lib.linux-armv                                                                                                                                                             7l-3.7/cryptography/hazmat/backends
  creating build/lib.linux-armv7l-3.7/cryptography/hazmat/primitives
  copying src/cryptography/hazmat/primitives/hashes.py -> build/lib.linux-armv7l                                                                                                                                                             -3.7/cryptography/hazmat/primitives
  copying src/cryptography/hazmat/primitives/padding.py -> build/lib.linux-armv7                                                                                                                                                             l-3.7/cryptography/hazmat/primitives
  copying src/cryptography/hazmat/primitives/__init__.py -> build/lib.linux-armv                                                                                                                                                             7l-3.7/cryptography/hazmat/primitives
  copying src/cryptography/hazmat/primitives/keywrap.py -> build/lib.linux-armv7                                                                                                                                                             l-3.7/cryptography/hazmat/primitives
  copying src/cryptography/hazmat/primitives/cmac.py -> build/lib.linux-armv7l-3                                                                                                                                                             .7/cryptography/hazmat/primitives
  copying src/cryptography/hazmat/primitives/constant_time.py -> build/lib.linux                                                                                                                                                             -armv7l-3.7/cryptography/hazmat/primitives
  copying src/cryptography/hazmat/primitives/hmac.py -> build/lib.linux-armv7l-3                                                                                                                                                             .7/cryptography/hazmat/primitives
  copying src/cryptography/hazmat/primitives/poly1305.py -> build/lib.linux-armv                                                                                                                                                             7l-3.7/cryptography/hazmat/primitives
  creating build/lib.linux-armv7l-3.7/cryptography/hazmat/bindings
  copying src/cryptography/hazmat/bindings/__init__.py -> build/lib.linux-armv7l                                                                                                                                                             -3.7/cryptography/hazmat/bindings
  creating build/lib.linux-armv7l-3.7/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/ec.py -> build/lib.linux-armv                                                                                                                                                             7l-3.7/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/hashes.py -> build/lib.linux-                                                                                                                                                             armv7l-3.7/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/ciphers.py -> build/lib.linux                                                                                                                                                             -armv7l-3.7/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/x25519.py -> build/lib.linux-                                                                                                                                                             armv7l-3.7/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/__init__.py -> build/lib.linu                                                                                                                                                             x-armv7l-3.7/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/aead.py -> build/lib.linux-ar                                                                                                                                                             mv7l-3.7/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/utils.py -> build/lib.linux-a                                                                                                                                                             rmv7l-3.7/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/dsa.py -> build/lib.linux-arm                                                                                                                                                             v7l-3.7/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/ocsp.py -> build/lib.linux-ar                                                                                                                                                             mv7l-3.7/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/rsa.py -> build/lib.linux-arm                                                                                                                                                             v7l-3.7/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/backend.py -> build/lib.linux                                                                                                                                                             -armv7l-3.7/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/x509.py -> build/lib.linux-ar                                                                                                                                                             mv7l-3.7/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/ed448.py -> build/lib.linux-a                                                                                                                                                             rmv7l-3.7/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/encode_asn1.py -> build/lib.l                                                                                                                                                             inux-armv7l-3.7/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/cmac.py -> build/lib.linux-ar                                                                                                                                                             mv7l-3.7/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/ed25519.py -> build/lib.linux                                                                                                                                                             -armv7l-3.7/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/decode_asn1.py -> build/lib.l                                                                                                                                                             inux-armv7l-3.7/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/x448.py -> build/lib.linux-ar                                                                                                                                                             mv7l-3.7/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/hmac.py -> build/lib.linux-ar                                                                                                                                                             mv7l-3.7/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/poly1305.py -> build/lib.linu                                                                                                                                                             x-armv7l-3.7/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/dh.py -> build/lib.linux-armv                                                                                                                                                             7l-3.7/cryptography/hazmat/backends/openssl
  creating build/lib.linux-armv7l-3.7/cryptography/hazmat/primitives/ciphers
  copying src/cryptography/hazmat/primitives/ciphers/base.py -> build/lib.linux-                                                                                                                                                             armv7l-3.7/cryptography/hazmat/primitives/ciphers
  copying src/cryptography/hazmat/primitives/ciphers/__init__.py -> build/lib.li                                                                                                                                                             nux-armv7l-3.7/cryptography/hazmat/primitives/ciphers
  copying src/cryptography/hazmat/primitives/ciphers/aead.py -> build/lib.linux-                                                                                                                                                             armv7l-3.7/cryptography/hazmat/primitives/ciphers
  copying src/cryptography/hazmat/primitives/ciphers/algorithms.py -> build/lib.                                                                                                                                                             linux-armv7l-3.7/cryptography/hazmat/primitives/ciphers
  copying src/cryptography/hazmat/primitives/ciphers/modes.py -> build/lib.linux                                                                                                                                                             -armv7l-3.7/cryptography/hazmat/primitives/ciphers
  creating build/lib.linux-armv7l-3.7/cryptography/hazmat/primitives/serializati                                                                                                                                                             on
  copying src/cryptography/hazmat/primitives/serialization/base.py -> build/lib.                                                                                                                                                             linux-armv7l-3.7/cryptography/hazmat/primitives/serialization
  copying src/cryptography/hazmat/primitives/serialization/__init__.py -> build/                                                                                                                                                             lib.linux-armv7l-3.7/cryptography/hazmat/primitives/serialization
  copying src/cryptography/hazmat/primitives/serialization/pkcs12.py -> build/li                                                                                                                                                             b.linux-armv7l-3.7/cryptography/hazmat/primitives/serialization
  copying src/cryptography/hazmat/primitives/serialization/pkcs7.py -> build/lib                                                                                                                                                             .linux-armv7l-3.7/cryptography/hazmat/primitives/serialization
  copying src/cryptography/hazmat/primitives/serialization/ssh.py -> build/lib.l                                                                                                                                                             inux-armv7l-3.7/cryptography/hazmat/primitives/serialization
  creating build/lib.linux-armv7l-3.7/cryptography/hazmat/primitives/kdf
  copying src/cryptography/hazmat/primitives/kdf/hkdf.py -> build/lib.linux-armv                                                                                                                                                             7l-3.7/cryptography/hazmat/primitives/kdf
  copying src/cryptography/hazmat/primitives/kdf/x963kdf.py -> build/lib.linux-a                                                                                                                                                             rmv7l-3.7/cryptography/hazmat/primitives/kdf
  copying src/cryptography/hazmat/primitives/kdf/__init__.py -> build/lib.linux-                                                                                                                                                             armv7l-3.7/cryptography/hazmat/primitives/kdf
  copying src/cryptography/hazmat/primitives/kdf/kbkdf.py -> build/lib.linux-arm                                                                                                                                                             v7l-3.7/cryptography/hazmat/primitives/kdf
  copying src/cryptography/hazmat/primitives/kdf/pbkdf2.py -> build/lib.linux-ar                                                                                                                                                             mv7l-3.7/cryptography/hazmat/primitives/kdf
  copying src/cryptography/hazmat/primitives/kdf/scrypt.py -> build/lib.linux-ar                                                                                                                                                             mv7l-3.7/cryptography/hazmat/primitives/kdf
  copying src/cryptography/hazmat/primitives/kdf/concatkdf.py -> build/lib.linux                                                                                                                                                             -armv7l-3.7/cryptography/hazmat/primitives/kdf
  creating build/lib.linux-armv7l-3.7/cryptography/hazmat/primitives/asymmetric
  copying src/cryptography/hazmat/primitives/asymmetric/ec.py -> build/lib.linux                                                                                                                                                             -armv7l-3.7/cryptography/hazmat/primitives/asymmetric
  copying src/cryptography/hazmat/primitives/asymmetric/x25519.py -> build/lib.l                                                                                                                                                             inux-armv7l-3.7/cryptography/hazmat/primitives/asymmetric
  copying src/cryptography/hazmat/primitives/asymmetric/padding.py -> build/lib.                                                                                                                                                             linux-armv7l-3.7/cryptography/hazmat/primitives/asymmetric
  copying src/cryptography/hazmat/primitives/asymmetric/__init__.py -> build/lib                                                                                                                                                             .linux-armv7l-3.7/cryptography/hazmat/primitives/asymmetric
  copying src/cryptography/hazmat/primitives/asymmetric/utils.py -> build/lib.li                                                                                                                                                             nux-armv7l-3.7/cryptography/hazmat/primitives/asymmetric
  copying src/cryptography/hazmat/primitives/asymmetric/dsa.py -> build/lib.linu                                                                                                                                                             x-armv7l-3.7/cryptography/hazmat/primitives/asymmetric
  copying src/cryptography/hazmat/primitives/asymmetric/rsa.py -> build/lib.linu                                                                                                                                                             x-armv7l-3.7/cryptography/hazmat/primitives/asymmetric
  copying src/cryptography/hazmat/primitives/asymmetric/ed448.py -> build/lib.li                                                                                                                                                             nux-armv7l-3.7/cryptography/hazmat/primitives/asymmetric
  copying src/cryptography/hazmat/primitives/asymmetric/ed25519.py -> build/lib.                                                                                                                                                             linux-armv7l-3.7/cryptography/hazmat/primitives/asymmetric
  copying src/cryptography/hazmat/primitives/asymmetric/x448.py -> build/lib.lin                                                                                                                                                             ux-armv7l-3.7/cryptography/hazmat/primitives/asymmetric
  copying src/cryptography/hazmat/primitives/asymmetric/dh.py -> build/lib.linux           

                                               

edit

Adimarantis

Zitat von: dominik am 23 Januar 2021, 20:22:13
set cast play LIED1
set cast addToQueue LIED2
set cast addToQueue LIED3
set cast addToQueue LIED4
set cast addToQueue LIED5

Danke Dominik. Das hört sich zumindest nach einem Ansatz an. Bei uns stellt sich die Frage meistens zur Adventszeit, sonst taugt eigentlich Radio oder Spotify - d.h. ich hab noch ein wenig Zeit zu sehen, was es bis dahin gibt. Auf jeden Fall eine Fallbacklösung :)

Jörg
Raspberry 4 + HM-MOD-RPI-PCB (pivCCU) + RfxTrx433XL + 2xRaspberry 1
Module: 50_Signalbot, 52_I2C_ADS1x1x , 58_RPI_1Wire, (50_SPI_MAX31865)

Sommerfeld

Hallo Dominik,
seit dem heutigen update, 27.01.21, erhalte ich folgende Fehlermeldung:

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

Stacktrace:
Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 252, in _onMessage
    module_object = await utils.run_blocking(
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/utils.py", line 32, in run_blocking
    return await asyncio.get_event_loop().run_in_executor(pool, function)
  File "/usr/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 783, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/googlecast/googlecast.py", line 20, in <module>
    from pychromecast.controllers.bubbleupnp import BubbleUPNPController
ModuleNotFoundError: No module named 'pychromecast.controllers.bubbleupnp'/code]

Für Hilfe wäre ich dankbar

JF Mennedy

BubbleUPNPController benötigt eine neuere pychromecast. in der manifest.json ist noch eine zu alte version (7.3.0), habe das manuell angepasst und die 7.7.2 wurde beim restart von pythonbinding installiert. dann läufts wieder. Wird im nächsten releas bestimmt gefixed...

Gruss Jan

Sommerfeld

Hallo Jan,
Vielen Dank für den Hinweis.
Wo und wie müsste ich etwas manuell anpassen?
Gruß Armin

JF Mennedy

Hallo Armin,

ich habe diese Dateien angepasst:

/opt/fhem/.local/lib/python3.7/site-packages/fhempy/lib/googlecast/manifest.json

und

/opt/fhem/FHEM/bindings/python/fhempy/lib/googlecast/manifest.json

{
  "requirements": [
    "pychromecast>=7.7.2",
    "youtube_dl>=2020.12.22",
    "spotipy>=2.16.1",
    "zeroconf==0.28.6",
    "spotify-token>=1.0.0",
    "aiohttp"
  ]
}


Bei Dir müsste da noch    "pychromecast>=7.3.0" stehen...

Anschliessend pythonbinding neu starten und die Abhängigkeiten für googlecast werden automatisch neu installiert...

Du hast laut log python3.8 also ist die Datei

/opt/fhem/.local/lib/python3.8/site-packages/fhempy/lib/googlecast/manifest.json

Wenn es dringend ist, ändere es ab, ansonsten warte das Fix bzw. Update ab, das bestimmt nicht lange auf sich warten lässt...

Gruss Jan

Sommerfeld

Hallo Jan,
vielen Dank für die Erklärungen.
Einen schönen Abend.

dominik

Hi,

ist nun in Version 0.1.27 gefixed.
fhempy -  https://github.com/fhempy/fhempy: GoogleCast, Tuya, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik

kriegerkl

Hallo Dominik,
ich habe folgenden Fehler beim update des neuen GoogleCast-Moduls s.u.
Was kann ich da machen?


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

Stacktrace:
Traceback (most recent call last):
  File "/home/pi/.local/lib/python3.8/site-packages/fhempy/lib/fhem_pythonbinding.py", line 252, in _onMessage
    module_object = await utils.run_blocking(
  File "/home/pi/.local/lib/python3.8/site-packages/fhempy/lib/utils.py", line 32, in run_blocking
    return await asyncio.get_event_loop().run_in_executor(pool, function)
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 783, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/pi/.local/lib/python3.8/site-packages/fhempy/lib/googlecast/googlecast.py", line 31, in <module>
    import spotify_token as st
ModuleNotFoundError: No module named 'spotify_token'


Im PhytonBinding..log steht folgendes:

2021-01-29 18:45:46,830 - INFO     - lib.fhem_pythonbinding: Starting pythonbinding...
Traceback (most recent call last):
  File "FHEM/bindings/python/pythonbinding.py", line 81, in <module>
    fpb.run()
  File "/opt/fhem/FHEM/bindings/python/lib/fhem_pythonbinding.py", line 276, in run
    asyncio.get_event_loop().run_until_complete(
  File "/usr/local/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
    return future.result()
  File "/usr/local/lib/python3.8/asyncio/tasks.py", line 684, in _wrap_awaitable
    return (yield from awaitable.__await__())
  File "/opt/fhem/.local/lib/python3.8/site-packages/websockets/server.py", line 965, in __await_impl__
    server = await self._create_server()
  File "/usr/local/lib/python3.8/asyncio/base_events.py", line 1463, in create_server
    raise OSError(err.errno, 'error while attempting '
OSError: [Errno 98] error while attempting to bind on address ('0.0.0.0', 15733): address already in use

dominik

2 Fehler sehe ich hier:

- ModuleNotFoundError: No module named 'spotify_token'
Probier bitte mal
sudo -u fhem pip3 install spotify_token
und poste dann die Ausgabe.

- OSError: [Errno 98] error while attempting to bind on address ('0.0.0.0', 15733): address already in use
Hier läuft schon ein fhempy auf dem gleichen Node. Hast du das manuell gestartet?
fhempy -  https://github.com/fhempy/fhempy: GoogleCast, Tuya, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik