Skip to content

Instantly share code, notes, and snippets.

@Mearman
Last active February 24, 2022 16:48
Show Gist options
  • Select an option

  • Save Mearman/4d6cc2c5e2f163c040c5bd606189558f to your computer and use it in GitHub Desktop.

Select an option

Save Mearman/4d6cc2c5e2f163c040c5bd606189558f to your computer and use it in GitHub Desktop.
my-unifi-cam-proxy.yml
<?xml version="1.0"?>
<Container version="2">
<Name>unifi-cam-proxy</Name>
<Repository>keshavdv/unifi-cam-proxy</Repository>
<Registry>https://hub.docker.com/r/keshavdv/unifi-cam-proxy/</Registry>
<Network>host</Network>
<MyIP />
<Shell>sh</Shell>
<Privileged>false</Privileged>
<Support>https://hub.docker.com/r/keshavdv/unifi-cam-proxy/</Support>
<Project />
<Overview>In order to add a camera to Protect, you must first generate an adoption token. The token is only valid for 60 minutes so you'll need to re-generate a new one if it expires during your initial setup.&#xD;
&#xD;
1. On the Protect UI, click 'Add Devices' and select 'G3 Micro'. Select 'Continue on Web' and type in a random string for the SSID and Password fields and click 'Generate QR Code'.&#xD;
- If you do not see this button, manually go to https://{NVR IP}/protect/devices/add (notice the "/devices/add")&#xD;
2. Take a screenshot of the QR code and upload it to https://zxing.org/w/decode.jspx&#xD;
3. Decode the QR code and extract the token from the second to last line in the 'Raw Text' field.&#xD;
&#xD;
https://hub.docker.com/r/keshavdv/unifi-cam-proxy/&#xD;
https://github.com/keshavdv/unifi-cam-proxy&#xD;
https://unifi-cam-proxy.com/&#xD;
&#xD;
unifi-cam-proxy --host {NVR IP} --cert /client.pem --token {Adoption token} rtsp -s rtsp://192.168.201.15:8554/cam'&#xD;
&#xD;
unifi-cam-proxy --host NVR_IP --mac VIRTUAL_MAC --cert CERT_CONTAINER_PATH --token ADOPTION_TOKEN CAM_CONFIG&#xD;
</Overview>
<Category />
<WebUI />
<TemplateURL />
<Icon>/plugins/dynamix.docker.manager/images/question.png</Icon>
<ExtraParams />
<PostArgs>unifi-cam-proxy --host NVR_IP --mac VIRTUAL_MAC --cert CERT_CONTAINER_PATH --token ADOPTION_TOKEN CAM_CONFIG</PostArgs>
<CPUset />
<DateInstalled>1645720961</DateInstalled>
<DonateText />
<DonateLink />
<Description>In order to add a camera to Protect, you must first generate an adoption token. The token is only valid for 60 minutes so you'll need to re-generate a new one if it expires during your initial setup.&#xD;
&#xD;
1. On the Protect UI, click 'Add Devices' and select 'G3 Micro'. Select 'Continue on Web' and type in a random string for the SSID and Password fields and click 'Generate QR Code'.&#xD;
- If you do not see this button, manually go to https://{NVR IP}/protect/devices/add (notice the "/devices/add")&#xD;
2. Take a screenshot of the QR code and upload it to https://zxing.org/w/decode.jspx&#xD;
3. Decode the QR code and extract the token from the second to last line in the 'Raw Text' field.&#xD;
&#xD;
https://hub.docker.com/r/keshavdv/unifi-cam-proxy/&#xD;
https://github.com/keshavdv/unifi-cam-proxy&#xD;
https://unifi-cam-proxy.com/&#xD;
&#xD;
unifi-cam-proxy --host {NVR IP} --cert /client.pem --token {Adoption token} rtsp -s rtsp://192.168.201.15:8554/cam'&#xD;
&#xD;
unifi-cam-proxy --host NVR_IP --mac VIRTUAL_MAC --cert CERT_CONTAINER_PATH --token ADOPTION_TOKEN CAM_CONFIG&#xD;
</Description>
<Networking>
<Mode>host</Mode>
<Publish />
</Networking>
<Data>
<Volume>
<HostDir>/mnt/user/appdata/unifi-cam-proxy</HostDir>
<ContainerDir>/config</ContainerDir>
<Mode>rw</Mode>
</Volume>
</Data>
<Environment>
<Variable>
<Name>NVR_IP</Name>
<Mode />
</Variable>
<Variable>
<Name>VIRTUAL_MAC</Name>
<Mode />
</Variable>
<Variable>
<Value>/config/client.pem</Value>
<Name>CLIENT_CERT_PATH</Name>
<Mode />
</Variable>
<Variable>
<Name>ADOPTION_TOKEN</Name>
<Mode />
</Variable>
<Variable>
<Name>CAM_CONFIG</Name>
<Mode />
</Variable>
</Environment>
<Labels />
<Config Name="NVR IP" Target="NVR_IP" Default="" Mode="" Description="Container Variable: NVR_IP" Type="Variable" Display="always" Required="true" Mask="false"></Config>
<Config Name="Virtual MAC" Target="VIRTUAL_MAC" Default="" Mode="" Description="e.g. AA:BB:CC:00:11:22" Type="Variable" Display="always" Required="true" Mask="false"></Config>
<Config Name="Certificate container path" Target="CLIENT_CERT_PATH" Default="/client.pem" Mode="" Description="Container Variable: CERT_CONTAINER_PATH" Type="Variable" Display="always-hide" Required="true" Mask="false">/config/client.pem</Config>
<Config Name="UniFi Adoption Token" Target="ADOPTION_TOKEN" Default="" Mode="" Description="Container Variable: ADOPTION_TOKEN" Type="Variable" Display="always" Required="true" Mask="false"></Config>
<Config Name="Camera Config" Target="CAM_CONFIG" Default="" Mode="" Description="E.g. rtsp -s rtsp://192.168.201.15:8554/cam&#13;&#10;See: https://unifi-cam-proxy.com/configuration/rtsp" Type="Variable" Display="always" Required="true" Mask="false"></Config>
<Config Name="APPDATA" Target="/config" Default="/mnt/user/appdata/unifi-cam-proxy" Mode="rw" Description="Container Path: /" Type="Path" Display="always-hide" Required="true" Mask="false">/mnt/user/appdata/unifi-cam-proxy</Config>
</Container>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment