Stadia and Chromecast

I just got my Stadia founders edition and have started playing a couple of days ago (which by the way is just amazing!).

Now I realise it would be great to have some automations connected to stadia, like changing the scene when I’m playing.

I initially hoped I could trigger them based on attributes of the Chromecast, like stream URL or media-type.

However, the Google-Cast integration seems to be incompatible with the newest Chromecast Ultra firmware that supports Stadia (it’s still in beta for all non-stadia-users).

While I’m playing Stadia on my Chromecast ultra, HA reports the Chromecast to be “off”. All other stream-types like audio or video report state and attributes correctly.

Which leads to a whole lot of other problems with my existing automations.

Also, since the stadia-controller connects to google via WiFi, I suspect the controller itself cound be integrated into HA as well.

Is there anyone capable and willing to integrate Stadia into HA?

3 Likes

Agreed, Stadia is really cool and works great. Would be awesome to have some “paus/play” automations through Home Assistant.

I run into the problem yesterday and came up with a solution. Sorry because it´s super late in the thread, but I post it just in case it can help someone.

Create a binary sensor that pings the IP of your Stadia. To guarantee that it works in the long term, make sure you do an IP reservation. After that you can just use this as a trigger (on/off) in your automation. Works very nicely.

binary_sensor:
  - platform: ping
    name: stadia_remote_controll
    host: 192.168.7.65
    count: 2
    scan_interval: 30
1 Like

Yeah, I did something similar: I have a device tracker for the Stadia controller, and assigned this to a person. So I know, when the controller is on. But I need to know, when Stadia is displayed on the chromecast, since the controller would also be online, when I play Stadia on the phone or laptop. Unfortunately the chromecast appears to be off, when playing Stadia, so I don’t think anything can be do e about that from HA side.

Maybe, once Stadia is supported in the new google tv things will change.

Good point, I did not think about the playing in phone or laptop (I never do). In my particular case, I want the automation to switch on the TV ambilights so I could add one condition which is “is the TV on?”. True that it does not cover all use cases, spouse could watch TV while I play stadia in laptop, but at least it makes more difficult to make a mistake.

I’m guessing your chromecast is powered via the TV power?

As when I done something similar with this, with my chromecast being powered on its own, it would always be ‘on’

I don’t have the Chromecast connected to the TV USB (I used to have) because with Stadia I prefer using a wired internet connection (enormous difference). That’s why the recommendation is to ping the remote control to see when it’s online.

As @seanomat mentioned, you won’t be able to differentiate if you are playing in the laptop or phone, but it works for me because if I play is on the TV.

1 Like

Yeah that’s what I’ve just set up, thanks @seanomat for the suggestion!

I’m thinking this may work, of having the following entities

binary_sensor.livingroom_stadia
binary_sensor.livingroom_tv
sensor.livingroom_stadia

Then an automation to change the status of sensor.livingroom_stadia where if binary_sensor.livingroom_stadia is on but binary_sensor.livingroom_tv is off then stadia is being played on laptop / phone, if binary_sensor.livingroom_tv is on then stadia is being played on TV

Then you’d be able to do automations based off the status of sensor_livingroom_stadia

I would like to know, when to turn on my TV.

This is no problem when casting any content but stadia.
But for Stadia I can only base this on the device_tracker of the Stadia-controller.
And the controller might also be on when I just play on my laptop. So this doesn’t help in determining weather to switch on the TV or not.

Chromecast integration is now picking up stadia for me on 2021.12.1

I switched to Chromecast with Google tv a while back. No problem to detect stadia app there either.