Howto: Snapshot from Uniview (UNV) camera

It took me some time to figure out the correct settings, so I hope this saves someone some time.

I want to have Telegram text me a snapshot of the camera on a event (alarm or doorbell).

I have one camera that works simply with this URL:
http://CAMERA_IP:85/images/snapshot.jpg
Not sure why it’s port 85 (the regular webinterface is 80), but it works.

Another more recent model with much newer firmware changed the behavior, it now requires authentication so it as to be setup like this:

  action:
  - service: notify.olivier
    data:
      message: Camera Snapshot
      data:
        photo:
        - url: http://CAMERA_IP:85/images/snapshot.jpg
          caption: 'OLDER CAMERA'
        - url: http://CAMERA_IP:85/images/snapshot.jpg
          caption: 'NEW CAMERA'
          username: admin
          password: SUPER_SECRET
          authentication: digest
3 Likes

Thanks I found this useful as I recently got a uniview NVR and 4 cameras. There seems to be a built in motion sensor function that works pretty well, I just can’t seem to find a way to get that into Home Assistant. Any info out there that you think could help? Cheers

Have you had any luck with your NVR? I’m struggling with it too.

Unfortunately the NVR doesnt produce the snapshots. RTSP is possible though:

IPC:
Main-Stream: rtsp://IP:port/media/video1
Sub-Stream: rtsp://IP:port/media/video2
NVR:
Main-Stream: rtsp://IP:port/unicast/c1/s0/live
Sub-Stream: rtsp://IP:port/unicast/c1/s1/live

If you want the snapshots, you’ll have to grap them directly from the camera. If you’re using the PoE ports on the back of the NVR, that won’t work. You should move the camera to your “normal” network and add the camera to the NVR with it’s IP adress.

I didnt find a way to get the motion detection into HA… The implemented SNMP in recent firmware versions, but motion is not in there…

Many thanks for your help. If they ever implement a motion component for us to use, please let us know.

Hi, please tell me the configuration of the camera UNV configuration.yaml. I’m trying to set up the second day, I can’t get the image from the camera, thanks

ffmpeg:
camera:
  - platform: ffmpeg
    input: rtsp://admin:P@[email protected]/media/video2
    name: Camera Name
1 Like

Thank you…)))))

any luck with this, im trying to get the snapshots into HASS from the Uniview NVR. But they are powered by the NVR

No the NVR doesn’t produce the snapshots, only the stream. If you want de snapshots directly you have to connect the cameras to your local network (not the PoE ports on the NVR) and pull the snapshots from the camera.
You can connect the camera to the NVR that way too. Just add it to the NVR using the IP on your local network.

That could work but do not have enough ports on my switch.

Is it not possible to use the email alert function that sends a snapshot and use that?

Yes sending email with snapshot on motion detection for example is possible.
Mostly people find they get too many false alerts if you set it to simply motion though.

so the NVR allows you to access the camera on a different port

eg my nvr is 192.168.1.xxx

if i use port 192.168.1.xxx:30020 then i can access the camera menu. I wonder if it would be possible to use this method to get a snapshot through the NVR. From here i can log in directly to the camera and make a snapshot

alternatively you can set it to send a snapshot to FTP server in HASS and use that as the snapshot image? the camera lets you choose how many pictures to create before it starts to overwrite.

can you then use this for the camera_url image?

Im new to HASS and trying to get these cameras intgrated fully

Snapshot works on NVR. Using this URL

1.32 is the NVR IP

http://192.168.1.32:30002/images/snapshot.jpg

Great! I assume that port number is different per camera?

yea so if you log into the NVR and go to camera settings you can click on access which gives you the port for that camera.

it works with the uniview cameras, going to try with the reolinks i have, it might be that i need to forward a port on the reolink camera from 30003 to 80 to get it to land on the camera landing page.

> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsdd="http://schemas.xmlsoap.org/ws/2005/04/discovery" xmlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:xmime="http://tempuri.org/xmime.xsd" xmlns:xmime5="http://www.w3.org/2005/05/xmlmime" xmlns:xop="http://www.w3.org/2004/08/xop/include" xmlns:wsrfbf="http://docs.oasis-open.org/wsrf/bf-2" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:wstop="http://docs.oasis-open.org/wsn/t-1" xmlns:wsrfr="http://docs.oasis-open.org/wsrf/r-2" xmlns:ns1="http://www.onvif.org/ver10/actionengine/wsdl" xmlns:tev="http://www.onvif.org/ver10/events/wsdl" xmlns:ns10="http://www.onvif.org/ver10/events/wsdl/PullPointBinding" xmlns:ns11="http://www.onvif.org/ver10/events/wsdl/CreatePullPointBinding" xmlns:ns12="http://www.onvif.org/ver10/events/wsdl/PausableSubscriptionManagerBinding" xmlns:ns13="http://www.onvif.org/ver10/network/wsdl/RemoteDiscoveryBinding" xmlns:ns14="http://www.onvif.org/ver10/network/wsdl/DiscoveryLookupBinding" xmlns:tdn="http://www.onvif.org/ver10/network/wsdl" xmlns:ns3="http://www.onvif.org/ver20/analytics/wsdl/RuleEngineBinding" xmlns:ns4="http://www.onvif.org/ver20/analytics/wsdl/AnalyticsEngineBinding" xmlns:tan="http://www.onvif.org/ver20/analytics/wsdl" xmlns:ns5="http://www.onvif.org/ver10/events/wsdl/PullPointSubscriptionBinding" xmlns:ns6="http://www.onvif.org/ver10/events/wsdl/EventBinding" xmlns:ns7="http://www.onvif.org/ver10/events/wsdl/SubscriptionManagerBinding" xmlns:ns8="http://www.onvif.org/ver10/events/wsdl/NotificationProducerBinding" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:ns9="http://www.onvif.org/ver10/events/wsdl/NotificationConsumerBinding" xmlns:tad="http://www.onvif.org/ver10/analyticsdevice/wsdl" xmlns:tds="http://www.onvif.org/ver10/device/wsdl" xmlns:timg="http://www.onvif.org/ver20/imaging/wsdl" xmlns:tls="http://www.onvif.org/ver10/display/wsdl" xmlns:tmd="http://www.onvif.org/ver10/deviceIO/wsdl" xmlns:tptz="http://www.onvif.org/ver20/ptz/wsdl" xmlns:trc="http://www.onvif.org/ver10/recording/wsdl" xmlns:trp="http://www.onvif.org/ver10/replay/wsdl" xmlns:trt="http://www.onvif.org/ver10/media/wsdl" xmlns:trv="http://www.onvif.org/ver10/receiver/wsdl" xmlns:tse="http://www.onvif.org/ver10/search/wsdl" xmlns:ter="http://www.onvif.org/ver10/error" xmlns:tns1="http://www.onvif.org/ver10/topics" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
> 
> <SOAP-ENV:Body>
> 
> <SOAP-ENV:Fault>
> 
> <faultcode>SOAP-ENV:Client</faultcode>
> 
> <faultstring>HTTP GET method not implemented</faultstring>
> 
> </SOAP-ENV:Fault>
> 
> </SOAP-ENV:Body>
> 
> </SOAP-ENV:Envelope><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsdd="http://schemas.xmlsoap.org/ws/2005/04/discovery" xmlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:xmime="http://tempuri.org/xmime.xsd" xmlns:xmime5="http://www.w3.org/2005/05/xmlmime" xmlns:xop="http://www.w3.org/2004/08/xop/include" xmlns:wsrfbf="http://docs.oasis-open.org/wsrf/bf-2" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:wstop="http://docs.oasis-open.org/wsn/t-1" xmlns:wsrfr="http://docs.oasis-open.org/wsrf/r-2" xmlns:ns1="http://www.onvif.org/ver10/actionengine/wsdl" xmlns:tev="http://www.onvif.org/ver10/events/wsdl" xmlns:ns10="http://www.onvif.org/ver10/events/wsdl/PullPointBinding" xmlns:ns11="http://www.onvif.org/ver10/events/wsdl/CreatePullPointBinding" xmlns:ns12="http://www.onvif.org/ver10/events/wsdl/PausableSubscriptionManagerBinding" xmlns:ns13="http://www.onvif.org/ver10/network/wsdl/RemoteDiscoveryBinding" xmlns:ns14="http://www.onvif.org/ver10/network/wsdl/DiscoveryLookupBinding" xmlns:tdn="http://www.onvif.org/ver10/network/wsdl" xmlns:ns3="http://www.onvif.org/ver20/analytics/wsdl/RuleEngineBinding" xmlns:ns4="http://www.onvif.org/ver20/analytics/wsdl/AnalyticsEngineBinding" xmlns:tan="http://www.onvif.org/ver20/analytics/wsdl" xmlns:ns5="http://www.onvif.org/ver10/events/wsdl/PullPointSubscriptionBinding" xmlns:ns6="http://www.onvif.org/ver10/events/wsdl/EventBinding" xmlns:ns7="http://www.onvif.org/ver10/events/wsdl/SubscriptionManagerBinding" xmlns:ns8="http://www.onvif.org/ver10/events/wsdl/NotificationProducerBinding" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:ns9="http://www.onvif.org/ver10/events/wsdl/NotificationConsumerBinding" xmlns:tad="http://www.onvif.org/ver10/analyticsdevice/wsdl" xmlns:tds="http://www.onvif.org/ver10/device/wsdl" xmlns:timg="http://www.onvif.org/ver20/imaging/wsdl" xmlns:tls="http://www.onvif.org/ver10/display/wsdl" xmlns:tmd="http://www.onvif.org/ver10/deviceIO/wsdl" xmlns:tptz="http://www.onvif.org/ver20/ptz/wsdl" xmlns:trc="http://www.onvif.org/ver10/recording/wsdl" xmlns:trp="http://www.onvif.org/ver10/replay/wsdl" xmlns:trt="http://www.onvif.org/ver10/media/wsdl" xmlns:trv="http://www.onvif.org/ver10/receiver/wsdl" xmlns:tse="http://www.onvif.org/ver10/search/wsdl" xmlns:ter="http://www.onvif.org/ver10/error" xmlns:tns1="http://www.onvif.org/ver10/topics" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
> 
> <SOAP-ENV:Body>
> 
> <SOAP-ENV:Fault>
> 
> <faultcode>SOAP-ENV:Client</faultcode>
> 
> <faultstring>HTTP GET method not implemented</faultstring>
> 
> </SOAP-ENV:Fault>
> 
> </SOAP-ENV:Body>
> 
> </SOAP-ENV:Envelope>
the error i get when i try to access the reolink cameras