WebRTC for Unifi Protect

I’m trying to implement a door entry system using a G4 Pro camera and my existing door release (electro-magnetic).

I found that the lag using the RTSP connections is too much and so have been tinkering with getting WebRTC working.

I’ve got it basically working with the following with the following positives:

  • low latency (sub 200ms)
  • 2 way audio
  • No ffmeg required!

But:

  • It currently only works on a LAN connection
  • I’ve been using a custom add-on to get a token and do the WebRTC signalling

I’m an experienced developer, but new to HA. And so I’m looking for help with the following:

  • Building the WebRTC signalling into the existing existing integration so I can ditch the add-on
  • Integrating my front-end changes into the main build

All assistance welcomed!

Cheers
Paul