Android TV notifications - TvOverlay

Thanks so much for your reply and help. I do have the mobile app installed. I am able to perform tests. In home assistance, I just been testing the notifications from the developer tools. I apologize if this is not the proper way to send over the info.

Below is what I have in the configuration.yaml

notify:
  - name: TvOverlayNotify
    platform: rest
    method: POST_JSON
    resource: http://192.168.4.210:5001/notify 
    verify_ssl: false
    title_param_name: title
    data:
      id: "{{ data.id | default(null) }}" # string | main text | default: null
      appTitle: "{{ data.appTitle  | default('Home Assistant') }}" # string | extra info text | default: null
      color: "{{ data.color | default('#049cdb') }}" # string | color tint for smallIcon. accepts 6 or 8 digit color hex. the '#' is optional | default: null
      image: "{{ data.image | default(null) }}" # string | accepts mdi icons, image urls and Bitmap encoded to Base64 | default: null
      video: "{{ data.video | default(null) }}" # string | video url. supports rtps, hls, dash, smoothstreaming | default: null
      smallIcon: "{{ data.smallIcon | default(null) }}" # string | accepts mdi icons, image urls and Bitmap encoded to Base64 | default: null
      largeIcon: "{{ data.largeIcon | default(null) }}" # string | accepts mdi icons, image urls and Bitmap encoded to Base64 | default: null
      corner: "{{ data.corner  | default(null) }}" # string | position on the screen. accept values: bottom_start, bottom_end, top_start, top_end | default: null (uses hot corner)
      seconds: "{{ data.seconds | default(null) }}" # int | duration that the notification will stay visible in seconds | default: null (uses duration setting)
      
  - name: TvOverlayNotifyFixed
    platform: rest
    method: POST_JSON
    resource: http://192.168.4.210/notify_fixed
    verify_ssl: false
    title_param_name: title
    data:
      id: "{{ data.id | default(null) }}" # string | can be used to edit or remove the fixed notification | default: [random]
      text: "{{ data.text  | default(null) }}" # string | main text | default: null
      icon: "{{ data.icon | default(null) }}" # string | accepts mdi icons, image urls and Bitmap encoded to Base64 | default: null
      textColor: "{{ data.textColor | default(null) }}" # string | accepts 6 or 8 digit color hex. the '#' is optional | default: #FFFFFF
      iconColor: "{{ data.iconColor | default(null) }}" # string | accepts 6 or 8 digit color hex. the '#' is optional | default: #FFFFFF
      borderColor: "{{ data.borderColor | default(null) }}" # string | accepts 6 or 8 digit color hex. the '#' is optional | default: #FFFFFF
      backgroundColor: "{{ data.backgroundColor | default(null) }}" # string | accepts 6 or 8 digit color hex. the '#' is optional | default: #66000000
      shape: "{{ data.shape | default(null) }}" # string | frame style. accept values: circle, rounded, rectangular | default: "rounded"
      visible: "{{ data.visible | default(true) }}" # boolean || if false, removes the fixed notification with matching id || default: true
      expiration: "{{ data.expiration | default(null) }}" # string or int | when the notification will be removed. valid formats: 1695693410 (Epoch time), 1y2w3d4h5m6s (duration format) or 123 (for seconds) | default:  null

tvoverlay:
  url: http://192.168.4.210:5001/set/overlay
  method: POST
  verify_ssl: false
  headers:
    accept: 'application/json'
  content_type:  'application/json; charset=utf-8'
  payload: '{{ payload }}'

This is what I have been using to test the video feed. It works when I have an image. With the video, only the notification is displayed without the video.

action: notify.tvoverlaynotify
data:
  message: The garage door has been open for 10 minutes.
  data:
    title: Test
    video: >-
      rtsp://username:[email protected]:554/cam/realmonitor?channel=8&subtype=1

Try this

action: notify.tvoverlaynotify
data:
  message: The garage door has been open for 10 minutes.
  data:
    title: Test
    video: rtsp://username:[email protected]:554/cam/realmonitor?channel=8&subtype=1

@nodinosaur wow, just installed your app and it looks very promising after the first few minutes.

Something for your consideration: maybe you should create your own thread where we can discuss with you when needed. It will also give you more visibility and might grow your user base.

Thanks and happy new year everyone

1 Like

@ Imygaf … same results. the notification works, but no video. I will keep a look out for another solution. Thank you so much for taking the time to look at this.

Sorry to hear that, I know it can get quite frustrating when it doesn’t work. This is what I have

service: notify.tvoverlaynotify
data:
  message: Motion Detected
  data:
    id: front_door
    color: "#FFF000"
    largeIcon: mdi:cctv
    corner: top_start
    seconds: 12
    video: rtsp://user:[email protected]/Streaming/Channels/502

Works for me. Are you sure path is correct, does it work elsewhere?

I tried this as well and same results. Everything displays but the video stream. My rtsp stream works in VLC, HA generic camera, webrtc and go2rtc.

Thank you for the approval, I am glad you like it so far :slight_smile:

You’re right I ought to, maybe I’ll do it this weekend

2 Likes

Any plans to change the look of the notifications? I get a portrait shaped notification, with the writing at the bottom. Not exactly the neatest looking, so it would be nice to be able to make formatting changes, like align text within the popup etc.