fhempy: googlecast

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

Vorheriges Thema - Nächstes Thema

Superposchi

Ja, hat auch nichts gebracht, die Fehlermeldung ist nach wie vor bei beiden NEst Devices vorhanden, lediglich die Gruppe zeigt "PythonBinding timeout" an.
Bei den echten Google-Nest-Devices steht wie oben schon mal geschrieben:
Failed to execute function Define: Traceback (most recent call last): File "/opt/fhem/.local/lib/python3.7/site-packages/fhempy/lib/fhem_pythonbinding.py", line 335, in _onMessage fct_timeout, File "/usr/lib/python3.7/asyncio/tasks.py", line 416, in wait_for return fut.result() File "/opt/fhem/.local/lib/python3.7/site-packages/fhempy/lib/googlecast/googlecast.py", line 112, in Define await super().Define(hash, args, argsh) File "/opt/fhem/.local/lib/python3.7/site-packages/fhempy/lib/generic.py", line 86, in Define await utils.handle_define_attr(self._conf_attr, self, hash) File "/opt/fhem/.local/lib/python3.7/site-packages/fhempy/lib/utils.py", line 108, in handle_define_attr await fct_call(hash) File "/opt/fhem/.local/lib/python3.7/site-packages/fhempy/lib/googlecast/googlecast.py", line 255, in set_attr_spotify_cookie data = st.start_session(self._attr_spotify_sp_dc, self._attr_spotify_sp_key) File "/opt/fhem/.local/lib/python3.7/site-packages/spotify_token.py", line 19, in start_session headers=headers, cookies=cookies) File "/usr/lib/python3/dist-packages/requests/sessions.py", line 546, in get return self.request('GET', url, **kwargs) File "/usr/lib/python3/dist-packages/requests/sessions.py", line 533, in request resp = self.send(prep, **send_kwargs) File "/usr/lib/python3/dist-packages/requests/sessions.py", line 668, in send history = [resp for resp in gen] if allow_redirects else [] File "/usr/lib/python3/dist-packages/requests/sessions.py", line 668, in history = [resp for resp in gen] if allow_redirects else [] File "/usr/lib/python3/dist-packages/requests/sessions.py", line 165, in resolve_redirects raise TooManyRedirects('Exceeded %s redirects.' % self.max_redirects, response=resp) requests.exceptions.TooManyRedirects: Exceeded 30 redirects.

Superposchi

So, habe noch etwas rumgespielt und probiert.
Wie ich schon mal geschrieben hatte, habe ich die Googlecast-Devices manuell angelegt, Fhem hat aber auch die gleichen Geräte automatisch angelegt.

Jetzt habe ich mal die SP_DC und SP_Key Daten von den manuell erstellten auf die automatisch erstellten Devices übertragen und siehe da, nach einem Server-Neustart stand statt wie bisher "online" plötzlich "PythonBinding timeout" im State.

Vielleicht hilft das ja als Information ein Stück weiter.

dominik

Bitte erkläre was du gemacht hast, dann kann ich besser weiter helfen. "rumgespielt" kann ich nur raten.

Ich vermute du hast discover_mdns eingesetzt? Warum legst du dann nochmals das gleiche Device manuell an?
In welchen Device stand danach "PythonBinding timeout"? Was steht im PythonBinding Log?
fhempy -  https://github.com/fhempy/fhempy: GoogleCast, Tuya, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik

Superposchi

#108
Also, ich habe damals die Devices manuell angelegt, weil ich nicht mitbekommen habe, dass Fhem automatisch welche angelegt hatte. Nicht mehr und nicht weniger.
Was ich unter "rumgespielt" gemacht habe, steht im Post vorher. Ich habe lediglich die Werte der beiden Attribute SP_DC und SP_Key aus den manuelle angelegten Devices (die ja rumzicken) kopiert und entsprechend in den automatisch erzeigten eingefügt. Die Automatisch erzeugten standen vorher alls auf online, nach dem Einfügen der Attribute und einem Fhem-Neustart stand das Device bei dem ich die Attribute testweise übertragen hatte eben auf "PythonBinding timeout".
Mehr habe ich nicht gemacht und genauer kann ich es nicht erklären.

Anbei noch die Logs von PythonBinding von gestern und heute und das List des automatisch erstellten Devices:
Internals:
   .AttrList  favorite_1 favorite_2 favorite_3 favorite_4 favorite_5 spotify_sp_dc spotify_sp_key IODev event-aggregator event-min-interval event-on-change-reading event-on-update-reading oldreadings stateFormat:textField-long timestamp-on-change-reading
   .FhemMetaInternals 1
   DEF        googlecast 'Wohnzimmerlautsprecher'
   FUUID      5fcd0e72-f33f-793a-526c-c0aeb5c75a9ed69f
   FVERSION   10_PythonModule.pm:0.182830/2019-01-16
   IODev      local_pybinding
   NAME       Google_Nest_Mini_Wohnzimmerlautsprecher
   NR         134
   PYTHONTYPE googlecast
   STATE      PythonBinding timeout
   TYPE       PythonModule
   .attraggr:
   .attrminint:
   READINGS:
     2021-01-04 09:12:58   app_id         
     2020-12-06 20:02:49   cast_type       cast
     2021-01-04 12:15:20   connection      connected
     2021-01-04 09:12:58   display_name   
     2021-01-04 09:07:57   icon_url       
     2020-12-06 20:02:49   ignore_cec      0
     2020-12-06 20:02:50   is_active_input 0
     2020-12-06 20:02:50   is_stand_by     1
     2021-01-03 16:52:52   mediaAlbum     
     2021-01-03 16:52:52   mediaArtist     
     2021-01-04 09:12:58   mediaContentId 
     2021-01-04 09:12:58   mediaContentType
     2021-01-03 19:30:22   mediaCurrentPosPercent
     2021-01-03 19:30:22   mediaCurrentPosition
     2021-01-04 09:12:58   mediaDuration   
     2021-01-03 16:52:52   mediaImageHeight
     2021-01-03 16:52:52   mediaImageUrl   
     2021-01-03 16:52:52   mediaImageWidth
     2021-01-04 09:12:58   mediaPlayerState UNKNOWN
     2021-01-04 09:12:58   mediaStreamType UNKNOWN
     2021-01-03 16:52:52   mediaTitle     
     2020-12-06 20:02:49   model_name      Google Nest Mini
     2020-12-06 20:02:50   mute            0
     2020-12-06 20:02:49   name            Wohnzimmerlautsprecher
     2021-01-04 09:12:58   session_id     
     2021-01-04 12:15:16   spotify_user    attr spotify_sp... required
     2021-01-04 12:20:28   state           PythonBinding timeout
     2021-01-04 09:12:58   status_text     
     2021-01-04 09:12:58   transport_id   
     2020-12-06 20:02:49   uuid            ec715a28-897e-dc95-3c87-e44ecb1699c0
     2021-01-03 19:30:16   volume          65
   args:
     Google_Nest_Mini_Wohnzimmerlautsprecher
     PythonModule
     googlecast
     Wohnzimmerlautsprecher
   argsh:
Attributes:
   IODev      local_pybinding
   favorite_2 https://open.spotify.com/playlist/4MwJ4E9RlPUii28R0t5dDL
   favorite_3 https://open.spotify.com/playlist/2RxtpesK6vFl9g4q9YQdwD
   icon       scene_scene
   spotify_sp_dc xxx
   spotify_sp_key xxx
   userattr   favorite_1 favorite_2 favorite_3 favorite_4 favorite_5


"discover_mdns" sagt mir gar nichts.

Superposchi

