[BETA] AndroidTV Notifier

Sound is controlled from within the AndroidTV application that you install onto your TV. It works for me and I believe was enabled by default - worth checking.

I was using Pushover + PushTV to handle this previously, but I like this solution a whole lot more. Quick testing this morning reveals that the TV notificatoins appear much more quickly since they are generated directly by Hubitat->Chromecast w/Google TV, as opposed to making the round-trip to Pushover + waiting for push notification.

In short, I plan on converting my TV-based notifications over to this approach as soon as I click reply.

Thanks a ton!

1 Like

My experience with Pushover+PushTV has been the same as yours: "Mostly works".

Every once and awhile, I tend to receive PushTV notifications in bunches. I've always assumed (as you suggested) that the PushTV application is getting terminated in the backgroun by Android. But even when I'm receiving notifications normally, my experience is that it still takes a few seconds to get from Hubitat->Pushover->PushTV.

I'm expecting that since this cuts Pushover out of the middle that the notifictions will appear closer to real-time. And I'm hoping that the TV-side application is a little more friendly to the OS and doesn't get terminated in the background.

Side thought: I wonder why Android doesn't have an ability to flag specific applications to not be terminated in the background, similar to the ability for us to disable Battery Optimizations for specific applications. Would improve implementations such as this that require a background application.

So far so good, installed and tested. I get no sound even though the app settings are set to high volume and long notification length (which doesn't seem to change the length noticeably over the short setting). Thanks for the app. -Joel

1 Like

Ok, I have this implemented. Some commentary and perhaps a feature request. :slight_smile:

The Google TV app has a checkbox for "allow notification to turn on TV", but it isn't working for me on Chromecast w/Google TV. The CCGTV is able to turn my television on with HDMI-CEC (ie, hitting "Home" on the CCGTV remote when the TV is off does indeed turn it on) so it would be great if it's possible to make that work.

That said, I'd rather see this the above implemented as an "On" (and if possible, "Off") command on the driver itself. That would make it trivial to separate the On/Off vs the Notify actions in Rules, etc.

Do you know if the Google TV API the TV-side app this uses even has the ability to command CCGTV to send HDMI-CEC on/off commands?

1 Like

Certainly for my Sony TV (KD-55AG9), having the TV off and sending a notification to it, it would switch on. I disabled that within the AndroidTV app.

I think for what your wanting to do, may be another driver can provide this ability... on, off and other commands.

https://community.hubitat.com/t/release-sony-bravia-tv-rest-control/

I'll look at the driver you linked, but won't that be specific to Sony Bravia? I have a Chromecast w/Google TV on the TV I was hoping to use HDMI-CEC to turn/off, not a Sony Bravia.

That said, I do I have a Sony television with Google TV built-in downstairs. I wonder if the deciding factor is whether you have "built-in" Google TV (works) and "external" Google TV (which appears[?] not to work). I'll give this a try later and see if this makes a difference; I suspect yes.

1 Like

Sorry your right... may be I thought everyone had a Sony TV... !! :wink:
Apologies. Yes suspect it will make a difference.

Double checked the settings, set to default sound and 100% volume. Still nothing. I'm guessing it's because the chromecast w/ google tv is not officially supported.

1 Like

In the spirit of closing the loop on this, yes, this driver+Notifications for Android TV app is indeed able to turn the TV on.

2 Likes

Ah yes. I saw the shout-out to the developer of the TV-side app in the intial post here, but didn't realize these two things weren't developed together. Furthermore, I see the TV-side app hasn't been updated since 2018. So I suspect you're right, CCGTV isn't going to fully work unless we write our own TV-side application.

I've cobbled together a few Android applications, perhaps this is something I could pursue.

The other thought about audio specific to your situation is that depending on your setup, CC can't actually drive the TV audio. For example, in my setup the CCGTV remote actually sends IR volume change commands directly to the Sonos soundbar. If I try to adjust the volume in Chromecast via "software" mechanism (ie, using Lean Remote or Android TV Control apps) I get a toast on the TV telling me that the audio cannot be changed by Chromecast. On previous setups I was able to drive TV audio, though; I seem to recall the difference-maker was whether the audio was standard 2.0 or 5.1+.

Even though the app hasn't been updated since 2018, I did notice that the author does appear to still be responding to reviews left on the Play Store. With that in mind, I reached out to him about the power on/off and audio notifications issues we've discussed above; I figure it can't hurt to ask.

4 Likes

Yeah, I did the same -- and he replied super quickly.

Short version is that his TV-side app is being built with an older API, back when the Android TV side allowed "draw over apps". I guess this is no longer the case with the current API, so once Google sunsets the API version he's using, we're going to lose this functionality. Which really stink.

I can verify that this driver works really well for a Sony Bravia TV. It provides great functionality allowing on/off, volume, source switching, apps (such as Netflix) to be launched, cursor navigation, etc. It's brilliant. So happy I bought a Sony TV.

1 Like

Ok, this is FABULOUS! From other information that I have read online, it is possible to send a graphic also. Example supporting a screenshot thumbnail. I know this works because Notifications for Android TV can send graphics from my phone.

I tested this and it is working perfectly on my Fire TV 4k stick with the Notifications for Android TV app installed. So, can you add the graphics parameter to androidtv_notifier_driver.groovy?

3 Likes

doogles silently thought to himself, "Yes, I should get a new Sony Bravia that would be highly controllable. After all, the Sharp Aquos HAS gotten a little long in the tooth ...". This thought repeated in his head for hours, unsure if he truly believed it or if he were just trying to convince himself. Only time would tell.

This is a deceptively expensive "hobby". :slight_smile:

3 Likes

Getting my TV under full control is one of the coolest things in my Smart Home. It's almost worth chucking out a TV with a crappy interface (like the Sharp, even tho it's only a year old) and buying a new one :crazy_face:

If I'd only known then what I know now. Sigh.

Or maybe someone a lot smarter than me can get the Sharp integration to the level of the Sony one!

I've been using Christian's app in Hubitat. I like the start of this device driver, however it's missing the ability to dynamically control the variables his app makes available:

Message Title
Icon URL
Position
Message Width
Duration
Background Color
etc..

What I do is using Webcore just post a form to my TV's ip address (static of course) and then pass variables between other pistons to post messages/notifications through the app.

Notifications to TV Piston:

Example of Use:

Using this method lets me have a variety of icons on my hub that are specific to the notification type (doors, presence, lights, washer/dryer, thermostat, etc.) As well as having a specific title for each category of notification. Also being able to change the message width per notification is great so they look better on the TV.

I know the method I use is Webcore dependent and using the POST method is more basic. So, if this driver which is only a BETA release expanded to include the ability to dynamically address the variables through the virtual device, that would far surpass this common method and I think it would make my automation cleaner.

1 Like

Does this app run locally?

If you want to make this compatible with the new RM, add capability "Actuator" to the driver's capabilities so you can find it in the RM's categories.

1 Like