PiPup - Android TV app for notifications

I did normal install from the Play Store so I did not Sideload.

How can I test with Postman? Never used it before

Might see if I can whip up a quick YT video for you.

So I got it to finally work. Not sure what changed. I am having to use Nabu Casa external link for https, so the image shows up a little slow.

Glad you got it working :+1:

1 Like

My rest command, working fine on ShieldTV and MiBox3.
For the https, I use Nginx Proxy Manager with white address list, and static DNS record on router.
This notification play live stream from Frigate

It’s sad that the application doesn’t interrupt screensaver mode. As far as I understand, we will have to use the adb command to wake up in automation …

rest_command:
  miboxoffice_test_notif:
    url: http://192.168.0.36:7979/notify
    content_type: 'application/json'
    verify_ssl: false
    method: 'post'
    timeout: 20
    payload: >
      {
      "duration": 30,
      "position": 2,
      "title": "title",
      "titleColor": "#50BFF2",
      "titleSize": 10,
      "message": "Message",
      "messageColor": "#fbf5f5",
      "messageSize": 14,
      "backgroundColor": "#0f0e0e",
      "media": { "web": {
        "uri": "https://frigate.address.com/api/back", "width": 720
      }}
      }
1 Like

Love it! Kudos to all who have contributed to the project…

Easy enough to setup!

Just one glitch that would be nice to resolve, while it is playing the live stream on the android tv, the pause button flickers in the center of the video and the timeline bar jumps up and down along the line…

Does anyone know of the cause or a solution? Is it posible to hide all the controls as though it has been made full screen?

Thanks

Does this now support a video stream? I thought it could only do still images…

Hey, yea it supports video now, works really well using WebRTC… I used this tutorial to set it up on my android tv box:

https://seanblanchfield.com/2022/03/realtime-pip-cameras-on-tv-with-home-assistant

2 Likes

Is there a way to kill the stream, as opposed to waiting for a timeout?

Posted a solution in another channel using a modified version of PiPup that allows HTTP urls that works well with Frigate’s local API.

Just realised I posted to the wrong thread.
Original post

I’m trying to get this working on a Shield TV. I’ve now managed to get snapshot images working. I can also get online videos working using post.json ( I tried Blue stars video) or using Developer Tools->Services.

I’m still stumped with getting webrtc video working. The pop-up appears but it is blank. The link to the video works in Firefox but not in post.json or in developer tools.

I am using an NGINX reverse proxy and my HA is accessible externally. I did try the port forwarding of UDP ports but that didn’t make any difference.

Found out my issue:
There are different versions of the apk available:
The original apk from Rogro82 - This one didn’t work for me.
The forked version by gmcmicken to support web-javascript - This is the one that fully worked.
The forked version by desertblade to support http/Frigate - This one partially worked for me.

I ditched the idea of using the WebRTC player with my build. Using frigates built in MPJEG streams loads much faster and keeps everything internal on my network.

Info about Frigates MPJEG streams:

Theres a new webrtc project on the horizon that may help with this…

Its not released yet but the beta is working great as a replacement in general. I have a feeling this will help with the pipup streams as well.

1 Like

Updated PipUP APK to support JavaScript to use with WebRTC. Still supports HTTP requests, so you can do internal calls.

Noticed that after 6 or so popups in short period, Frigate started to return a white video box. Added destroying of the WebView when the popup closes and that has seemed to have fixed the issue.

Tested on FireTV Cube with both MJPEG and WebRTC streams. Still getting delayed loading for local WebRTC streams, so I am sticking with local MJPEG streams.

APK: Releases · desertblade/PiPup · GitHub
Quick Write up on setting it up: https://github.com/desertblade/PiPup/blob/0759b347d7ebbc87464958a11cba644b492b9067/home_assistant.md

9 Likes

Question for you… I’ve found that if a stream contains audio, it will pause some apps on the Shield. I’ve worked around this by stripping the audio before it arrives but is there a possibility to always just mute the streams in this pipup? TBH, I am using the oiginal one you forked still but I am looking to test yours out soon and see how it works.

You may want to look into the go2rtc project. I have instant loading and much more. Its pretty impressive.

This is perfect! I tried to compile the source code with fixes, but I only got success messages from the gradle batch file, but no output.

I had to adopt the Frigate MJPEG streams for my Reolink cameras. I’ve tried every combination I can think of with Go2RTC (Using the RTSP stream, using RTMP, adding as a generic camera to HASS, using the Frigate RTMP restream) but they all do the loading animation for anywhere from 5 to 10 seconds. Considering I only want the pop up for a max of 10 seconds, I end up not seeing anything.

Interestingly, I have no issues with the streams from Hikvision doorbells. I have a couple of KV6113s, and they load the stream within a second. I haven’t added them to Frigate yet, so this just adding them as generic cameras. Not sure if this is an issue with the resolution of the streams or if the Reolinks are just outdated.

Its on my todo to look at go2rtc.

I looked at muting the video in webView. Looks like it will mute the entire system. I am sure there is a workaround, if I get a chance I will do some more research. I am not an Android dev so there is a lot I don’t know.

1 Like

Could you explain how you acheived stripping the audio? The only way I could strip audio is through the ffmpeg option but this causes a delay to load the stream via webrtc as the process to start ffmpeg and get the stream etc can take around 5-10 seconds so pointless in the end. I’ve also managed to use my own cutom page url to obtain a webrtc stream with the video element already muted but it seems videos will still pause or stop when the pipup shows the webrtc url and starts playing the video…

Any insight to your setup will be appreciated.

I use go2rtc. You can simply strip it there.

@calisro Thats what i’m referring to I’m already using go2rtc but its not possible to get instant video on ffmpeg conversion which seems to be needed to strip audio with just having #video=copy