Open TailScaleRem opened 3 days ago
@TailScaleRem
What kind of device are you trying to reach? Have you tried with entity_id instead of device name?
@fcusson Google Home Mini, Google Home and Google Home Display. With the entity its the Same Error. It worked until about 10 days ago.
@TailScaleRem, could you provide a debug log? Hard to say what is the issue currently.
Also, can you confirm the name of your device in Home Assistant is the same as the device in the Google Home App?
Is this OK?
Name in Home Assistant and Google Home are the Same.
2024-11-23 18:48:52.208 INFO (MainThread) [homeassistant.components.script.1712941494483] Schlafzimmer Google Gute Nacht Geschichten: Running script sequence 2024-11-23 18:48:52.209 INFO (MainThread) [homeassistant.components.script.1712941494483] Schlafzimmer Google Gute Nacht Geschichten: Executing step call service 2024-11-23 18:48:52.211 DEBUG (SyncWorker_59) [custom_components.spotcast.spotcast_controller] setting up with account default 2024-11-23 18:48:52.535 DEBUG (SyncWorker_59) [custom_components.spotcast.spotcast_controller] expires: 1732387432 time: 1732384132.5350313 2024-11-23 18:48:52.535 DEBUG (SyncWorker_59) [custom_components.spotcast.spotcast_controller] setting up with account default 2024-11-23 18:48:52.954 ERROR (MainThread) [homeassistant.components.script.1712941494483] Schlafzimmer Google Gute Nacht Geschichten: Error executing script. Error for call_service at pos 1: Could not find spotify media player.
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/spotcast/__init__.py", line 378, in start_casting raise exc File "/config/custom_components/spotcast/__init__.py", line 273, in start_casting spotify_device_id = spotcast_controller.get_spotify_device_id( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/spotcast/spotcast_controller.py", line 291, in get_spotify_device_id spotify_device_id = self._getSpotifyConnectDeviceId( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/spotcast/spotcast_controller.py", line 273, in _getSpotifyConnectDeviceId media_player = get_spotify_media_player( ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/spotcast/helpers.py", line 63, in get_spotify_media_player raise HomeAssistantError("Could not find spotify media player.") homeassistant.exceptions.HomeAssistantError: Could not find spotify media player.
That's just the standard log, can you add the debug log config I linked to your configuration.yaml file?
The you just reboot and launch the script again. You will have more detail in your logs
[Uploading home-assistant_spotcast_2024-11-24T06-20-16.524Z.log…]() I thought I did... I cant find more about spotcast, is it in the same file?
Or do you want the whole File?
I can confirm, I have the same issue, not detecting any devices and no errors on normal log
2024-11-24 14:20:14.353 INFO (MainThread) [homeassistant.setup] Setting up spotcast
2024-11-24 14:20:14.355 INFO (MainThread) [homeassistant.setup] Setup of domain spotcast took 0.00 seconds
2024-11-24 14:20:47.429 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'spotcast' calls `async_add_job`, which is deprecated and will be removed in Home Assistant 2025.4; Please review https://developers.home-assistant.io/blog/2024/03/13/deprecate_add_run_job for replacement options at custom_components/spotcast/__init__.py, line 154: hass.async_add_job(get_devices()), please create a bug report at https://github.com/fondberg/spotcast/issues
2024-11-24 14:20:51.160 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'spotcast' calls `async_add_job`, which is deprecated and will be removed in Home Assistant 2025.4; Please review https://developers.home-assistant.io/blog/2024/03/13/deprecate_add_run_job for replacement options at custom_components/spotcast/__init__.py, line 172: hass.async_add_job(get_player()), please create a bug report at https://github.com/fondberg/spotcast/issues
2024-11-24 14:20:51.311 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'spotcast' calls `async_add_job`, which is deprecated and will be removed in Home Assistant 2025.4; Please review https://developers.home-assistant.io/blog/2024/03/13/deprecate_add_run_job for replacement options at custom_components/spotcast/__init__.py, line 134: hass.async_add_job(get_playlist()), please create a bug report at https://github.com/fondberg/spotcast/issues
Ok,
I enabled debug for spotcast. (see below : it connects (anonymized))
2024-11-24 14:29:17.336 DEBUG (SyncWorker_9) [custom_components.spotcast.spotcast_controller] setting up with account default
2024-11-24 14:29:17.336 DEBUG (SyncWorker_9) [custom_components.spotcast.spotcast_controller] expires: 1732461347 time: 1732458557.3366394
2024-11-24 14:29:17.494 DEBUG (SyncWorker_9) [custom_components.spotcast.helpers] get_spotify_devices: media_player.spotify_MY_ACCOUNT: None: []
2024-11-24 14:29:20.945 DEBUG (SyncWorker_2) [custom_components.spotcast.spotcast_controller] setting up with account default
2024-11-24 14:29:20.945 DEBUG (SyncWorker_2) [custom_components.spotcast.spotcast_controller] expires: 1732461347 time: 1732458560.9459348
2024-11-24 14:29:21.075 DEBUG (SyncWorker_2) [custom_components.spotcast.helpers] get_spotify_devices: media_player.spotify_MY_ACCOUNT None: []
2024-11-24 14:29:21.169 DEBUG (SyncWorker_15) [custom_components.spotcast] websocket_handle_player msg: {'type': 'spotcast/player', 'id': 46}
2024-11-24 14:29:21.169 DEBUG (SyncWorker_15) [custom_components.spotcast.spotcast_controller] setting up with account default
2024-11-24 14:29:21.169 DEBUG (SyncWorker_15) [custom_components.spotcast.spotcast_controller] expires: 1732461347 time: 1732458561.1699727
I do see it detecting all my devices (see below, with IP and MAC anonymized), but it is not populating the list.
2024-11-24 14:29:21.292 DEBUG (MainThread) [custom_components.spotcast] websocket_handle_castdevices msg: {'type': 'spotcast/castdevices', 'id': 48}
2024-11-24 14:29:21.292 DEBUG (MainThread) [custom_components.spotcast.helpers] get_cast_devices: media_player.office_display: None cast info: ChromecastInfo(cast_info=CastInfo(services={HostServiceInfo(host='XXX.XXX.XXX.107', port=8009), MDNSServiceInfo(name='Google-Nest-Hub-MAC_ADDRESS._googlecast._tcp.local.')}, uuid=UUID('a8033ba6-7a0f-b557-f541-785bd79f3669'), model_name='Google Nest Hub', friendly_name='Office display', host='XXX.XXX.XXX.107', port=8009, cast_type='cast', manufacturer='Google Inc.'), is_dynamic_group=None)
2024-11-24 14:29:21.292 DEBUG (MainThread) [custom_components.spotcast.helpers] get_cast_devices: media_player.chromecast3338: None cast info: ChromecastInfo(cast_info=CastInfo(services={MDNSServiceInfo(name='Chromecast-MAC_ADDRESS._googlecast._tcp.local.'), HostServiceInfo(host='XXX.XXX.XXX.104', port=8009)}, uuid=UUID('37643ff9-1d6e-e64f-875b-d09780e9b102'), model_name='Chromecast', friendly_name='Leonor room TV', host='XXX.XXX.XXX.104', port=8009, cast_type='cast', manufacturer='Google Inc.'), is_dynamic_group=None)
2024-11-24 14:29:21.292 DEBUG (MainThread) [custom_components.spotcast.helpers] get_cast_devices: media_player.living_room_tv_cast: None cast info: ChromecastInfo(cast_info=CastInfo(services={HostServiceInfo(host='XXX.XXX.XXX.26', port=8009), MDNSServiceInfo(name='BRAVIA-VH1-MAC_ADDRESS._googlecast._tcp.local.')}, uuid=UUID('d72e88ad-78e7-0e4c-967d-0d0830adf250'), model_name='BRAVIA VH1', friendly_name='Living Room TV', host='XXX.XXX.XXX.26', port=8009, cast_type='cast', manufacturer='Sony'), is_dynamic_group=None)
2024-11-24 14:29:21.292 DEBUG (MainThread) [custom_components.spotcast.helpers] get_cast_devices: media_player.master_room_clock: None cast info: ChromecastInfo(cast_info=CastInfo(services={HostServiceInfo(host='XXX.XXX.XXX.106', port=8009), HostServiceInfo(host='[::ffff:c0a8:16a]', port=8009), MDNSServiceInfo(name='Lenovo-Smart-Clock-MAC_ADDRESS._googlecast._tcp.local.')}, uuid=UUID('e4e8dce1-d01b-2f2c-8354-5a158cb7589b'), model_name='Lenovo Smart Clock', friendly_name='Master Room clock', host='[::ffff:c0a8:16a]', port=8009, cast_type='audio', manufacturer='LENOVO'), is_dynamic_group=None)
2024-11-24 14:29:21.293 DEBUG (MainThread) [custom_components.spotcast.helpers] get_cast_devices: media_player.home_group: None cast info: ChromecastInfo(cast_info=CastInfo(services={MDNSServiceInfo(name='Google-Cast-Group-MAC_ADDRESS._googlecast._tcp.local.'), HostServiceInfo(host='XXX.XXX.XXX.106', port=32085), HostServiceInfo(host='[::ffff:c0a8:16a]', port=32085)}, uuid=UUID('a6a27230-69f5-4312-8f81-aab07736d3a1'), model_name='Google Cast Group', friendly_name='Home group', host='[::ffff:c0a8:16a]', port=32085, cast_type='group', manufacturer='Google Inc.'), is_dynamic_group=False)
2024-11-24 14:29:21.293 DEBUG (MainThread) [custom_components.spotcast.helpers] get_cast_devices: media_player.kitchen_speaker: None cast info: ChromecastInfo(cast_info=CastInfo(services={MDNSServiceInfo(name='Google-Home-Mini-MAC_ADDRESS._googlecast._tcp.local.'), HostServiceInfo(host='XXX.XXX.XXX.101', port=8009)}, uuid=UUID('9444801d-d104-95f5-3570-f3a548bbe59e'), model_name='Google Home Mini', friendly_name='Kitchen Speaker', host='XXX.XXX.XXX.101', port=8009, cast_type='audio', manufacturer='Google Inc.'), is_dynamic_group=None)
2024-11-24 14:29:21.293 DEBUG (MainThread) [custom_components.spotcast.helpers] get_cast_devices: media_player.living_room_speaker: None cast info: ChromecastInfo(cast_info=CastInfo(services={HostServiceInfo(host='XXX.XXX.XXX.100', port=8009), MDNSServiceInfo(name='Google-Home-MAC_ADDRESS._googlecast._tcp.local.')}, uuid=UUID('4f4b8068-9934-24a9-241c-23f0a90188c7'), model_name='Google Home', friendly_name='Living Room speaker', host='XXX.XXX.XXX.100', port=8009, cast_type='audio', manufacturer='Google Inc.'), is_dynamic_group=None)
2024-11-24 14:29:21.293 DEBUG (MainThread) [custom_components.spotcast] [ChromecastInfo(cast_info=CastInfo(services={HostServiceInfo(host='XXX.XXX.XXX.107', port=8009), MDNSServiceInfo(name='Google-Nest-Hub-MAC_ADDRESS._googlecast._tcp.local.')}, uuid=UUID('a8033ba6-7a0f-b557-f541-785bd79f3669'), model_name='Google Nest Hub', friendly_name='Office display', host='XXX.XXX.XXX.107', port=8009, cast_type='cast', manufacturer='Google Inc.'), is_dynamic_group=None), ChromecastInfo(cast_info=CastInfo(services={MDNSServiceInfo(name='Chromecast-MAC_ADDRESS._googlecast._tcp.local.'), HostServiceInfo(host='XXX.XXX.XXX.104', port=8009)}, uuid=UUID('37643ff9-1d6e-e64f-875b-d09780e9b102'), model_name='Chromecast', friendly_name='Leonor room TV', host='XXX.XXX.XXX.104', port=8009, cast_type='cast', manufacturer='Google Inc.'), is_dynamic_group=None), ChromecastInfo(cast_info=CastInfo(services={HostServiceInfo(host='XXX.XXX.XXX.26', port=8009), MDNSServiceInfo(name='BRAVIA-VH1-MAC_ADDRESS._googlecast._tcp.local.')}, uuid=UUID('d72e88ad-78e7-0e4c-967d-0d0830adf250'), model_name='BRAVIA VH1', friendly_name='Living Room TV', host='XXX.XXX.XXX.26', port=8009, cast_type='cast', manufacturer='Sony'), is_dynamic_group=None), ChromecastInfo(cast_info=CastInfo(services={HostServiceInfo(host='XXX.XXX.XXX.106', port=8009), HostServiceInfo(host='[::ffff:c0a8:16a]', port=8009), MDNSServiceInfo(name='Lenovo-Smart-Clock-MAC_ADDRESS._googlecast._tcp.local.')}, uuid=UUID('e4e8dce1-d01b-2f2c-8354-5a158cb7589b'), model_name='Lenovo Smart Clock', friendly_name='Master Room clock', host='[::ffff:c0a8:16a]', port=8009, cast_type='audio', manufacturer='LENOVO'), is_dynamic_group=None), ChromecastInfo(cast_info=CastInfo(services={MDNSServiceInfo(name='Google-Cast-Group-MAC_ADDRESS._googlecast._tcp.local.'), HostServiceInfo(host='XXX.XXX.XXX.106', port=32085), HostServiceInfo(host='[::ffff:c0a8:16a]', port=32085)}, uuid=UUID('a6a27230-69f5-4312-8f81-aab07736d3a1'), model_name='Google Cast Group', friendly_name='Home group', host='[::ffff:c0a8:16a]', port=32085, cast_type='group', manufacturer='Google Inc.'), is_dynamic_group=False), ChromecastInfo(cast_info=CastInfo(services={MDNSServiceInfo(name='Google-Home-Mini-MAC_ADDRESS._googlecast._tcp.local.'), HostServiceInfo(host='XXX.XXX.XXX.101', port=8009)}, uuid=UUID('9444801d-d104-95f5-3570-f3a548bbe59e'), model_name='Google Home Mini', friendly_name='Kitchen Speaker', host='XXX.XXX.XXX.101', port=8009, cast_type='audio', manufacturer='Google Inc.'), is_dynamic_group=None), ChromecastInfo(cast_info=CastInfo(services={HostServiceInfo(host='XXX.XXX.XXX.100', port=8009), MDNSServiceInfo(name='Google-Home-MAC_ADDRESS._googlecast._tcp.local.')}, uuid=UUID('4f4b8068-9934-24a9-241c-23f0a90188c7'), model_name='Google Home', friendly_name='Living Room speaker', host='XXX.XXX.XXX.100', port=8009, cast_type='audio', manufacturer='Google Inc.'), is_dynamic_group=None)]
@cinzas what you are showing is Spotify Card not spotcast. Have you moved to Spotify Card V2 because the older version is abandon-ware and is not possible to make work with Home Assistant 2024.11 and later. Nothing we can do from this end.
Also you issue is not the same the reporter of the issue is having issue calling the spotcast service. Not an issue with Spotify Card
try to check that your sp_dc and sp_key have not changed...
@VicenteKER, there is no token error in the logs, looks like @cinzas is still using the deprecated spotify-card.
@fcusson ... and you are right :) Thanks, I was using the old spotify-card, was not aware of v2. It works now :)
@cinzas good glad I could help. I added a note in the readme to help other know about the new fork
I deleted everything again (Spotify Integration and Spotcast) and installed everything from Scratch.
I connected Spotify and generated new Secrets from the Cookie. But the Same Error occurs.
@TailScaleRem I will really need some debug logs to be able to go much further. You can look at Cinzas answers, these are true debug logs. There should be a mention DEBUG
at the start of the log entry. I will have to follow where you got in the integration before failling to understand where Spotcast is breaking. Currently there's too much potential failure point for me to know.
In the meantime, can you confirm, that if you start playback from somewhere else (like the spotify app), is the main Spotify Integration working properly?
To be honest, I don't know if the Spotify integration works properly. I use it purely in conjunction with Spotcast. When I play something on a Chromecast via Spotify, I can see that:
Does this help?:
`2024-11-26 07:46:05.830 DEBUG (SyncWorker_46) [custom_components.spotcast.sensor] Getting playlists |
---|
2024-11-26 07:46:05.830 DEBUG (SyncWorker_46) [custom_components.spotcast.spotcast_controller] setting up with account default 2024-11-26 07:46:05.830 DEBUG (SyncWorker_46) [custom_components.spotcast.spotcast_controller] expires: 1732605486 time: 1732603565.830438 2024-11-26 07:47:05.825 DEBUG (SyncWorker_2) [custom_components.spotcast.sensor] Getting chromecast devices | 2024-11-26 07:47:05.825 DEBUG (SyncWorker_2) [custom_components.spotcast.helpers] get_cast_devices: media_player.schlafzimmer: None cast info: ChromecastInfo(cast_info=CastInfo(services={MDNSServiceInfo(name='Google-Home-Mini-9b7e1c4dbc68529db112e9185f427715._googlecast._tcp.local.'), HostServiceInfo(host='192.168.178.190', port=8009)}, uuid=UUID('9b7e1c4d-bc68-529d-b112-e9185f427715'), model_name='Google Home Mini', friendly_name='Schlafzimmer', host='192.168.178.190', port=8009, cast_type='audio', manufacturer='Google Inc.'), is_dynamic_group=None) 2024-11-26 07:47:05.825 DEBUG (SyncWorker_2) [custom_components.spotcast.helpers] get_cast_devices: media_player.kuche: None cast info: ChromecastInfo(cast_info=CastInfo(services={HostServiceInfo(host='192.168.178.28', port=8009), MDNSServiceInfo(name='Google-Nest-Hub-218d908707265d7eac31e224c77fc23e._googlecast._tcp.local.')}, uuid=UUID('218d9087-0726-5d7e-ac31-e224c77fc23e'), model_name='Google Nest Hub', friendly_name='Esszimmer', host='192.168.178.28', port=8009, cast_type='cast', manufacturer='Google Inc.'), is_dynamic_group=None) 2024-11-26 07:47:05.825 DEBUG (SyncWorker_2) [custom_components.spotcast.helpers] get_cast_devices: media_player.googlehome4628: None cast info: ChromecastInfo(cast_info=CastInfo(services={HostServiceInfo(host='192.168.178.41', port=8009), MDNSServiceInfo(name='Google-Home-Mini-86eb53a74cd6c13964c917c7f0bccb81._googlecast._tcp.local.')}, uuid=UUID('86eb53a7-4cd6-c139-64c9-17c7f0bccb81'), model_name='Google Home Mini', friendly_name='Moritz', host='192.168.178.41', port=8009, cast_type='audio', manufacturer='Google Inc.'), is_dynamic_group=None) 2024-11-26 07:47:05.825 DEBUG (SyncWorker_2) [custom_components.spotcast.helpers] get_cast_devices: media_player.googlehome0203: None cast info: ChromecastInfo(cast_info=CastInfo(services={HostServiceInfo(host='192.168.178.25', port=8009), MDNSServiceInfo(name='Google-Home-a22d996574486009a3b351f0634471ef._googlecast._tcp.local.')}, uuid=UUID('a22d9965-7448-6009-a3b3-51f0634471ef'), model_name='Google Home', friendly_name='Google Home', host='192.168.178.25', port=8009, cast_type='audio', manufacturer='Google Inc.'), is_dynamic_group=None) 2024-11-26 07:47:05.826 DEBUG (SyncWorker_2) [custom_components.spotcast.helpers] get_cast_devices: media_player.googlehome7702: None cast info: ChromecastInfo(cast_info=CastInfo(services={MDNSServiceInfo(name='Google-Home-Mini-1469426ed5e18855fb87921d6710bd25._googlecast._tcp.local.'), HostServiceInfo(host='192.168.178.29', port=8009)}, uuid=UUID('1469426e-d5e1-8855-fb87-921d6710bd25'), model_name='Google Home Mini', friendly_name='Bad', host='192.168.178.29', port=8009, cast_type='audio', manufacturer='Google Inc.'), is_dynamic_group=None) 2024-11-26 07:47:05.826 DEBUG (SyncWorker_2) [custom_components.spotcast.sensor] sensor devices [ChromecastInfo(cast_info=CastInfo(services={MDNSServiceInfo(name='Google-Home-Mini-9b7e1c4dbc68529db112e9185f427715._googlecast._tcp.local.'), HostServiceInfo(host='192.168.178.190', port=8009)}, uuid=UUID('9b7e1c4d-bc68-529d-b112-e9185f427715'), model_name='Google Home Mini', friendly_name='Schlafzimmer', host='192.168.178.190', port=8009, cast_type='audio', manufacturer='Google Inc.'), is_dynamic_group=None), ChromecastInfo(cast_info=CastInfo(services={HostServiceInfo(host='192.168.178.28', port=8009), MDNSServiceInfo(name='Google-Nest-Hub-218d908707265d7eac31e224c77fc23e._googlecast._tcp.local.')}, uuid=UUID('218d9087-0726-5d7e-ac31-e224c77fc23e'), model_name='Google Nest Hub', friendly_name='Esszimmer', host='192.168.178.28', port=8009, cast_type='cast', manufacturer='Google Inc.'), is_dynamic_group=None), ChromecastInfo(cast_info=CastInfo(services={HostServiceInfo(host='192.168.178.41', port=8009), MDNSServiceInfo(name='Google-Home-Mini-86eb53a74cd6c13964c917c7f0bccb81._googlecast._tcp.local.')}, uuid=UUID('86eb53a7-4cd6-c139-64c9-17c7f0bccb81'), model_name='Google Home Mini', friendly_name='Moritz', host='192.168.178.41', port=8009, cast_type='audio', manufacturer='Google Inc.'), is_dynamic_group=None), ChromecastInfo(cast_info=CastInfo(services={HostServiceInfo(host='192.168.178.25', port=8009), MDNSServiceInfo(name='Google-Home-a22d996574486009a3b351f0634471ef._googlecast._tcp.local.')}, uuid=UUID('a22d9965-7448-6009-a3b3-51f0634471ef'), model_name='Google Home', friendly_name='Google Home', host='192.168.178.25', port=8009, cast_type='audio', manufacturer='Google Inc.'), is_dynamic_group=None), ChromecastInfo(cast_info=CastInfo(services={MDNSServiceInfo(name='Google-Home-Mini-1469426ed5e18855fb87921d6710bd25._googlecast._tcp.local.'), HostServiceInfo(host='192.168.178.29', port=8009)}, uuid=UUID('1469426e-d5e1-8855-fb87-921d6710bd25'), model_name='Google Home Mini', friendly_name='Bad', host='192.168.178.29', port=8009, cast_type='audio', manufacturer='Google Inc.'), is_dynamic_group=None)] `
My Spotcast Media Player entity is empty. There are no sources available.
Bug Ticket
Describe the bug
Hi there, My Spotcast integration stopped working a few days ago. When starting spotcast.start the error "Could not find spotify media player" appears. I have already re-read and re-entered the keys for Spotcast and created a new app for the Spotify integration.
Does anyone have an idea?
Spotcast is Version 4.0, Home Assistant CORE is 2024.11.2
Troubleshooting
Make sure to validate all the elements before submitting the ticket (Exception to the steps marked as optional)
sp_dc
andsp_key
values and restarted Home Assistant (see README)Environment
Configuration
Service Call
If relevant, provide a
yaml
of the service call or explain the action taken to replicate the issue.Logs
Additional context