Android Notifications Binding: Support for multiple methods to send Video, Images and Text to Android TV, Fire TV or Sheild TV

This binding is now in an advanced beta state for the TvOverlay app, and can be used to send RTSP video urls directly from your camera onto your TV with <1 second lag. Images/Graphs and text messages are also possible and also work in all areas of the TV. Even when you’re watching Youtube or Netflix, you can get small notifications overlay-ed on the screen, plus much more.

Text notifications now work for the following apps Notifications for Android TV and Notifications for Fire TV.

Video showing what the TvOverlay app can do with this binding.

tvOverlay

Installation

  • upgrade to openhab 4.1 I believe it will not work on older cores so 4.0 will not work.

  • Setup the app of your choice first, only once it is setup, will the binding discover and add a thing to your inbox. How to setup the app, please see their github page linked below. You do NOT need MQTT.

  • The binding will need to have openHAB restarted after the jar is installed for the actions to be use-able. The discovery also probably will not work until after a restart is made.

  • If you have trouble with dependencies, the easiest fix will be to either install the ipCamera or Tellstick binding to provide the Netty Libraries. Once the binding is merged this will not be an issue.

  • Once you have the app setup on the TV, use the sendTestMessage channel to display a message for checking that you have it all setup correctly. Then move onto using the Actions that are explained in the readme file at my own github page. Github is linked below with examples of how to use the bindings ACTIONS in DSL rules.

If you enjoy the binding, please consider sponsoring or a once off tip as a thank you via the links. This allows me to purchase software and hardware to contributing more bindings. Also some coffee to keep me coding faster never hurts :slight_smile:

Sponsor @Skinah on GitHub Sponsors

Paypal can also be used via
matt A-T pcmus D-O-T C-O-M

Github on how to setup and use the TvOverlay app.

Where to download the app from the Google Play Store:

Changelog

Version 0.6

  • online and offline detection
  • resend messages when TV comes back online.

Version 0.5

  • Added support for multiple base64 methods for TvOverlay API, see readme for details and examples.
  • Above support now means you can supply any icon or graphic you wish to use not just MDI icons.
  • Base64 download: support means the binding can download the camera snapshot which reduces lag so people running do not leave the cameras view before the TV can display the pic.

Version 0.4

  • New channel pixelShift
  • Fixed Notifications ACTION added
  • BREAKING CHANGE, messageID is now a String and not an int, just need to surround in quotes like the updated readme shows.

Version 0.3

  • Images get updated instead of the TV using cache stopping updates from showing.
  • Actions now have a boolean true/false so your rules know if the notification was successful.
  • Discovery should work for Andriod TV, Sheild TV and Fire TV and look for any supported apps running.

Version 0.2

Version 0.1

  • Videos, Images and Text messages can be sent to your TV via TvOverlay app.
  • Discovery is working, please provide feedback if it does or does not find your TV.
  • No support for updating the controls in openHAB if you make changes in the app.
  • No online and offline detection added yet. now supported
  • No support yet for the fixed style notifications. Now supported

Resources

http://pcmus.com/openhab/AndroidNotificationsBinding/org.openhab.binding.androidnotifications-4.2.0-SNAPSHOT.jar

Source Code and readme are both found at my github here:

9 Likes

I would love to give you a tip, but from your link it is not possible to use Paypal anymore and I don’t give my credit card details to any internet service.

Would you mind adding another payment method, preferably Paypal?

Thx a lot.

Thank you, you can use matt A-T pcmus D-O-T C-O-M to hopefully trick the bots which will have my email from all code signoffs anyway.

This particular binding has taken a year of spare time at least to get to this stage (due to one app seeming to have changed its undocumented protocol) where it can now be useful for others to use and I am now using it on my production openHAB. I would love to hear back how smooth it works and if your TV gets auto found by the discovery. It is possible that only Android TV OS get found.

2 Likes

Done.
Actually I don’t have an Android TV (yet), but I thought this is a good opportunity to thank you for the IPCamera binding which I use since years.

1 Like

I could be wrong, but you can do this with any TV if you add on a $50 Google TV (4K version is around $80) that plugs into HDMI and gives you a remote with a built in mic so you can do voice searches in youtube and more. You then also have the ability to chromecast to the TV using the same device. Disclaimer, I do not work for google so do your own research.

To gain the ability to cast to your TV as well as do overlays its worth getting one to try or wait for someone to reply back that they have tested it.

New build uploaded that now has working Text Messages for Notifications for Android TV and Notifications for Fire TV.

To upgrade just uninstall and then reinstall from the marketplace, however you probably will need to restart openHAB for the actions to work. Netty dependencies can be solved by installing the ipCamera binding.

I have two Chromecast with Google TV dongles and can confirm these features. I also don’t work for Google. :wink:

I don’t use IP cameras or feel the need for notifications on my TVs, but as always I appreciate your efforts to improve openHAB!

Thanks for confirming that these two apps (TvOverlay and Android TV Notications) are able to be installed on a google TV device. That’s far cheaper then replacing a working TV, if you can just add on a $50 device and get the full android experience and app support.

Thanks, its also good to see people are now far more supportive instead of posting things like ‘you could do that in x different way and not written a binding to make life easier for other people’. Soon it will mean if someone comes from another project with this already working, openHAB will auto detect, suggest the addon and can auto find and add the thing.

I see it as unexceptable that this same feature has been working in:
Homeseer, BTW the binding costs you USD$39

Hubitat has it working with a grovee script of some kind.

Home assistant also has it working but is a pain to setup and whilst I could get text working, having a working video stream wasted countless hours trying poorly documented methods that ended up still not working. The TvOverlay app was created because of other people having this same issue of not getting the Android TV Notications working well, and this is the reason it has taken me around a year to get to this point.

I suspect that the TvOverlay app is going to vastly improve support in all of the home automation platforms as its fully documented and open source(?). It only came out around 3 months ago so hopefully it keeps getting new features and fixes.

Oops, I was actually talking about the features you described in your earlier post.

I just looked and Google Play gives me the option to install both apps on my Chromecasts with Google TV (HD and 4K), but I haven’t actually done it since I don’t need them.

1 Like

Uploaded a few new features:

  • More channels for Android TV Notications to allow changing the position and text size.
  • Added returning true/false for all the actions so you know if they worked in a rule.
  • Added a trick to ensure the images are always loaded and old cached copies are not used by the TV.

I tested it today on my Fire TV Cube and can confirm it is working. Just install “Notifications for Fire TV” on your Fire TV. Scanning through the binding does not show the Fire TVs yet, so you have to get the IP from the device in another way.

C̶u̶r̶r̶e̶n̶t̶l̶y̶ ̶t̶h̶e̶r̶e̶s̶ ̶n̶o̶ ̶o̶p̶t̶i̶o̶n̶ ̶t̶o̶ ̶c̶o̶n̶f̶i̶g̶u̶r̶e̶ ̶t̶h̶e̶ ̶H̶e̶a̶d̶e̶r̶ ̶(̶i̶t̶ ̶a̶l̶w̶a̶y̶s̶ ̶s̶a̶y̶s̶ ̶o̶p̶e̶n̶H̶A̶B̶)̶ or to send some OH-icons with the notification. Hope these functions getting added soon. Very nice binding. Thanks for your contribution.

For everyone having problems downloading the .jar file via the provided link: Use this link and download it manually:
http://pcmus.com/openhab/AndroidNotificationsBinding

Correct, have not added discovery for Fire TVs, you just need to manually add with the IP. Thanks for confirming it works on the Fire TV.

Yes there is, you need to read the documentation and look at the examples of how to use the ACTIONS. You will also need to do a restart after changing the jar file for the actions to get picked up when openHAB boots.

Correct, no icons/images/video unless you use the TvOverlay app. This is a work in progress for your Fire TV app, however it is far more advanced for the TvOverlay app.

Thank you, will try to find the time to look into more features soon.

Sorry, my bad. Obviously didnt read the docs.

I see that as positive feedback. A user should be able to grab any binding, not have to read anything and have success. When something does not work, then you should read the docs and it should be covered in enough detail to get you going. So thank you. I wish the actions from a thing were better/easier to use in openHAB and someone will need to add some extra stuff so they can be used in blockly rules.

This is a really awesome implementation! Would you consider trying to add this directly to the AndroidTV binding or giving me permission to submit your code into it?

Thank you glad you find it useful.

Yes I will consider it, as I agree to the principal that an end user should not get 15 different bindings offered to them all with similar roles like Home Assistant does. IMHO this creates too much choice, confusion and fractures the efforts and give a non-consistent experience. The end user suffers in the end, instead of a well thought out and multiple technologies working in harmony for the best result.

I am a bit reserved (that does not mean against) at joining it due to my intended direction for this binding. I believe it will be possible and I have already completed a lot of the coding that allows the phone apps to send their push messages to this binding. The binding can then intercept, filter and create events based on the messages the phones push to the server. The binding could then pass on the messages to the TV with a control to turn them on and off at will with a channel, or they can be left fully disabled and only used for event triggering.

Imagine that X cloud or app will not work in openHAB as they have no api or method to connect with, but since it will push a message to a phone, we can intercept the push message and then trigger things to happen in openhab. A way to get around a company that does not like opensource getting access. If I get this working, I would much prefer to have it in a stand-alone binding, but I do not know exactly how this will work, or if I want to spend that much time on it.

If you’re wanting to add messages to the screen to your binding then feel free to discuss this further with me privately, as I want what is best for the end user of openHAB. If your binding can talk ADB codes then there are ways to message, to setup apps and to enable features in the TV to make the notifications apps easier to setup. There are advantages to having it all in the one binding for sure.

2 Likes

That all makes plenty of sense. Id say its probably best to keep them separated then for now while you push forward.

Agree and if I give up on the server idea then it would be best to move it across to your binding. However one thing for you to consider would be a breaking change and making it a bridge with things binding. A bridge for each TV, then child things for each app. I do not see another way due to the mdns discovers the bridge, then each app gets discovered as a child thing. Would you make that change? From memory it is not setup that way yet and everyone using your binding would get hit with a breaking change.

Just added Fixed Notifications if your using TvOverlay app.

I really wanted this so the icons can warn when to bring the washing in as the sprinklers will water the lawn early next morning.

Also shown is some icons I can use to remind us which colour bin has to go out on the street and it only appears on the day when they need to go out.

Can be made transparent and lots of options and could even put the number of hours till the sprinklers turn on and made to count down. The readme has the examples on how to create these icons.

Would love to see what people are going to use this for.

Only thing to be aware of is if the TV is an OLED TV then fixed notifications could lead to burn in if they are always shown and at the same location.