As the title says, I have the new Chromecast with Google (Android) TV. I have the Android TV integration working correctly on my Nvidia Shield. I set it up on the new Chromecast (enabled debugging and accepted the connection request from HA). However, I am only seeing “Idle” or “Off” for the entity state. It never shows “Playing”, “Paused”, or “Stopped” like on the Shield and I cannot get a name for the currently running app (which works on my shield).
HA is currently 0.116 in Docker on Ubuntu 18.04
The entity attributes for the Chromecast are:
adb_response: null
friendly_name: chromecast
supported_features: 23997
The Nvidia Shield shows a thumbnail and a bunch of additional (expected) attributes but has the same adb_response and supported_features as the chromecast.
Not sure if I am missing something obvious or if someone can verify if it is working or not working for them.
One or more of the ADB commands that the androidtv package uses to collect information from the device must not be working correctly for this new product.
You can still turn the device on/off, right? If so, that means that the ADB connection is working correctly.
Yeah, I was able to turn it on via HA and that made it actually load a thumbnail also. I didn’t immediately see a way to turn the device off via the HA UI and didn’t have a chance to mess with that but I imagine if “on” is working then “off” should as well.
I wouldn’t put it past Google to change things to a nonstandard method :-/
Well at least I know it’s not (necessarily) a configuration mistake on my part if someone else is having the same issue. I updated the Chromecast with the update that came out yesterday but it doesn’t seem to have made a difference.
That’s because the sources list only shows the running apps. And since it’s not retrieving the properties correctly from the device, there are no running apps to show.
Still trying to get the first command to work. It seems to be throwing an API error for some reason. For now, here is the response of the second command:
adb_response: GoogleChromecast08041HFDD0BV0110 link/ether b0:e4:d5:9a:a8:b2 brd ff:ff:ff:ff:ff:ffDevice "eth0" does not exist.
I made an attempt at parsing your first command because I could only get parts of it to work. The grep stuff seems to be throwing it off but I can run more dumpsys commands if that would help. Hopefully this is better than nothing.
Not sure what you are looking for specifically but HA doesn’t like me trying to pipe things into grep very much. I can give you the full dumps for stuff or if you let me know what you are looking for I can give you just that.
The first command is what the androidtv package uses to get a bunch of state properties from the Android TV device. Something about it isn’t working correctly for Google’s new device, so I’d like to see what the raw output is in order to see which part isn’t working as expected.
It looks like your device is off, so the output of the command, as seen in the adb_response, should be an empty string. Try it when your device is in use.
I think you might be removing some newlines from the output of the second command (the one that gets the device properties). It should look something like:
Amazon
AFTT
SERIALNO
5.1.1
link/ether ab:cd:ef:gh:ij:kl brd ff:ff:ff:ff:ff:ff
Device "eth0" does not exist.
Although it may have \n instead of actual newlines. If there’s a way to distinguish these Google devices from other Android TV devices, then a different command can be used to perform the update.
I’ll go ahead and replace mCurrentFocus in your first command and post back here. I didn’t think I was missing anything from the second command’s response (I think the response was all one line) but I can double check. It’ll be a bit before I can get in front of it…hoping 9hrs or less.
Also, with that second command, the Chromecast was off so I’ll try it both on and off and see if I get different/better results.
Assuming you made the modification correctly and you’re using the androidtv.adb_command service to send the command, try putting double quotes around it.
I had tried that with no luck. I think I figured out how to get the correct output. I had to escape the # so it was 'Window \#1'. For whatever reason, when HA was using the command (Developer Tools > Services tab > Service Data) it was chopping it off at the #. Maybe it was seeing everything after that as a comment? Idk.
This is hopefully what you are looking for (playing YouTube):
I have literally the same setup and issues as OP. I’m willing to assist with testing so we can get these new Chromecasts working as well as the Shield does.
Can you run the two commands I posted above while your device is on and make sure the results are the same format as what’s in these tests. Note: change mCurrentFocus to 'Window \#1' and change -A 12 to -A 11 in the commands.
Yeah, best I can tell everything looks good. This may be obvious but for the sake of being thorough, HA doesn’t allow the first command to call the service unless the end quotes are removed. The second command works with or without the containing quotes.
Also, in case it matters, the device info response lists Google on the second line for me, not the first:
adb_response: |-
Google
Chromecast
SERIALNUMBER
10
link/ether MAC_ADDRESS brd ff:ff:ff:ff:ff:ff
Device "eth0" does not exist.