rogro82 / PiPup

Enhanced notifications for Android TV
237 stars 71 forks source link

Shield TV - White box instead of video #54

Open vessosa opened 9 months ago

vessosa commented 9 months ago

I have followed the tutorial from here: https://seanblanchfield.com/2023/06/realtime-pip-cameras-on-tv-with-home-assistant-v2. And I can visualize images from my camera, but not video. When I try to send my camera feed, everything that I get is a blank white screen: image

I tried to use the same link over an Android TV browser, and I could see the camera. Any idea of what I can do here?

I'm using a Shield TV Sw version 9.1.1 (Android 11)

seanblanchfield commented 9 months ago

It sounds like you can view the webrtc-camera link on your android tablet browser but it's not working in pipup.

Can you confirm that your pipup_url_on_tv REST command is fundamentally working by sending a different URL to display (e.g. something from the web) and make sure that works correctly?

Assuming that works, your issue sounds similar to what @radhoo2k10 experienced and ultimately resolved in our conversation on the HA forums.

In his case, his shield was on a different subnet from the camera and firewall rules prevented it from setting up the webrtc P2P stream, while other devices he was testing on worked fine.

vessosa commented 9 months ago

I have tested it before sending http://www.google.com, and it works; the popup displays the Google website. All my cameras, home assistant, TVs, and Shields are in the same subnet. It's weird because:

  1. Using a browser over the shield and logging the URL generated, I can view the stream (so it's not a problem with codec or connection from the shield).
  2. I can stream images as your tutorial teaches, but live stream, no.
seanblanchfield commented 9 months ago

Can you confirm there is no relevant log output from the webrtc-camera integration or in the go2rtc log?

I also suggest trying to debug it by narrowing down the difference between you successfully opening the Google homepage and failing to open the webrtc-camera page (which works elsewhere on your subnet). When you find the point it fails at, the problem might be apparent.

For example, try opening this webrtc demo page to see if you see both teapots: https://webrtc.github.io/samples/src/content/capture/canvas-pc/

If that works, host a copy of that webpage on your subnet and try again. If that works maybe try to host the test page on your HA box (e.g. in /config/www, which is mapped to /local on the HA HTTP server).

If that works, the next step might be to try to remote debug the relevant WebView on your shield using chrome dev tools, to catch the exact point of failure.

vessosa commented 9 months ago

@seanblanchfield Thank you for your help, and I am sorry for the delayed response. There is no error for go2rtc/webrtc-camera (debug enabled). The only error that I have is:

Logger: homeassistant.components.recorder.table_managers.event_data
Source: components/recorder/table_managers/event_data.py:43
Integration: Recorder ([documentation](https://www.home-assistant.io/integrations/recorder), [issues](https://github.com/home-assistant/core/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+recorder%22))
First occurred: 3:14:35 PM (1 occurrences)
Last logged: 3:14:35 PM

Event is not JSON serializable: <Event call_service[L]: domain=webrtc, service=create_link, service_data=link_id=2326594885945992540278212547595942635566, entity=camera.ringbell_sub, open_limit=2, time_to_live=20>: Integer exceeds 64-bit range

Regarding the website, when used with pipup, the teapot doesn't render in any place. I even tried to install a browser, and it doesn't render too.

One detail, I'm not using the beta version from Android Play, but another version provided by the author (0.16-beta) because of the SSL requirement.

adamswm92 commented 8 months ago

@seanblanchfield Thank you for your help, and I am sorry for the delayed response. There is no error for go2rtc/webrtc-camera (debug enabled). The only error that I have is:

Logger: homeassistant.components.recorder.table_managers.event_data
Source: components/recorder/table_managers/event_data.py:43
Integration: Recorder ([documentation](https://www.home-assistant.io/integrations/recorder), [issues](https://github.com/home-assistant/core/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+recorder%22))
First occurred: 3:14:35 PM (1 occurrences)
Last logged: 3:14:35 PM

Event is not JSON serializable: <Event call_service[L]: domain=webrtc, service=create_link, service_data=link_id=2326594885945992540278212547595942635566, entity=camera.ringbell_sub, open_limit=2, time_to_live=20>: Integer exceeds 64-bit range

Regarding the website, when used with pipup, the teapot doesn't render in any place. I even tried to install a browser, and it doesn't render too.

One detail, I'm not using the beta version from Android Play, but another version provided by the author (0.16-beta) because of the SSL requirement.

i am in the exact same boat as you. please report back if you find a solution.

vessosa commented 8 months ago

So far, nothing.

Ucsus commented 8 months ago

The same thing - a white square, everything worked before, then I updated something - either HA or go2rtc/webrtc