#109
Hier noch die Fehlermeldung die im manuell erzeigten Device steht:
Failed to execute function Define: Traceback (most recent call last): File "/opt/fhem/.local/lib/python3.7/site-packages/fhempy/lib/fhem_pythonbinding.py", line 335, in _onMessage fct_timeout, File "/usr/lib/python3.7/asyncio/tasks.py", line 416, in wait_for return fut.result() File "/opt/fhem/.local/lib/python3.7/site-packages/fhempy/lib/googlecast/googlecast.py", line 112, in Define await super().Define(hash, args, argsh) File "/opt/fhem/.local/lib/python3.7/site-packages/fhempy/lib/generic.py", line 86, in Define await utils.handle_define_attr(self._conf_attr, self, hash) File "/opt/fhem/.local/lib/python3.7/site-packages/fhempy/lib/utils.py", line 108, in handle_define_attr await fct_call(hash) File "/opt/fhem/.local/lib/python3.7/site-packages/fhempy/lib/googlecast/googlecast.py", line 255, in set_attr_spotify_cookie data = st.start_session(self._attr_spotify_sp_dc, self._attr_spotify_sp_key) File "/opt/fhem/.local/lib/python3.7/site-packages/spotify_token.py", line 19, in start_session headers=headers, cookies=cookies) File "/usr/lib/python3/dist-packages/requests/sessions.py", line 546, in get return self.request('GET', url, **kwargs) File "/usr/lib/python3/dist-packages/requests/sessions.py", line 533, in request resp = self.send(prep, **send_kwargs) File "/usr/lib/python3/dist-packages/requests/sessions.py", line 668, in send history = [resp for resp in gen] if allow_redirects else [] File "/usr/lib/python3/dist-packages/requests/sessions.py", line 668, in history = [resp for resp in gen] if allow_redirects else [] File "/usr/lib/python3/dist-packages/requests/sessions.py", line 165, in resolve_redirects raise TooManyRedirects('Exceeded %s redirects.' % self.max_redirects, response=resp) requests.exceptions.TooManyRedirects: Exceeded 30 redirects.

Das List dazu:
Internals:
   .AttrList  favorite_1 favorite_2 favorite_3 favorite_4 favorite_5 spotify_sp_dc spotify_sp_key IODev event-aggregator event-min-interval event-on-change-reading event-on-update-reading oldreadings stateFormat:textField-long timestamp-on-change-reading
   .FhemMetaInternals 1
   .triggerUsed 0
   DEF        googlecast Wohnzimmerlautsprecher
   FUUID      5fbac9e2-f33f-793a-66ea-c20857e12b91fab7
   FVERSION   10_PythonModule.pm:0.182830/2019-01-16
   IODev      local_pybinding
   NAME       Wohnzimmerlautsprecher
   NR         94
   PYTHONTYPE googlecast
   STATE      Failed to execute function Define: Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.7/site-packages/fhempy/lib/fhem_pythonbinding.py", line 335, in _onMessage
    fct_timeout,
  File "/usr/lib/python3.7/asyncio/tasks.py", line 416, in wait_for
    return fut.result()
  File "/opt/fhem/.local/lib/python3.7/site-packages/fhempy/lib/googlecast/googlecast.py", line 112, in Define
    await super().Define(hash, args, argsh)
  File "/opt/fhem/.local/lib/python3.7/site-packages/fhempy/lib/generic.py", line 86, in Define
    await utils.handle_define_attr(self._conf_attr, self, hash)
  File "/opt/fhem/.local/lib/python3.7/site-packages/fhempy/lib/utils.py", line 108, in handle_define_attr
    await fct_call(hash)
  File "/opt/fhem/.local/lib/python3.7/site-packages/fhempy/lib/googlecast/googlecast.py", line 255, in set_attr_spotify_cookie
    data = st.start_session(self._attr_spotify_sp_dc, self._attr_spotify_sp_key)
  File "/opt/fhem/.local/lib/python3.7/site-packages/spotify_token.py", line 19, in start_session
    headers=headers, cookies=cookies)
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 546, in get
    return self.request('GET', url, **kwargs)
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 533, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 668, in send
    history = [resp for resp in gen] if allow_redirects else []
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 668, in <listcomp>
    history = [resp for resp in gen] if allow_redirects else []
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 165, in resolve_redirects
    raise TooManyRedirects('Exceeded %s redirects.' % self.max_redirects, response=resp)
requests.exceptions.TooManyRedirects: Exceeded 30 redirects.

   TYPE       PythonModule
   .attraggr:
   .attrminint:
   READINGS:
     2021-01-03 20:02:45   app_id          CC32E753
     2020-11-22 21:28:19   cast_type       cast
     2021-01-03 20:12:01   connection      connected
     2021-01-03 20:02:45   display_name    Spotify
     2021-01-03 20:02:45   icon_url        https://lh3.googleusercontent.com/HOX9yqNu6y87Chb1lHYqhKVTQW43oFAFFe2ojx94yCLh0yMzgygTrM0RweAexApRWqq6UahgrWYimVgK
     2020-11-22 21:28:19   ignore_cec      0
     2020-11-22 21:28:19   is_active_input 0
     2020-11-22 21:28:19   is_stand_by     1
     2021-01-03 16:52:52   mediaAlbum     
     2021-01-03 16:52:52   mediaArtist     
     2021-01-03 19:35:22   mediaContentId 
     2021-01-03 19:35:22   mediaContentType
     2021-01-03 19:30:22   mediaCurrentPosPercent
     2021-01-03 19:30:22   mediaCurrentPosition
     2021-01-03 19:35:22   mediaDuration   
     2021-01-03 16:52:52   mediaImageHeight
     2021-01-03 16:52:52   mediaImageUrl   
     2021-01-03 16:52:52   mediaImageWidth
     2021-01-03 19:35:22   mediaPlayerState UNKNOWN
     2021-01-03 19:35:22   mediaStreamType UNKNOWN
     2021-01-03 16:52:52   mediaTitle     
     2020-11-22 21:28:19   model_name      Google Nest Mini
     2020-11-22 21:28:19   mute            0
     2020-11-22 21:28:19   name            Wohnzimmerlautsprecher
     2021-01-03 20:02:45   session_id      650da717-4f0b-49e3-b89a-4ff289dc5c1c
     2021-01-03 20:11:54   spotify_user    Marko Poschen (marko.poschen@gmx.de)
     2021-01-04 12:20:35   state           Failed to execute function Define: Traceback (most recent call last):
  File "/opt/fhem/.local/lib/python3.7/site-packages/fhempy/lib/fhem_pythonbinding.py", line 335, in _onMessage
    fct_timeout,
  File "/usr/lib/python3.7/asyncio/tasks.py", line 416, in wait_for
    return fut.result()
  File "/opt/fhem/.local/lib/python3.7/site-packages/fhempy/lib/googlecast/googlecast.py", line 112, in Define
    await super().Define(hash, args, argsh)
  File "/opt/fhem/.local/lib/python3.7/site-packages/fhempy/lib/generic.py", line 86, in Define
    await utils.handle_define_attr(self._conf_attr, self, hash)
  File "/opt/fhem/.local/lib/python3.7/site-packages/fhempy/lib/utils.py", line 108, in handle_define_attr
    await fct_call(hash)
  File "/opt/fhem/.local/lib/python3.7/site-packages/fhempy/lib/googlecast/googlecast.py", line 255, in set_attr_spotify_cookie
    data = st.start_session(self._attr_spotify_sp_dc, self._attr_spotify_sp_key)
  File "/opt/fhem/.local/lib/python3.7/site-packages/spotify_token.py", line 19, in start_session
    headers=headers, cookies=cookies)
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 546, in get
    return self.request('GET', url, **kwargs)
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 533, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 668, in send
    history = [resp for resp in gen] if allow_redirects else []
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 668, in <listcomp>
    history = [resp for resp in gen] if allow_redirects else []
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 165, in resolve_redirects
    raise TooManyRedirects('Exceeded %s redirects.' % self.max_redirects, response=resp)
requests.exceptions.TooManyRedirects: Exceeded 30 redirects.

     2021-01-03 20:02:45   status_text     Spotify
     2021-01-03 20:02:45   transport_id    650da717-4f0b-49e3-b89a-4ff289dc5c1c
     2020-11-22 21:28:19   uuid            ec715a28-897e-dc95-3c87-e44ecb1699c0
     2021-01-03 19:30:00   volume          65
   args:
     Wohnzimmerlautsprecher
     PythonModule
     googlecast
     Wohnzimmerlautsprecher
   argsh:
Attributes:
   IODev      local_pybinding
   favorite_1 https://open.spotify.com/playlist/4MwJ4E9RlPUii28R0t5dDL
   favorite_2 https://open.spotify.com/playlist/2RxtpesK6vFl9g4q9YQdwD
   group      Audiosystem
   icon       audio_loudness
   room       Devices,GAssistant
   spotify_sp_dc xxx
   spotify_sp_key xxx
   userattr   favorite_1 favorite_2 favorite_3 favorite_4 favorite_5
   verbose    3

dominik

#110
Achtung, bitte sp_dc und sp_key nicht posten.

Ok, ich glaube zuerst müssen wir aufräumen. Mir ist kein Modul außer discover_mdns bekannt welches Googlecast Devices anlegt. Irgendwas ist da in deiner FHEM Installation was da Devices anlegt, bitte das mal ausfindig machen und löschen damit wir von einem sauberen Stand weiter arbeiten können.

//Edit: Ich bring heute oder morgen noch ein Update, eventuell sind die Probleme mit Spotify dann auch behoben. Bitte aber dennoch mal aufräumen, da es sonst zu unübersichtlich in der Fehleranalyse wird.
fhempy -  https://github.com/fhempy/fhempy: GoogleCast, Tuya, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik

Superposchi

So, ich habe jetzt alle Devices gelöscht, das SpotifyMusic (Original Spotify-Modul), das Spotify (Fhempy-spotify), die drei manuellen Lautsprecher (fhempy-googlecast), die automatisch angelegten Lautsprecher (fhempy-googlecast) und ein discover_mdns-Device.

Das heißt ich muss morgen alles von Grund auf neu erstellen.

dominik

So...Fix ist online. Spotify sollte nun dauerhaft funktionieren.

Bitte um Test. Version: 0.1.15
fhempy -  https://github.com/fhempy/fhempy: GoogleCast, Tuya, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik

ReneH87

Zitat von: dominik am 02 Januar 2021, 15:49:20
Den Fehler mit 127.0.1.1 konnte ich finden und ist behoben. Sollte nicht mehr vorkommen, das 127.0.1.1 Device kannst du löschen.

klappt, kann den Fehler nicht mehr entdecken  :)

Nach dem Update ist mir das noch im abesetzen raspi aufgefallen im Log (funktioniert trotzdem alles, nur zur Info):
Jan 05 16:04:28 raspberrypi fhempy[3746]: 2021-01-05 16:04:28,844 - ERROR    - fhempy.lib.fhem: Timeout - NO RESPONSE for command: CommandDefine(undef, "fhempy_peer_192_168_5_7 BindingsIo 192.168.5.7:15733 Python")
Jan 05 16:04:28 raspberrypi fhempy[3746]: 2021-01-05 16:04:28,853 - ERROR    - fhempy.lib.fhem: Timeout - NO RESPONSE for command: CommandDefine(undef, "fhempy_peer_192_168_5_7 BindingsIo 192.168.5.7:15733 Python")
Jan 05 16:04:28 raspberrypi fhempy[3746]: 2021-01-05 16:04:28,858 - ERROR    - fhempy.lib.fhem: Timeout - NO RESPONSE for command: setDevAttrList('Badezimmer.GoogleHomeMini', 'favorite_1 favorite_2 favorite_3 favorite_4 favorite_5 spotify_sp_dc spotify_sp_key IODev '.$readingFnAttributes)
Jan 05 16:04:28 raspberrypi fhempy[3746]: 2021-01-05 16:04:28,872 - ERROR    - fhempy.lib.fhem: Timeout - NO RESPONSE for command: setDevAttrList('Schlafzimmer.LenovoSmartClock', 'favorite_1 favorite_2 favorite_3 favorite_4 favorite_5 spotify_sp_dc spotify_sp_key IODev '.$readingFnAttributes)
Jan 05 16:04:28 raspberrypi fhempy[3746]: 2021-01-05 16:04:28,878 - ERROR    - fhempy.lib.fhem: Timeout - NO RESPONSE for command: setDevAttrList('Wohnzimmer.SmartDisplay', 'favorite_1 favorite_2 favorite_3 favorite_4 favorite_5 spotify_sp_dc spotify_sp_key IODev '.$readingFnAttributes)

