Page 1 of 1

Use TVOverlay to show Domoticz notifications on your Android TV

Posted: Thursday 02 October 2025 22:25
by waltervl
I came across the app TVOverlay that can show notifications including pictures on a Google or Android TV or google TV mediaplayer, see page https://github.com/gugutab/TvOverlay and this video https://www.youtube.com/watch?v=mdsY084-pr8

As it has a Rest API and MQTT interface it can also show notifications coming from Domoticz!
I did the option with a dzvents script using the Rest API to send a notification including a screenshot of my Domoticz Camera when I have motion on my driveway. You probably also can do this with MQTT but I did not investigate this as I do not use MQTT....

So the procedure is:
1 Install and setup TvOverlay on your AndroidTv, Chromecast or Andoid TV mediaplayer via PlayStore, see https://github.com/gugutab/TvOverlay?ta ... how-to-use
2. Make note of the IP of the TV as you need it in the dzvents OpenURL.
3. Make note of the camera IDX you want a screenshot off to be shown in the notification on your TV
4. Copy below code snippet in a dzvents script session. This example is triggered on my your motion sensor. Change the camera IDX, TV-IP and Domoticz IP and Port to your needs.

Have fun!

Code: Select all

return {
    on = {
        devices = {
            443 -- Motion driveway sensor
        }
    },
	logging = {
		level = domoticz.LOG_INFO, -- Can be domoticz.LOG_INFO, domoticz.LOG_MODULE_EXEC_INFO, domoticz.LOG_DEBUG or domoticz.LOG_ERROR
		marker = 'TVOverlay',
	},
    execute = function(domoticz, device)
       if device.state == 'On'  then
           domoticz.openURL({
                url = 'http://TV-IP:5001/notify',
                method = 'POST',
                callback = 'TVOverlayNotify',
                postData = {
                    title = 'Motion on Driveway',
                    image = 'http://Domoticz-IP:PORT/camsnapshot.jpg?idx=1',
                    duration = '20'
                }
            })
       end
     end
}