Google cast stops after 30 seconds - Nest hub
Opened this issue · 101 comments
Hi,
After the Nest Hub is updated to Fuchsia it stops if I cast home assistant after 30 seconds now instead of 10 minutes as before.
Would it be possible to Use disableIdleTimeout as mentioned in Google docs?
https://developers.google.com/cast/docs/reference/web_receiver/cast.framework.CastReceiverOptions
window.castReceiverManager.start({statusText: "Application is starting", disableIdleTimeout: true});
this was also mentioned in the following issue that was closed:
#335
Hmm, @theychx, would a custom receiver solve this?
I think this relates to cast_site
, so we would have to roll our own version of dashcast (or similar).
Can we clone dashcast to make a update I am having similar problems
same issue here - dies after ~30 seconds unless I interact with it
Would love for a solution to this!
I can test anything on my end on multiple Nest Hubs if you guys need!
Same issue on one off my hubs :-(
It seems Google have removed the only useful feature of the Nest Hub - being able to cast to it with CATT, 10 mins timeout was bad enough, but 30s is crazy. Time to bin it.
Same problem here. +1 for a solution. Any chance to find a way to "keep the hub busy"? Like having cast_site
behave the same way cast
does?
For what it's worth, I send a feedback to Google to change the timeout back to 10 minutes or alternatively make it configurable. Don't know if it will change anything, but maybe if enough of us ask the same thing....
Same problem here, would be fantastic when somebody can solve this.
Chiming in as I have the same issue too.
Any updates about this, or someone another solution because it is really annoying now for the family not one of my dashboards is working now, makes it very hard to control stuff in the house for the wife who does not have a smartphone or something like that :-(
You can do a Google pub sub to control ha via Google hubs just can have useful status display
You can do a Google pub sub to control ha via Google hubs just can have useful status display
Hi @scooper1 thanks for your quick reply! I tried to Google it but to be honest not completely clear how to go further here, do you have some example on how I can use this for casting my dashboards to the Nest hubs?
Thanks!
OK, clear I already use Google relay in HA for devices that are not native supported by HA but do work with Google Assistant, works great for things like that.
But for easy controlling devices, scripts, automations I have almost in every room a Nest Hub with a dedicated dashboard what was working great then we got the 10-minute timeout but that we could overcome by casting every 9 minutes again, but now 30 seconds is just crazy!! Thanks for your support, so still hoping that the team can fix CATT because that was working flawless before!
Is it possible to use disableIdleTimeout when casting to work around this? Or maxInactivity?
Add me to the list also. My Gen 1 hub is exhibiting the same behaviour after the update. So far gen 2 seems to still work ok but no idea for how long.
also having this same issue on my 3 nesthubs.. would really like this to work, will help with any testing if needed.
@raulgbcr i tried your fork and it is not working for me. Im not sure if disableIdleTimeout helps, because home assistant controller already has disableIdleTimeout in receiver code.
I connot find source code in github but there is it
https://cast.home-assistant.io/receiver.html
@Unlink you need a custom sender with the fork that keeps an active connection with it, catt will just force the url and reload the page on the internal browser, but even with the custom sender keeping the connection it times out around 15 mins.
I have ditched the fork since I have created a new receiver with the new CAF and still experimenting with it, but disableIdleTimeout doesn't seems to do what we want it to do 😢
@skorokithakis should be, but It is not working yet, even with the latest API and disableIdleTimeout it stills timeout, so I don't see much utility on it right now. Still playing with it trying to send keepalive messages to the namespace and stuff, but no luck yet...
it times out around 15 mins
This is still much better timeout than the 30sec were currently getting 😉
Yeah i have been refreshing every 10 minutes for a few months now and that has worked fine, 15 minutes would be a dream.
hook us up :)
Did you push an update
having problems with site-cast from home assistant to google hub max
video feds from camera keep stopping
so many things changing it is hard to find the cause
i am on the 2021.9 beta that has changed some things on camera feds etc.
Feds are working ok on direct lovelace pages so suspect it might be catt related
Is this being worked on? Can i do anything to help with testing?
I just rebooted my hub after setting the screen timeout to 5 minutes (in the settings section) my cast is still up (1/2 day so far). Not sure if this is an aberration or whether google has fixed it, although the hub cast and system firmware hasn't changed.
I just rebooted my hub after setting the screen timeout to 5 minutes (in the settings section) my cast is still up (1/2 day so far). Not sure if this is an aberration or whether google has fixed it, although the hub cast and system firmware hasn't changed.
I tested it also but does not seem to work for me still the 30 seconds limit here on both hubs :-(
Same here doesn't work for me
I managed to achieve this once quite a while ago and it eventually reverted to the (at the time) 10 minute timeout. What that says is that somehow the cast can stay persistent although it looks like a precarious condition which can revert at any time.
Sorry guys, after a day of hope it's gone back to 30s :(
A problem has now cropped up with my other (Gen 2) hub.
As of today (after latest restart by itself) my hub no longer accepts new cast site commands until a cast stop command is issued. Anyone noticed this? Previously I could just issue a cast site and it would recast no matter what's on screen.
A problem has now cropped up with my other (Gen 2) hub.
As of today (after latest restart by itself) my hub no longer accepts new cast site commands until a cast stop command is issued. Anyone noticed this? Previously I could just issue a cast site and it would recast no matter what's on screen.
after a restart a few days ago this problem now happens on both my hub maxes inserting a stop command before the 10 minute cast renew has fixed the problem - it is quite nasty as it stops the hassio ssh web terminal accepting new commands after a cast without a stop
If you do the following then it will work again:
Add “catt -d “your_device” stop” to your reload script to stop the cast stream before reloading.
if ! catt -d “your_device” status | grep ‘PLAYING’; then
catt -d “your_device” volume 0
catt -d “your_device” stop
catt -d “your_device” cast_site http://xxx
fi
Thanks to: https://community.home-assistant.io/t/using-catt/130332/448
If you do the following then it will work again:
Add “catt -d “your_device” stop” to your reload script to stop the cast stream before reloading.
if ! catt -d “your_device” status | grep ‘PLAYING’; then
catt -d “your_device” volume 0
catt -d “your_device” stop
catt -d “your_device” cast_site http://xxx
fiThanks to: https://community.home-assistant.io/t/using-catt/130332/448
Hi @Itzarthi,
I changed my script and the dashboard was loaded on my hub but still after a couple seconds is also killed again, am I'm missing something here?
`#!/bin/bash
if ! catt -d “192.168.1.86” status | grep ‘PLAYING’; then
catt -d “192.168.1.86” volume 0
catt -d “192.168.1.86” stop
catt -d “192.168.1.86” cast_site http://192.168.1.20:8123/dash-master-hub/ochtend
fi`
@raulgbcr You mentioned in your reply to @Unlink that you got it working for 15 minutes is there a possibility that you can share this update with the community because now nothing works and 15 minutes is even better than the 10 minutes before so would everybody help a lot I think!?
Thanks!
@Unlink you need a custom sender with the fork that keeps an active connection with it, catt will just force the url and reload the page on the internal browser, but even with the custom sender keeping the connection it times out around 15 mins.
I have ditched the fork since I have created a new receiver with the new CAF and still experimenting with it, but disableIdleTimeout doesn't seems to do what we want it to do 😢
If you do the following then it will work again:
Add “catt -d “your_device” stop” to your reload script to stop the cast stream before reloading.
if ! catt -d “your_device” status | grep ‘PLAYING’; then
catt -d “your_device” volume 0
catt -d “your_device” stop
catt -d “your_device” cast_site http://xxx
fi
Thanks to: https://community.home-assistant.io/t/using-catt/130332/448Hi @Itzarthi,
I changed my script and the dashboard was loaded on my hub but still after a couple seconds is also killed again, am I'm missing something here?
`#!/bin/bash
if ! catt -d “192.168.1.86” status | grep ‘PLAYING’; then
catt -d “192.168.1.86” volume 0
catt -d “192.168.1.86” stop
catt -d “192.168.1.86” cast_site http://192.168.1.20:8123/dash-master-hub/ochtend
fi`@raulgbcr You mentioned in your reply to @Unlink that you got it working for 15 minutes is there a possibility that you can share this update with the community because now nothing works and 15 minutes is even better than the 10 minutes before so would everybody help a lot I think!?
Thanks!
@Unlink you need a custom sender with the fork that keeps an active connection with it, catt will just force the url and reload the page on the internal browser, but even with the custom sender keeping the connection it times out around 15 mins.
I have ditched the fork since I have created a new receiver with the new CAF and still experimenting with it, but disableIdleTimeout doesn't seems to do what we want it to do 😢
Hi, unfortunatelly I don't have that version anymore, got rid of all of that when I started to wrote my own from scratch.
I have a working receiver that doesn't timeout and have been working for 2 weeks already without recasting, however, there are 2 problems with this receiver.
First, this is a completely new receiver wrote in CAF (Cast Application Framework), and due to the Google Cast Developer terms, I can't publish this without a public and valid sender, which I don't have (I just use a custom launch script with pychromecast)
Due to work and life in general I don't have time to make a sender for this new receiver and publishing it right now.
Second, this receiver relies in a bug I found in CAF, that im 99% sure is gonna get patched the moment I release it, since it messes with what the cast player thinks its playing, and I doubt they will let something like that pass.
I've tried to get in touch with someone on the Google cast team to discuss this, but have got no luck yet.
So, for those reasons I really can't release this with you yet, and I don't know if I will ever release it, since publishing this right now may cause my Cast Developer account to get terminated, and thats a no go.
Regards.
Second, this receiver relies in a bug I found in CAF, that im 99% sure is gonna get patched the moment I release it, since it messes with what the cast player thinks its playing, and I doubt they will let something like that pass.
I've tried to get in touch with someone on the Google cast team to discuss this, but have got no luck yet.So, for those reasons I really can't release this with you yet, and I don't know if I will ever release it, since publishing this right now may cause my Cast Developer account to get terminated, and thats a no go.
Regards.
Hi @raulgbcr,
Thanks for the update, thats off course completely understandable no way that I want to bring you in trouble, so we can close this route now and hope again that the team and/or @skorokithakis can find a work a round, fix for the problems?
Thanks!
Is possible for some of that are are able to create our own cast developer account and test you code using that. ... I don't know if you have to pay a sub to get a account. It's a bit like how we currently have our own Google API accounts to do a pub sub from hassio to Google
I think @theychx is working on a fix (we have our own custom controller we may be able to deploy), but I don't think we can rely on a bug, sadly.
I think @theychx is working on a fix (we have our own custom controller we may be able to deploy), but I don't think we can rely on a bug, sadly.
Thanks for the update @skorokithakis happy to hear that this still is worked on!!
Hi, as I'm also suffering from the same issue I'm willing to test if any testing is required.
Is there any reason why casting a site directly from Chrome does not stop after 30 seconds? (No interaction possible so no replacement for casting HA dashboards)
My last nesthub just updated so now none of them work :/
when casting a website, 'catt info' shows a lot of missing information.
current_time: 0
content_id: None
content_type: None
duration: None
stream_type: UNKNOWN
idle_reason: None
media_session_id: None
playback_rate: 1
player_state: UNKNOWN
supported_media_commands: 0
volume_level: 0.0
volume_muted: False
media_custom_data: {}
media_metadata: {}
subtitle_tracks: {}
current_subtitle_tracks: []
last_updated: None
is_active_input: False
is_stand_by: True
app_id: 84912283
display_name: DashCast
namespaces: ['urn:x-cast:com.google.cast.debugoverlay', 'urn:x-cast:com.google.cast.cac', 'urn:x-cast:com.madmod.dashcast']
session_id: 4e8969c2-c564-44ad-b433-eb9bc810418b
transport_id: 4e8969c2-c564-44ad-b433-eb9bc810418b
status_text: Application ready
icon_url:
volume_control_type: master
Maybe it stops because of the missing parameters, is it something that can be provided with catt or dash-cast?
---- edit ----
I just noticed that the nest hub goes into 'clock' mode exactly 30 seconds after the player_state goes from PLAYING to IDLE when the video is finished.
Any updates on this?
I noticed something strange, I bought 2 new Google HUB's recently and these are still working with the 10 minute timeout.
First I thought these devices were not updated to fuchsia yet but now i'm not sure.
Firmware 1.52.260996 should be Fuchsia, at least for Gen1. I have of of those running on this firmware. (At least 1.52)
But my two new HUB are running on 1.56.265669.
Which is strange as according the Google.com info page the newest version for Gen2 is 1.54 ???
Anyway, no 30 sec timeout issues with these devices (so far....)
I was tinkering with the device for a bit today. I tried casting a home assistant Lovelace dashboard with a web media player that comes with the browser_mod plugin. The funny thing is that it appears that the website and its content stays active in the background and the clock is merely an overlay over the dashboard, because when I send audio to the web media player on the dashboard it still plays. The browser_mod sensors also indicate that the browser is still active.
it appears that none of the browser_mod interactions can stop the clock timeout screensaver
Everything I've seen points to this being a screensaver bug, seems that the screensaver doesn't realize it shouldn't be triggered. I don't know how we can work around it, though...
Everything I've seen points to this being a screensaver bug, seems that the screensaver doesn't realize it shouldn't be triggered. I don't know how we can work around it, though...
I don't think it is a bug for what i have seen, if you trick the OS in thinking he is watching a livestream you can bypass that, can't tell you more but there are ways to do this with the new CAF
There seems to be a fix for the same issue that impacted Home Assistant Cast here: home-assistant/core#53882
Can a similar fix be applied to CATT?
To be more concrete, this is the PR that fixed the timeout: home-assistant/frontend#10531
They are "playing" an image so that it works
Hmm, that looks doable, at first glance. @theychx, what do you think?
Current Dashcast code has to two ways of getting a cc to display arbitrary webpages. The first is to display the content inside an iframe. The second one, is to simply let the browser-instance running the cc-app (dashcast) render the page ("force").
Using the latter means that once the desired page has been rendered, the app/receiver code is no longer running. Right now, we use this option exclusively, as it will render any page (unlike the first option).
I guess we could bake our own version of dashcast, where the iframe-approach part of the code is enhanced with the technique mentioned by @jonaseymour @bahuma20, and then let catt
users select this mode as an option to cast_site
.
You can "force" the reload in the internal browser and the media keeps playing for the OS, works with livestreams, not sure with images like they are doing on HA. The iframe approach works, but is very limited (cross site https is blocked)
Hmmm how to describe... Last night at some point catt stopped recasting for me. My hub max retains the 10 minute time out requiring a recast from catt. In home assistant the hub showed as still playing and in my set up this stops recasting. I use a condition in an automation that if the hub is playing to not recast the dashboard. This stops the interruption of regular media on the hub. Home assistant now detects catt's casted dashboard as playing? This wrecked my automation as the condition showed always as playing. I now use a condition using the attribute app_name: to recast if its dashcast and that works. I mention it though because it seems to indicate a change in home assistant or google or dashcast
This is a different issue. Something changed a couple of months ago so at the end of the 10 minutes you need to actually send a command to stop the cast then start it again. Unfortunately this creates a bit of extra delay but at least it still works.
I've gotten a custom receiver to the point where it shows my HA UI, and stays open as long as I want it to. Only problem is I can't touch any of my controls 👎 . Not sure how to get the Hub to interact with the iframe. Once I get that, happy to share
My solution is to use home assistants built in casting and cast a Lovelace view that contains the webpage I'm wanting to cast. This is working perfectly (I'm using tileboard) and says on All night (bedside control panel that gets triggered when someone is in bed)
@tungmeister I am doing the same at the moment. But what I notice is, that the built in casting is limited to the standard components. I cant get any of the custom components to work. I have tried everything I could find (changed and tried all the resource settings) , but nothing works. Seems to be a caching issue of the Google Hub.
With CATT everything works flawlessly, but with the current 30 second timeout I could not use it anymore. So I really hope CATT can be modified to avoid the timeout.
do you think this will ever run on a version 1 hub again for more than 30 seconds ?
or have I missed something along the way.
It sounds like it's definitely doable, someone just needs to do the work. Contributions are certainly appreciated on this one.
Also interested in this :)
@tungmeister Are you using Home Assistant cast for the built-in casting and Webpage card to cast your web site? Is there is no 30 second interruption with this configuration?
@tungmeister Are you using Home Assistant cast for the built-in casting and Webpage card to cast your web site? Is there is no 30 second interruption with this configuration?
If you use the home assistant cast, then there is indeed no timeout. It will stay all day. I just have it start early in the morning every day. The reason being that the Google Hub resets itself sometimes at night.
But the home assistant cast has limitation compared to CATT. I loved having the Tabs on the google hub. That is not possible with the home assistant cast. And custom components are hit or miss. Mostly they dont work.
@tungmeister Are you using Home Assistant cast for the built-in casting and Webpage card to cast your web site? Is there is no 30 second interruption with this configuration?
If you use the home assistant cast, then there is indeed no timeout. It will stay all day. I just have it start early in the morning every day. The reason being that the Google Hub resets itself sometimes at night.
But the home assistant cast has limitation compared to CATT. I loved having the Tabs on the google hub. That is not possible with the home assistant cast. And custom components are hit or miss. Mostly they dont work.
If the webpage card has an http site (not an https site) will the home assistant cast still work ?
If the webpage card has an http site (not an https site) will the home assistant cast still work ?
I think it needs to be https: https://www.home-assistant.io/integrations/cast
I use home assistant cloud so it worked without any issue
Yeah, it needs to be https - I also use the same method to cast a dashboard to one of my displays in the kitchen - I've not had any issues with custom elements, maybe I've just been lucky?
Any updates on this? Although I stopped using my Gen 1 hub I tried it today and the timeout appears to be about 1 min now (still not useful at all)
Nope, none yet.
Bummer, but still hopeful it will get solved before the gen2 hubs are updated to Fuchsia otherwise we'll all be looking at other options like tablets.
Indeed, but you know how it goes with open source, if you really want something, you usually have to do it yourself.
Understood. I'd help if I could but my knowledge is limited to pretty basic stuff unfortunately.
Yep, perfectly understandable, I'm just saying that a lot of the open source progress is driven by people who want to scratch their own itch (and this isn't an itch I personally have right now, since I don't use the site cast functionality).
I discovered this morning that my Gen 1 hub seems to be casting longer than 30s now (in fact beyond the 10 min limit also) Can someone check that their gen 1 hub behaves the same way? In the past it's occasionally gone past 10 minutes for no particular reason for a short period then reverts back.
I discovered this morning that my Gen 1 hub seems to be casting longer than 30s now (in fact beyond the 10 min limit also) Can someone check that their gen 1 hub behaves the same way? In the past it's occasionally gone past 10 minutes for no particular reason for a short period then reverts back.
I dont use CATT anymore due to the time out issue, but wanted to try based on your post. But it seems my Gen 1 hub still has the 30second issue. So I cast with CATT and then within 30 seconds it is gone.
Bummer. I wasn't sure if google had pushed an update to fix this. Silly me for thinking they would. BTW what do you use in place of CATT?
I just use the normal Google Cast now (by using https://www.home-assistant.io/integrations/media_player/ ), I took a subscription to Nabu Casa and with that, its straight forward to do the casting. And the standard google cast stays on the hub as long as you want.
my Gen 1 hub still has the 30second issue
So weird. Mine was up for a full 6 days before reverting to the clock. I re-cast and so far it's been up for over a day.
my Gen 1 hub still has the 30second issue
So weird. Mine was up for a full 6 days before reverting to the clock. I re-cast and so far it's been up for over a day.
What version are you running (you can see it in the Home App
For me its
Firmwareversion of system: 4.20210608.1.1146075
Firmwareversion of Cast: 1.56.291758
Got some email notifications on this, so thought I'd try and see. It's currently been casting for over 30 minutes and hasn't timed out!
One thing of note is that my graph cards aren't showing the lines (but some are), no not sure what that's about...
Firmware system: 6.20211109.1.3166232
Cast firmware: 1.60.302700
I've opted in to Preview programme updates, so maybe there's hope that one of those fixed this!!
I've opted in to Preview programme updates, so maybe there's hope that one of those fixed this!!
interesting, i also opted in now, will see. Your version are totally different. Lets hope they fixed it
Firmware system: 6.20211109.1.3166232 Cast firmware: 1.60.302700
Wonder how you got this. A 1.6... version is not even in preview yet : https://support.google.com/googlenest/answer/7365257#zippy=%2Ccurrent-preview-program-firmware-version
Firmware system: 6.20211109.1.3166232
Cast firmware: 1.60.302700
Mine is system f/w ..........1.3166212. cast f/w is the same
indeed, i now also have 6.20211109.1.3166232 and CATT works again!
Now if google would also update the V2 hubs and fix the 10 minute limit my happiness will be complete!
i can also confirm that catt is working again on ver 1 hubs
this is awesome.........
now is there a way to have it install catt on homaeassitant restart ?
and can we use automations to start the casting and stop the casting ?
i know the terminal has changed awhile back
i can also confirm that catt is working again on ver 1 hubs this is awesome......... now is there a way to have it install catt on homaeassitant restart ? and can we use automations to start the casting and stop the casting ? i know the terminal has changed awhile back
To have it install on restart, create a .sh file with this in it:
pip3 install catt --upgrade
i named it updatecatt.sh
Now add this to your configuration.yaml
shell_command:
updatecatt: bash updatecatt.sh
Once you do this, you can use the service shell_command.updatecatt
in an automation. Like this:
alias: Auto - Update CATT on startup
description: ''
trigger:
- platform: homeassistant
event: start
condition: []
action:
- service: shell_command.updatecatt
data: {}
mode: single
Same concept to create a .sh file to automate the casting itself. My casting.sh contains this. It will only cast when nothing is playing. And also turn down the volume:
if ! catt -d "192.168.178.59" status | grep 'PLAYING'; then
catt -d "192.168.178.59" cast_site http://192.168.178.27:8123/lovelace-cast/0
delay 10
catt -d "192.168.178.59" volume 0
fi
now is there a way to have it install catt on homaeassitant restart ?
- alias: HASS - Start Install Catt
id: hass_start_install_catt
initial_state: true
trigger:
- platform: homeassistant
event: start
action:
- service: shell_command.catt_install
shell command: catt_install: pip3 install catt
[edit] @J-o-h-n-M shell command is much better
John
Thank You Very Much....
1 question
192.168.178.59 is that the ip of the google hub ?
if ! catt -d "192.168.178.59" status | grep 'PLAYING'; then
catt -d "192.168.178.59" cast_site http://192.168.178.27:8123/lovelace-cast/0
delay 10
catt -d "192.168.178.59" volume 0
fi
Yes, but you can also use the name of the hub instead of the IP. i.e. "Living room display".
home from work now
i followed john's directions ... but
catt does not get installed and I have tried several times as well as rebooting for changes in effect.
i entered this at the command prompt in terminal
pip3 install catt --upgrade
does not work says a folder is missing
but if I enter this in terminal
pip install catt==0.12.2
it works and I am able to cast to hub
but I am unable to get the shell command to work.
any idea's...
thanks Paul.
but I am unable to get the shell command to work. any idea's...
You are not giving us much to go on. What did you try? Do you get any error message? What kind of installation do you have for HA? etc..
Yes, but you can also use the name of the hub instead of the IP. i.e. "Living room display".
this is indeed correct. The only reason I changed it to IP is that at some point the names changed and I had to reconfigure it. Not sure what made it change, but I felt that IP would be a more future proof solution for me.
How are you guys running home assistant? Running HASSIO cant get a reinstall on restart going. My cast commands work fine but ive had to use something like this
"ssh -o StrictHostKeyChecking=no -i /config/.ssh/id_rsa hassio@redacted catt -d redacted cast_site http://10.0.0.249:8123/lovelace-tablet/environment"
Using google max here which is seems to be still on a 10 min timeout just for doc purposes
How are you guys running home assistant? Running HASSIO cant get a reinstall on restart going. My cast commands work fine but ive had to use something like this
Home Assistant has made it really confusing with all the different names for install. I dont think HASSIO is something being used anymore. I personally run this one: https://www.home-assistant.io/installation/generic-x86-64
Does the log say anything when you try to trigger the reinstall?
How are you guys running home assistant? Running HASSIO cant get a reinstall on restart going. My cast commands work fine but ive had to use something like this
I run HASSOS, so have the 'ssh and web terminal' add on, then I just have an init command set in the configuration of the add on to install CATT when started.
python3 -m pip install catt==0.11.3
@dasb00ter I see that in 2019 I was using Hassio, this post will prob still work for you then : https://community.home-assistant.io/t/using-catt/130332/127
For those using CATT to cast Home Assistant, I have come up with a fix for the 10 minutes timeout problem:
https://github.com/swiergot/ha-catt-fix
To fix it for all websites casted with CATT, changes to DashCast are required.
Hmm, that's interesting @swiergot, how can we integrate it into CATT? Can we make our own receiver?