dominik

War das kurz nach dem Update vor dem Neustart? Oder nach dem Neustart?
fhempy -  https://github.com/fhempy/fhempy: GoogleCast, Tuya, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik

ReneH87

Das war nach einem Update und anschließenden Neustart von fhempy auf dem remote raspi. fhem hatte sich verbunden, dann ist fhempy auf dem remote raspi abgeschmiert, hat autom. neu gestartet und dann kamen die Meldungen. Hier mal das gesamte Log:

Jan 05 16:03:20 raspberrypi systemd[1]: Started FHEM PythonBinding.
Jan 05 16:03:25 raspberrypi fhempy[3733]: 2021-01-05 16:03:25,963 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy...
Jan 05 16:03:26 raspberrypi fhempy[3733]: 2021-01-05 16:03:26,199 - INFO     - fhempy.lib.fhem_pythonbinding: Advertise fhempy on local network
Jan 05 16:03:27 raspberrypi fhempy[3733]: 2021-01-05 16:03:27,113 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
Jan 05 16:03:35 raspberrypi fhempy[3733]: 2021-01-05 16:03:35,840 - INFO     - fhempy.lib.fhem_pythonbinding: Incoming FHEM connection: 192.168.5.2
Jan 05 16:03:36 raspberrypi fhempy[3733]: 2021-01-05 16:03:36,006 - INFO     - fhempy.lib.fhem_pythonbinding: Incoming FHEM connection: 192.168.5.2
Jan 05 16:03:47 raspberrypi fhempy[3733]: 2021-01-05 16:03:47,268 - ERROR    - fhempy.lib.fhem: Connection closed, can't send message.
Jan 05 16:03:47 raspberrypi fhempy[3733]: 2021-01-05 16:03:47,292 - ERROR    - fhempy.lib.fhem_pythonbinding: Connection closed error
Jan 05 16:03:47 raspberrypi fhempy[3733]: Traceback (most recent call last):
Jan 05 16:03:47 raspberrypi fhempy[3733]:   File "/home/pi/.local/lib/python3.7/site-packages/websockets/protocol.py", line 827, in transfer_data
Jan 05 16:03:47 raspberrypi fhempy[3733]:     message = await self.read_message()
Jan 05 16:03:47 raspberrypi fhempy[3733]:   File "/home/pi/.local/lib/python3.7/site-packages/websockets/protocol.py", line 895, in read_message
Jan 05 16:03:47 raspberrypi fhempy[3733]:     frame = await self.read_data_frame(max_size=self.max_size)
Jan 05 16:03:47 raspberrypi fhempy[3733]:   File "/home/pi/.local/lib/python3.7/site-packages/websockets/protocol.py", line 971, in read_data_frame
Jan 05 16:03:47 raspberrypi fhempy[3733]:     frame = await self.read_frame(max_size)
Jan 05 16:03:47 raspberrypi fhempy[3733]:   File "/home/pi/.local/lib/python3.7/site-packages/websockets/protocol.py", line 1051, in read_frame
Jan 05 16:03:47 raspberrypi fhempy[3733]:     extensions=self.extensions,
Jan 05 16:03:47 raspberrypi fhempy[3733]:   File "/home/pi/.local/lib/python3.7/site-packages/websockets/framing.py", line 105, in read
Jan 05 16:03:47 raspberrypi fhempy[3733]:     data = await reader(2)
Jan 05 16:03:47 raspberrypi fhempy[3733]:   File "/usr/lib/python3.7/asyncio/streams.py", line 679, in readexactly
Jan 05 16:03:47 raspberrypi fhempy[3733]:     await self._wait_for_data('readexactly')
Jan 05 16:03:47 raspberrypi fhempy[3733]:   File "/usr/lib/python3.7/asyncio/streams.py", line 473, in _wait_for_data
Jan 05 16:03:47 raspberrypi fhempy[3733]:     await self._waiter
Jan 05 16:03:47 raspberrypi fhempy[3733]: concurrent.futures._base.CancelledError
Jan 05 16:03:47 raspberrypi fhempy[3733]: The above exception was the direct cause of the following exception:
Jan 05 16:03:47 raspberrypi fhempy[3733]: Traceback (most recent call last):
Jan 05 16:03:47 raspberrypi fhempy[3733]:   File "/home/pi/.local/lib/python3.7/site-packages/fhempy/lib/fhem_pythonbinding.py", line 63, in pybinding
Jan 05 16:03:47 raspberrypi fhempy[3733]:     async for message in websocket:
Jan 05 16:03:47 raspberrypi fhempy[3733]:   File "/home/pi/.local/lib/python3.7/site-packages/websockets/protocol.py", line 439, in __aiter__
Jan 05 16:03:47 raspberrypi fhempy[3733]:     yield await self.recv()
Jan 05 16:03:47 raspberrypi fhempy[3733]:   File "/home/pi/.local/lib/python3.7/site-packages/websockets/protocol.py", line 509, in recv
Jan 05 16:03:47 raspberrypi fhempy[3733]:     await self.ensure_open()
Jan 05 16:03:47 raspberrypi fhempy[3733]:   File "/home/pi/.local/lib/python3.7/site-packages/websockets/protocol.py", line 803, in ensure_open
Jan 05 16:03:47 raspberrypi fhempy[3733]:     raise self.connection_closed_exc()
Jan 05 16:03:47 raspberrypi fhempy[3733]: websockets.exceptions.ConnectionClosedError: code = 1006 (connection closed abnormally [internal]), no reason
Jan 05 16:03:47 raspberrypi fhempy[3733]: 2021-01-05 16:03:47,323 - INFO     - fhempy.lib.fhem_pythonbinding: Restart binding
Jan 05 16:03:48 raspberrypi systemd[1]: fhempy.service: Main process exited, code=exited, status=1/FAILURE
Jan 05 16:03:48 raspberrypi systemd[1]: fhempy.service: Failed with result 'exit-code'.
Jan 05 16:03:48 raspberrypi systemd[1]: fhempy.service: Service RestartSec=100ms expired, scheduling restart.
Jan 05 16:03:48 raspberrypi systemd[1]: fhempy.service: Scheduled restart job, restart counter is at 1.
Jan 05 16:03:48 raspberrypi systemd[1]: Stopped FHEM PythonBinding.
Jan 05 16:03:48 raspberrypi systemd[1]: Started FHEM PythonBinding.
Jan 05 16:03:53 raspberrypi fhempy[3746]: 2021-01-05 16:03:53,192 - INFO     - fhempy.lib.fhem_pythonbinding: Starting fhempy...
Jan 05 16:03:53 raspberrypi fhempy[3746]: 2021-01-05 16:03:53,346 - INFO     - fhempy.lib.fhem_pythonbinding: Advertise fhempy on local network
Jan 05 16:03:54 raspberrypi fhempy[3746]: 2021-01-05 16:03:54,244 - INFO     - fhempy.lib.fhem_pythonbinding: Waiting for FHEM connection
Jan 05 16:04:02 raspberrypi fhempy[3746]: 2021-01-05 16:04:02,266 - INFO     - fhempy.lib.fhem_pythonbinding: Incoming FHEM connection: 192.168.5.2
Jan 05 16:04:02 raspberrypi fhempy[3746]: 2021-01-05 16:04:02,415 - INFO     - fhempy.lib.fhem_pythonbinding: Incoming FHEM connection: 192.168.5.2
Jan 05 16:04:28 raspberrypi fhempy[3746]: 2021-01-05 16:04:28,844 - ERROR    - fhempy.lib.fhem: Timeout - NO RESPONSE for command: CommandDefine(undef, "fhempy_peer_192_168_5_7 BindingsIo 192.168.5.7:15733 Python")
Jan 05 16:04:28 raspberrypi fhempy[3746]: 2021-01-05 16:04:28,853 - ERROR    - fhempy.lib.fhem: Timeout - NO RESPONSE for command: CommandDefine(undef, "fhempy_peer_192_168_5_7 BindingsIo 192.168.5.7:15733 Python")
Jan 05 16:04:28 raspberrypi fhempy[3746]: 2021-01-05 16:04:28,858 - ERROR    - fhempy.lib.fhem: Timeout - NO RESPONSE for command: setDevAttrList('Badezimmer.GoogleHomeMini', 'favorite_1 favorite_2 favorite_3 favorite_4 favorite_5 spotify_sp_dc spotify_sp_key IODev '.$readingFnAttributes)
Jan 05 16:04:28 raspberrypi fhempy[3746]: 2021-01-05 16:04:28,872 - ERROR    - fhempy.lib.fhem: Timeout - NO RESPONSE for command: setDevAttrList('Schlafzimmer.LenovoSmartClock', 'favorite_1 favorite_2 favorite_3 favorite_4 favorite_5 spotify_sp_dc spotify_sp_key IODev '.$readingFnAttributes)
Jan 05 16:04:28 raspberrypi fhempy[3746]: 2021-01-05 16:04:28,878 - ERROR    - fhempy.lib.fhem: Timeout - NO RESPONSE for command: setDevAttrList('Wohnzimmer.SmartDisplay', 'favorite_1 favorite_2 favorite_3 favorite_4 favorite_5 spotify_sp_dc spotify_sp_key IODev '.$readingFnAttributes)

dominik

Ah, da kommen 2 FHEM Connections rein statt eine, dann startet fhempy automatisch neu. Das dürfte irgendwo in DevIo.pm sein, den Fehler habe ich noch nicht gefunden.

Remote fhempy startet automatisch neu beim Update, da der das Update automatisch mitmacht.
fhempy -  https://github.com/fhempy/fhempy: GoogleCast, Tuya, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik

Superposchi

So, da ich gestern alle Devices auf deinen Wunsch gelöscht habe, wärst du so freundlich mal alles der Reihe nach mit mir durchzugehen.
Welche Devices brauche ich um
a) von Fhem aus auf meinen google-Nest per Speak Text abzusetzen
b) von Fhem ohne den Webplayer oder die App geöffnet zu haben Musik auf meinen Google-Nest abzuspielen

dominik

define castnest PythonModule googlecast MeinNestName

Danach noch sd_dc, sd_key.

Sonst nichts, probier bitte nur das und wenn es nicht geht, meldest du dich bitte.
fhempy -  https://github.com/fhempy/fhempy: GoogleCast, Tuya, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik

Superposchi

Hallo, also habe die beiden Google-Nest und die entsprechende Gruppe manuell wieder angelegt und sp_dc und sp_key aus dem inkognito-Browser in den Attributen eingefügt.
Speak funktioniert, wobei man jetzt nicht nur bei der Commandzeile sondern auch wenn man einen BEfehl über Set und die Auswahlfelder absetzt den Text in Anführungszeichen setzen muss. Play, also Spotify funktioniert hingegen nicht.
Was mir schon mal aufgefallen ist im Reading "Spotify_User" der Devices steht trotz der eingetragenen Attribute und einem Neustart immer noch "   
attr spotify_sp... required", genauso wie es sonst nur vor dem eintragen der Attribute erscheint.

Also sieht so aus, als wenn Attribute und die Sitzung des WebPlayers im Inkognito-Brwoser nicht passen würde.

Wie kann ich sicherstellen, dass der Webbrowser eine aktuelle Instanz verwendet und die aktuellsten sp_dc und sp_key Werte anzeigt?