Closed blueshiftlabs closed 2 years ago
cast documentation cast source (message by IssueLinks)
Hey there @emontnemery, mind taking a look at this issue as it has been labeled with an integration (cast
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
Please share a log with these settings showing what happens when you start playing media:
logger:
default: info
logs:
homeassistant.core: debug
homeassistant.components.cast: debug
homeassistant.components.cast.media_player: debug
pychromecast: debug
pychromecast.discovery: debug
pychromecast.socket_client: debug
The determining factor seems to be what HA version started the cast, not which HA version is reading the attribute. I started media playback on 2021.12.1, and upgraded to 2021.12.2 while continuing playback, and the attributes appeared. When I turned off the media_player
and cast again, the attributes did not appear.
Right. We do use a different method to start playing the media in 2021.12.2, maybe that's causing it. I can't reproduce it though, could you please share logs?
Also, I'm very puzzled about the app ID 531A4F84
with Home Assistant 2021.12.12.
Have you made any local modifications? Do you have any custom components installed?
Just want to chime in, that I see the same behaviour: https://community.home-assistant.io/t/chromecast-is-missing-attribute-media-content-id/367548/4
If media is playing during reboot the missing attributes seem to reappear. If I switch off the mediaplayer in HA, it stays in state "idle" even when I start playback again.
Not sure how to add the log, its 0.5 Mb so I guess copying it in here is out of the question.
EDIT: Added log, OMG it's written right there how to do this!
Not sure how to add the log, its 0.5 Mb so I guess copying it in here is out of the question.
zip it, then drag-drop the zip-file to a github comment 👍
Here's the logs I collected. I disabled my custom_components temporarily just to rule out any interference on their part - it still reproduced without them, so it's not that.
I'm seeing this issue as well, had to revert to 2012.12.1
This is my template switch causing the issue
- platform: template
switches:
white_noise:
unique_id: white_noise
value_template: >-
{% if states.media_player.speaker.state != "playing" %} {% set state = "off" %} {% else %}{% set state = states.media_player.speaker.attributes.media_content_id %} {% endif %}
{% set object = 'blizzard.mp3' %}
{% if 'blizzard.mp3' in state %}on{% else %}off{% endif %}
turn_on:
- service: media_player.volume_set
data:
entity_id: media_player.speaker
volume_level: 0.6
- service: media_player.play_media
data:
entity_id: media_player.speaker
media_content_id: "media-source://media_source/local/white_noise/blizzard.mp3"
media_content_type: "audio/mp3"
turn_off:
- service: media_player.turn_off
entity_id: media_player.speaker
Same for me. Additionally, the state of the cast device (Google nest mini in my case) doesn't go back to 'idle' after finishing playback. That worked before, now, a couple of automations are broken (they wait for the media player to reach the idle state to play some sounds sequentially). I'll add some logs tomorrow!
Hi, thanks for your support @emontnemery, the cast integration is one of the most reliable integration that is out there and I'm using it multiple hours per day, every day. Great work :heart:
Unfortunately I see the same behavior:
Do you need another log file?
Same issue, it seems to be connected to the fact that Home Assistant is now using the Home Assistant Media Player App to cast media instead of the Default Media Player App. I need to read the currently playing url in order to determine the radio state and channel. Also, for future reference, i am casting to an NVIDIA Shield TV, and the URL I'm trying to cast is an internet radio livestream.
Heres the attributes I am seeing:
volume_level: 0.8666666746139526 is_volume_muted: false app_id: B45F4572 app_name: Home Assistant Media Player entity_picture_local: null friendly_name: SHIELD supported_features: 152461
Edit: I just updated to 2021.12.3, issue persists
Not sure it's connected, but my Google Nest Mini is stuck for the last 6 hours in 'playing' state, with the same attributes. On 2021.12.2 as well.
Not sure if it helps, but I use Google cloud TTS and a Google hub as media player. The automations waits until the player is Idle again before it plays the next (TTS) msg now it gets stuck for evah.. First one plays fine, then the player remains in "playing" mode.
Here's another log. My issue description: frontend attributes don't show up, as nicely described in #62288. And after playing a media file 1sec.mp3, the state stays on 'playing' for about 5 minutes then to 'off'. So no idle state.
Edit: forgot to mention this is core-2021.12.3
I have the same problem. Can confirm it happened from 2021.12.2 onwards
Right. We do use a different method to start playing the media in 2021.12.2, maybe that's causing it. I can't reproduce it though, could you please share logs?
I'm not sure if it's caused by the cast integration because the attributes doesn't appear either when you cast from the Spotify app like I described in #62288 .
I had a long time working my own Google Chromecast media player node-red media player
And current version 2021.12.3 stop working, I tried call services with Google mini, Google Nest, Google Tv, Group speakers in Developer Tools, the only working services are volume, on, off, mute. The background picture of the media player in UI also missing.
The problem
Google Cast
media_player
entities are missing themedia_content_id
,media_duration
,media_position
, andmedia_position_updated_at
attributes, starting in 2021.12.2. After reverting to 2021.12.1, the attributes once again appearedWhat version of Home Assistant Core has the issue?
2021.12.2
What was the last working version of Home Assistant Core?
2021.12.1
What type of installation are you running?
Home Assistant OS
Integration causing the issue
cast
Link to integration documentation on our website
https://www.home-assistant.io/integrations/cast
Example YAML snippet
Anything in the logs that might be useful for us?
No response
Additional information
No response