Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rudimentary WebRTC support via go2rtc #162

Closed
wants to merge 9 commits into from

Conversation

sondregronas
Copy link

@sondregronas sondregronas commented Jul 5, 2024

I didn't explore too many options here, but I was able to get a restream via go2rtc/frigate by simply running the ServiceManager on the /video endpoint. Using this I am able to add a low latency camera feed to my Home Assistant dashboard.

EDIT:

Usage in Home Assistant:

image

Using go2rtc

go2rtc.yaml (https://github.com/AlexxIT/go2rtc?tab=readme-ov-file#go2rtc-home-assistant-add-on)

streams:
  Anker: 
    - ffmpeg:http://ankerctl-ip:4470/video
Alt: Frigate config

Note: Frigate just runs go2rtc

config.yml

go2rtc:
  streams:
    Anker:
    - "ffmpeg:http://ankerctl-ip:4470/video"

Lovelace Card (Home Assistant)

Add WebRTC integration from HACS (https://github.com/AlexxIT/WebRTC?tab=readme-ov-file#installation)

Use either http://<go2rtc_ip>:1984 or http://<frigate_ip>:1984 when configuring the integration, reboot and add a Custom: WebRTC Camera card to the dashboard:

type: custom:webrtc-camera
url: Anker

PPPP has a tendency to crash after a while - I'm working on a PR (which I've drafted into #160) that seems to be stable, but I'm still testing to make sure.

mtoner23 and others added 7 commits November 27, 2023 22:52
closes Ankermgmt#131 

Starting with the new firmware releases to anker make printers in the
past few weeks, MQTT no longer connects. There is a field in the mqtt
msg that expects 11 zeroes. these 11 bytes are no longer all zeroes. I
switched the protocol to expect just bytes here since we did nothing
with the zeroes to begin with this should be a backwards compatible
change.

Pasted below is a snippet from my terminal printing out the padding
field. you'll see 2 bytes in the middle of the 11 that are no longer
zeros.

```
[*] Padding: 0x0 0x0 0x0 0x3c 0x11 0x0 0x0 0x0 0x0 0x0 0x0
[*] Padding: 0x0 0x0 0x0 0x95 0x15 0x0 0x0 0x0 0x0 0x0 0x0
[*] Padding: 0x0 0x0 0x0 0xc6 0x20 0x0 0x0 0x0 0x0 0x0 0x0
[*] Padding: 0x0 0x0 0x0 0x5c 0x1d 0x0 0x0 0x0 0x0 0x0 0x0
[*] Padding: 0x0 0x0 0x0 0xa9 0x18 0x0 0x0 0x0 0x0 0x0 0x0
[*] Padding: 0x0 0x0 0x0 0xfa 0xf 0x0 0x0 0x0 0x0 0x0 0x0
[*] Padding: 0x0 0x0 0x0 0x99 0x21 0x0 0x0 0x0 0x0 0x0 0x0
[*] Padding: 0x0 0x0 0x0 0xd6 0x15 0x0 0x0 0x0 0x0 0x0 0x0
[*] Padding: 0x0 0x0 0x0 0x4c 0x9 0x0 0x0 0x0 0x0 0x0 0x0
[*] Padding: 0x0 0x0 0x0 0x3d 0x13 0x0 0x0 0x0 0x0 0x0 0x0
[*] Padding: 0x0 0x0 0x0 0xe3 0xb 0x0 0x0 0x0 0x0 0x0 0x0
```

Screenshot showing all green on the web ui after my change
<img width="1036" alt="image"
src="https://github.com/Ankermgmt/ankermake-m5-protocol/assets/22949655/9efce17f-a1e2-44cc-b2a7-1550c211a10c">
1.0.1 - Fix mqtt bug release
Enables the `/video` endpoint to work with WebRTC. (At least via go2rtc using `ffmpeg:<url>/video`)
Honestly I have no idea why this wasn't throwing errors at me before
@sondregronas sondregronas marked this pull request as draft July 9, 2024 08:48
@sondregronas sondregronas mentioned this pull request Jul 11, 2024
@sondregronas
Copy link
Author

superseded by #160

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants