PiPup - Android TV app for notifications

I have been using “Notifications for Android TV” for some time to show notifications when the dryer/washing machine was ready or a notification with an image when someone was at the door.

But I disliked the fact that the app was closed-source and that it was impossible to show video streams in a notification. Because of this I decided to build a new app from scratch with basically somewhat the same features, but just for use by third-parties so open-source and with a documented api.

Currently it can handle the following:

  • Notifications with an image using multipart/form-data
  • Notifications with optional media (image, video or web) as json

The web media type uses a WebView, which can be used to show mjpeg streams as they most likely will not play through Android’s stock video player

The application is currently in an open beta and everything you need to know to get started is described in the readme ( https://github.com/rogro82/PiPup )

I hope someone is willing to write an integration for it as I am already cutting down way too much on my sleeping time as is :smile: I have written an example integration in nodejs for another home-automation solution ( athom homey ) so that might be a good place to start ( https://github.com/rogro82/PiPup-homey )

32 Likes

This is the opensource project I’ve been waiting for since years. Thank you rogro82!

I wanted to be able to choose the size of the font and the position of pictures freely in the future.

Awesome! Looking forward to playing with this too! Anyone got a RESTful Command example for HA based on the example code in Github? Rest command construction not my forte. :confused:

{
  "duration": 30,
  "position": 0,
  "title": "Your awesome title",
  "titleColor": "#0066cc",
  "titleSize": 20,
  "message": "What ever you want to say... do it here...",
  "messageColor": "#000000",
  "messageSize": 14,
  "backgroundColor": "#ffffff",
  "media": { "image": {
    "uri": "https://mir-s3-cdn-cf.behance.net/project_modules/max_1200/cfcc3137009463.5731d08bd66a1.png", "width": 480
  }}
}

Sorted! Works extremely well. Very impressed.

rest_command:
  androidtv_doorbell:
    url: http://ip_of_tv:7979/notify
    content_type: 'application/json'
    verify_ssl: false
    method: 'post'
    timeout: 20
    payload: >
      {
      "duration": 10,
      "position": 2,
      "title": "Home Assistant",
      "titleColor": "#50BFF2",
      "titleSize": 10,
      "message": "Someone is at the door",
      "messageColor": "#fbf5f5",
      "messageSize": 14,
      "backgroundColor": "#0f0e0e",
      "media": { "image": {
        "uri": "http://ip_of_ha:8123/local/images/front_porch.jpg", "width": 580
      }}
      }
1 Like

Is there’s any way for me to download apk directly so I can side-load it on FireTV? Because Google Play is telling me that my smartphone is incompatible with your application, of course it’s not Android TV but it’s only way for me to download apk then side-load it from there.

Sounds great. I’ll have to see if I can find time to play with this on the weekend!
Looking forward to getting the video popup when somebody pulls into the driveway.

I would like to help test. However it says it is not compatible with pixel 4 xl. Is there plans to support that in the future? thank you.

How did I not see this earlier! Can’t wait to test it out

I believe that you are supposed to install on the androidTV device. Not your phone.
That is likely why it says not compatible.

Started to play around with this today and I’m having a bit of trouble.
I got the app installed. Restarted the androidTV (mibox3) and then copied the code that xbmcnut came up with to my config.yaml. I added my TV IP and changed the uri to one that I use to send myself an image through telegram to no avail. I since tried an image from the internet and still no luck.
I then reread the readme on github and saw the part about sideloading and permission for SYSTEM_ALERT_WINDOW. Now I did not sideload, but figured I give it a try to see if it made a difference and still no go.
Not sure where to go from here. Anyone else get this working?

My Android TV is currently not connected with internet. But I’d like to sideload the apk file and test it now. Where/how can I receive it?

lol duh. my fault, thx

Can someone please kindly send me the APK file?

Not sure of the legality of that, but also don’t know how to get the apk off my MiBox.
Finally got it to work, but video is proving tough for me to get working. I think it is likely my situation with my network and everything in my house more than this application though.

1 Like

I’m trying to get this working but not having any success. I have the app installed and running on my Android TV.

code:

rest_command:
  loungetv_doorbell:
    url: http://192.168.0.81:7979/notify
    content_type: 'application/json'
    verify_ssl: false
    method: 'post'
    timeout: 30
    payload: >
      {
      "duration": 20,
      "position": 0,
      "title": "Home Assistant",
      "titleColor": "#50BFF2",
      "titleSize": 14,
      "message": "Someone is at the door",
      "messageColor": "#fbf5f5",
      "messageSize": 12,
      "backgroundColor": "#0f0e0e",
      "media": { "web": {
        "uri": "rtsp://admin:[email protected]:554/ch1/main/av_stream", "width": 480
      }}
      }

The stream loads in VLC player so I know the URL is ok (password has been changed for this post).

If I call the service from the dev panel, I get nothing on the TV or in the HA logs… any ideas? I initially tried with the media type being ‘video’, then ‘web’. Neither work.

I would suggest to just try an image first and see if you can get that to work.
I had issues with video too, but images work fine.
I got one stream to work and that was from blue iris that is setup to push the video via HLS. It just took too long to load to be usable.

Unfortunately pipup can neither stream RTSP nor handle authentication.

installed PiPup on my Android TV. when i go in the brower to ip:7979. i get; invalid request: invalid method

Hey, I managed to get this working which is fantastic and soo simple!
QQ: is it possible to add multiple AndroidTVs to the url?
i.e: url: http://192.168.0.yy:7979/notify; http://192.168.0.xx:7979/notify

Cheers

I have the same issue but am using ZoneMinder and it comes up with an error in the box.
net:err_cleartext_not_permitted

I am using HTTP locally, does this need to be HTTPS?