-
-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot load on beta 2021.12.0b.0 #269
Comments
What's in your logs? Edit: installing beta as we speak to test myself as well |
Seeing this too. Debug logs: 2021-12-04 11:21:25 DEBUG (SyncWorker_10) [custom_components.spotcast.spotcast_controller] setting up with account t
2021-12-04 11:21:25 DEBUG (SyncWorker_10) [custom_components.spotcast.spotcast_controller] expires: 1638616055 time: 1638613285.3012052
2021-12-04 11:21:25 DEBUG (SyncWorker_10) [custom_components.spotcast.spotcast_controller] setting up with account t
2021-12-04 11:21:25 DEBUG (SyncWorker_10) [custom_components.spotcast.helpers] get_spotify_devices: media_player.spotify_t: Spotify T: []
2021-12-04 11:21:25 DEBUG (SyncWorker_10) [custom_components.spotcast.helpers] get_spotify_devices: {'devices': []}
2021-12-04 11:21:25 DEBUG (SyncWorker_10) [custom_components.spotcast.helpers] get_cast_devices: media_player.hele_huis: Hele huis cast info: ChromecastInfo(cast_info=CastInfo(services={ServiceInfo(type='host', data=('192.168.88.16', 32059)), ServiceInfo(type='mdns', data='google-cast-group-eec4b1d472ec428fad8f291a69a2d97d-1._googlecast._tcp.local.'), ServiceInfo(type='host', data=('[::ffff:c0a8:5810]', 32059))}, uuid=UUID('eec4b1d4-72ec-428f-ad8f-291a69a2d97d'), model_name='Google Cast Group', friendly_name='Hele huis', host='[::ffff:c0a8:5810]', port=32059, cast_type='group', manufacturer='Google Inc.'), is_dynamic_group=False)
2021-12-04 11:21:25 DEBUG (SyncWorker_10) [custom_components.spotcast.helpers] get_cast_devices: media_player.boven: Boven cast info: ChromecastInfo(cast_info=CastInfo(services={ServiceInfo(type='mdns', data='Google-Cast-Group-e18cddf284be43da9917ddb7d4ceb42c-1._googlecast._tcp.local.'), ServiceInfo(type='host', data=('[::ffff:c0a8:5811]', 32213)), ServiceInfo(type='host', data=('192.168.88.17', 32213))}, uuid=UUID('e18cddf2-84be-43da-9917-ddb7d4ceb42c'), model_name='Google Cast Group', friendly_name='Boven', host='[::ffff:c0a8:5811]', port=32213, cast_type='group', manufacturer='Google Inc.'), is_dynamic_group=False)
2021-12-04 11:21:25 DEBUG (SyncWorker_10) [custom_components.spotcast.helpers] get_cast_devices: media_player.zolder: Zolder cast info: ChromecastInfo(cast_info=CastInfo(services={ServiceInfo(type='host', data=('192.168.88.17', 8009)), ServiceInfo(type='host', data=('[::ffff:c0a8:5811]', 8009)), ServiceInfo(type='mdns', data='Google-Home-Mini-71d8c580bbd0166b72f10071a427b6cb._googlecast._tcp.local.')}, uuid=UUID('71d8c580-bbd0-166b-72f1-0071a427b6cb'), model_name='Google Home Mini', friendly_name='Zolder', host='[::ffff:c0a8:5811]', port=8009, cast_type='audio', manufacturer='Google Inc.'), is_dynamic_group=None)
2021-12-04 11:21:25 DEBUG (SyncWorker_10) [custom_components.spotcast.helpers] get_cast_devices: media_player.woonkamer: Woonkamer cast info: ChromecastInfo(cast_info=CastInfo(services={ServiceInfo(type='host', data=('[::ffff:c0a8:5810]', 8009)), ServiceInfo(type='host', data=('192.168.88.16', 8009)), ServiceInfo(type='mdns', data='google-nest-hub-4660f5b8aabe10031a93ebd362367256._googlecast._tcp.local.')}, uuid=UUID('4660f5b8-aabe-1003-1a93-ebd362367256'), model_name='Google Nest Hub', friendly_name='Woonkamer', host='[::ffff:c0a8:5810]', port=8009, cast_type='cast', manufacturer='Google Inc.'), is_dynamic_group=None)
2021-12-04 11:21:25 DEBUG (SyncWorker_10) [custom_components.spotcast.helpers] get_cast_devices: media_player.tv_slaapkamer: TV Slaapkamer cast info: ChromecastInfo(cast_info=CastInfo(services={ServiceInfo(type='host', data=('192.168.88.18', 8009)), ServiceInfo(type='mdns', data='TPM191E-bec05970880b9a0a6966437ba87df4fe._googlecast._tcp.local.')}, uuid=UUID('bec05970-880b-9a0a-6966-437ba87df4fe'), model_name='TPM191E', friendly_name='TV Slaapkamer', host='192.168.88.18', port=8009, cast_type='cast', manufacturer='Philips'), is_dynamic_group=None)
2021-12-04 11:21:25 DEBUG (SyncWorker_10) [custom_components.spotcast.helpers] get_cast_devices: media_player.slaapkamer: Slaapkamer cast info: ChromecastInfo(cast_info=CastInfo(services={ServiceInfo(type='host', data=('192.168.88.13', 8009)), ServiceInfo(type='mdns', data='Google-Home-Mini-0256c1dd13b44c80849b281970d02d11._googlecast._tcp.local.')}, uuid=UUID('0256c1dd-13b4-4c80-849b-281970d02d11'), model_name='Google Home Mini', friendly_name='Slaapkamer', host='192.168.88.13', port=8009, cast_type='audio', manufacturer='Google Inc.'), is_dynamic_group=None)
2021-12-04 11:21:25 DEBUG (SyncWorker_10) [custom_components.spotcast.helpers] get_cast_devices: media_player.studeerkamer: Studeerkamer cast info: ChromecastInfo(cast_info=CastInfo(services={ServiceInfo(type='host', data=('192.168.88.12', 8009)), ServiceInfo(type='mdns', data='Google-Home-d4063db0253e246c9d66d8f7fda77a6a._googlecast._tcp.local.')}, uuid=UUID('d4063db0-253e-246c-9d66-d8f7fda77a6a'), model_name='Google Home', friendly_name='Studeerkamer', host='192.168.88.12', port=8009, cast_type='audio', manufacturer='Google Inc.'), is_dynamic_group=None)
2021-12-04 11:21:25 DEBUG (SyncWorker_10) [custom_components.spotcast.helpers] get_cast_devices: media_player.soundbar: Soundbar cast info: ChromecastInfo(cast_info=CastInfo(services={ServiceInfo(type='host', data=('192.168.88.14', 8009)), ServiceInfo(type='mdns', data='B8805-81704a75fd037a7c38090eb3c5dffea5._googlecast._tcp.local.')}, uuid=UUID('81704a75-fd03-7a7c-3809-0eb3c5dffea5'), model_name='B8805', friendly_name='Soundbar', host='192.168.88.14', port=8009, cast_type='audio', manufacturer='Philips'), is_dynamic_group=None)
2021-12-04 11:21:25 DEBUG (SyncWorker_10) [custom_components.spotcast.helpers] get_cast_devices: media_player.tv_woonkamer: TV Woonkamer cast info: ChromecastInfo(cast_info=CastInfo(services={ServiceInfo(type='mdns', data='2021/22-Philips-UHD--587df1d4b0881d92a81d6c0dd78adf4d-1._googlecast._tcp.local.'), ServiceInfo(type='host', data=('192.168.88.15', 8009))}, uuid=UUID('587df1d4-b088-1d92-a81d-6c0dd78adf4d'), model_name='2021/22 Philips UHD Android TV', friendly_name='TV Woonkamer', host='192.168.88.15', port=8009, cast_type='cast', manufacturer='TPV'), is_dynamic_group=None)
2021-12-04 11:21:25 DEBUG (SyncWorker_10) [custom_components.spotcast.spotcast_controller] Chromecast devices: [ChromecastInfo(cast_info=CastInfo(services={ServiceInfo(type='host', data=('192.168.88.16', 32059)), ServiceInfo(type='mdns', data='google-cast-group-eec4b1d472ec428fad8f291a69a2d97d-1._googlecast._tcp.local.'), ServiceInfo(type='host', data=('[::ffff:c0a8:5810]', 32059))}, uuid=UUID('eec4b1d4-72ec-428f-ad8f-291a69a2d97d'), model_name='Google Cast Group', friendly_name='Hele huis', host='[::ffff:c0a8:5810]', port=32059, cast_type='group', manufacturer='Google Inc.'), is_dynamic_group=False), ChromecastInfo(cast_info=CastInfo(services={ServiceInfo(type='mdns', data='Google-Cast-Group-e18cddf284be43da9917ddb7d4ceb42c-1._googlecast._tcp.local.'), ServiceInfo(type='host', data=('[::ffff:c0a8:5811]', 32213)), ServiceInfo(type='host', data=('192.168.88.17', 32213))}, uuid=UUID('e18cddf2-84be-43da-9917-ddb7d4ceb42c'), model_name='Google Cast Group', friendly_name='Boven', host='[::ffff:c0a8:5811]', port=32213, cast_type='group', manufacturer='Google Inc.'), is_dynamic_group=False), ChromecastInfo(cast_info=CastInfo(services={ServiceInfo(type='host', data=('192.168.88.17', 8009)), ServiceInfo(type='host', data=('[::ffff:c0a8:5811]', 8009)), ServiceInfo(type='mdns', data='Google-Home-Mini-71d8c580bbd0166b72f10071a427b6cb._googlecast._tcp.local.')}, uuid=UUID('71d8c580-bbd0-166b-72f1-0071a427b6cb'), model_name='Google Home Mini', friendly_name='Zolder', host='[::ffff:c0a8:5811]', port=8009, cast_type='audio', manufacturer='Google Inc.'), is_dynamic_group=None), ChromecastInfo(cast_info=CastInfo(services={ServiceInfo(type='host', data=('[::ffff:c0a8:5810]', 8009)), ServiceInfo(type='host', data=('192.168.88.16', 8009)), ServiceInfo(type='mdns', data='google-nest-hub-4660f5b8aabe10031a93ebd362367256._googlecast._tcp.local.')}, uuid=UUID('4660f5b8-aabe-1003-1a93-ebd362367256'), model_name='Google Nest Hub', friendly_name='Woonkamer', host='[::ffff:c0a8:5810]', port=8009, cast_type='cast', manufacturer='Google Inc.'), is_dynamic_group=None), ChromecastInfo(cast_info=CastInfo(services={ServiceInfo(type='host', data=('192.168.88.18', 8009)), ServiceInfo(type='mdns', data='TPM191E-bec05970880b9a0a6966437ba87df4fe._googlecast._tcp.local.')}, uuid=UUID('bec05970-880b-9a0a-6966-437ba87df4fe'), model_name='TPM191E', friendly_name='TV Slaapkamer', host='192.168.88.18', port=8009, cast_type='cast', manufacturer='Philips'), is_dynamic_group=None), ChromecastInfo(cast_info=CastInfo(services={ServiceInfo(type='host', data=('192.168.88.13', 8009)), ServiceInfo(type='mdns', data='Google-Home-Mini-0256c1dd13b44c80849b281970d02d11._googlecast._tcp.local.')}, uuid=UUID('0256c1dd-13b4-4c80-849b-281970d02d11'), model_name='Google Home Mini', friendly_name='Slaapkamer', host='192.168.88.13', port=8009, cast_type='audio', manufacturer='Google Inc.'), is_dynamic_group=None), ChromecastInfo(cast_info=CastInfo(services={ServiceInfo(type='host', data=('192.168.88.12', 8009)), ServiceInfo(type='mdns', data='Google-Home-d4063db0253e246c9d66d8f7fda77a6a._googlecast._tcp.local.')}, uuid=UUID('d4063db0-253e-246c-9d66-d8f7fda77a6a'), model_name='Google Home', friendly_name='Studeerkamer', host='192.168.88.12', port=8009, cast_type='audio', manufacturer='Google Inc.'), is_dynamic_group=None), ChromecastInfo(cast_info=CastInfo(services={ServiceInfo(type='host', data=('192.168.88.14', 8009)), ServiceInfo(type='mdns', data='B8805-81704a75fd037a7c38090eb3c5dffea5._googlecast._tcp.local.')}, uuid=UUID('81704a75-fd03-7a7c-3809-0eb3c5dffea5'), model_name='B8805', friendly_name='Soundbar', host='192.168.88.14', port=8009, cast_type='audio', manufacturer='Philips'), is_dynamic_group=None), ChromecastInfo(cast_info=CastInfo(services={ServiceInfo(type='mdns', data='2021/22-Philips-UHD--587df1d4b0881d92a81d6c0dd78adf4d-1._googlecast._tcp.local.'), ServiceInfo(type='host', data=('192.168.88.15', 8009))}, uuid=UUID('587df1d4-b088-1d92-a81d-6c0dd78adf4d'), model_name='2021/22 Philips UHD Android TV', friendly_name='TV Woonkamer', host='192.168.88.15', port=8009, cast_type='cast', manufacturer='TPV'), is_dynamic_group=None)]
2021-12-04 11:21:25 DEBUG (SyncWorker_10) [custom_components.spotcast.spotcast_controller] cast info: ChromecastInfo(cast_info=CastInfo(services={ServiceInfo(type='host', data=('192.168.88.13', 8009)), ServiceInfo(type='mdns', data='Google-Home-Mini-0256c1dd13b44c80849b281970d02d11._googlecast._tcp.local.')}, uuid=UUID('0256c1dd-13b4-4c80-849b-281970d02d11'), model_name='Google Home Mini', friendly_name='Slaapkamer', host='192.168.88.13', port=8009, cast_type='audio', manufacturer='Google Inc.'), is_dynamic_group=None)
2021-12-04 11:21:25 ERROR (MainThread) [homeassistant.components.script.start_music_t] Slaaptijd: Error executing script. Unexpected error for call_service at pos 2: 'ChromecastInfo' object has no attribute 'cast_type'
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 381, in _async_step
await getattr(self, handler)()
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 584, in _async_call_service_step
await service_task
File "/usr/src/homeassistant/homeassistant/core.py", line 1495, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1534, in _execute_service
await self._hass.async_add_executor_job(handler.job.target, service_call)
File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/spotcast/__init__.py", line 156, in start_casting
spotify_device_id = spotcast_controller.get_spotify_device_id(
File "/config/custom_components/spotcast/spotcast_controller.py", line 196, in get_spotify_device_id
spotify_cast_device = SpotifyCastDevice(
File "/config/custom_components/spotcast/spotcast_controller.py", line 51, in __init__
self.castDevice = self.getChromecastDevice(device_name)
File "/config/custom_components/spotcast/spotcast_controller.py", line 70, in getChromecastDevice
return pychromecast.get_chromecast_from_cast_info(
File "/usr/local/lib/python3.9/site-packages/pychromecast/__init__.py", line 69, in get_chromecast_from_cast_info
return Chromecast(
File "/usr/local/lib/python3.9/site-packages/pychromecast/__init__.py", line 271, in __init__
if not cast_info.cast_type:
AttributeError: 'ChromecastInfo' object has no attribute 'cast_type'
2021-12-04 11:21:25 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140158036160768] 'ChromecastInfo' object has no attribute 'cast_type'
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 185, in handle_call_service
await hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 1495, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1530, in _execute_service
await handler.job.target(service_call)
File "/usr/src/homeassistant/homeassistant/components/script/__init__.py", line 273, in service_handler
await script_entity.async_turn_on(
File "/usr/src/homeassistant/homeassistant/components/script/__init__.py", line 377, in async_turn_on
await coro
File "/usr/src/homeassistant/homeassistant/components/script/__init__.py", line 403, in _async_run
return await self.script.async_run(script_vars, context)
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1259, in async_run
await asyncio.shield(run.async_run())
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 363, in async_run
await self._async_step(log_exceptions=False)
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 381, in _async_step
await getattr(self, handler)()
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 584, in _async_call_service_step
await service_task
File "/usr/src/homeassistant/homeassistant/core.py", line 1495, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1534, in _execute_service
await self._hass.async_add_executor_job(handler.job.target, service_call)
File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/spotcast/__init__.py", line 156, in start_casting
spotify_device_id = spotcast_controller.get_spotify_device_id(
File "/config/custom_components/spotcast/spotcast_controller.py", line 196, in get_spotify_device_id
spotify_cast_device = SpotifyCastDevice(
File "/config/custom_components/spotcast/spotcast_controller.py", line 51, in __init__
self.castDevice = self.getChromecastDevice(device_name)
File "/config/custom_components/spotcast/spotcast_controller.py", line 70, in getChromecastDevice
return pychromecast.get_chromecast_from_cast_info(
File "/usr/local/lib/python3.9/site-packages/pychromecast/__init__.py", line 69, in get_chromecast_from_cast_info
return Chromecast(
File "/usr/local/lib/python3.9/site-packages/pychromecast/__init__.py", line 271, in __init__
if not cast_info.cast_type:
AttributeError: 'ChromecastInfo' object has no attribute 'cast_type' |
Probably caused by home-assistant/core#60205 |
Should we raise an issue in the Core? |
It needs to be changed in Spotcast, as per maintainer of
|
Ok. Thank you. We will have to wait for Fondberg & Co, then |
It might be a fairly easy fix, I think I fixed it locally. Willing to try? in file cast_info.cast_info, ChromeCastZeroconf.get_zeroconf() Restart HA and see if it is fixed |
Didn't work for me. Same error in log |
When I com to think of it my error log is maybe different from yours Logger: homeassistant.components.websocket_api.http.connection [140631677502464] Error handling message: Unknown error |
Ah, the error is different, but the fix is in the PR too. In your case the sensor failed, in my case starting a stream failed. Both are fixed in #271 |
You're the man. Everything works again, so your PR is ready for merging. Thank you very much |
Mine loads but when I want to start casting in my automation it does this even with the patch: ChromecastInfo' object has no attribute 'cast_type' |
Wait I might have applied the patch incorrectly |
Will your PR be merged soon as an update to the custom component from Fondberg? |
I managed to patch correctly and it does work thanks |
After upgrading to the new beta the Spotcast cannot load.
The release notes say that Spotipy has been upgraded to 2.19.0
The text was updated successfully, but these errors were encountered: