Working doorbell: Hikvision DS-HD1

I thought it would be a good idea to start a dedicated thread for this camera and compile all the info related to using it in openHAB.

The camera is sold under these names (the hardware is identical):
HIKVISION DS-HD1 (has Onvif in its supplied firmware, use the older 200321-2020-03-31 firmware​)
LAVIEW LV-PDB1630-U (has Onvif in its supplied firmware)
NELLY’S NSC-DB2 (has Onvif in its supplied firmware)

If you buy a brand that is not marked as having Onvif, you can install the firmware from one of the ones that do to gain the ONVIF support, but you run the risk of bricking the camera. Details on that and much more is found here:

Pros for the camera:

  • Low purchase price.
  • Cloud is optional, so no ongoing monthly fees to pay after you purchase.
  • Works behind a strict firewall/subnet (after setup is done) with some limitations listed below.
  • Easy to setup.
  • ONVIF motion events are sent which use a PIR sensor to keep false positives low.
  • Night vision that does not sleep, so you can monitor a stream all night long.
  • No batteries and only 2 wires. Can be powered by existing 8 to 24 volt AC or DC transformers. I’m using an old 12volt AC halogen lighting transformer for downlights that electricians throw in the bin every week.

Limitations to be aware of:

  • Snapshot url does not work in the latest firmwares, use Hikvision 200321-2020-03-31 firmware to get working ONVIF and snapshots at http://ip:80/onvif/snapshot
  • Camera is 2K resolution so can not be cast to a Chromecast or Nest Home Hub unless you switch the ULTRA mode off and use the camera in HD mode. Chromecasts that support 4k will probably work with ULTRA turned on.
  • Getting access to the on board uSD card recordings needs the app ( requires giving the camera internet access for the app to work) or a Hikvision utility program may possibly work on your local network. You can use a NVR or openHAB to make the recordings instead.
  • Changing some camera settings require giving the camera and app access to the internet or using a utility program.
  • Mainstream RTSP is limited to only 2 open streams. The IpCamera binding can easily feed 6 tablets all at once for you and only use 1 open stream leaving one spare. The binding can use them all up if you go crazy on using multiple features at the same time or if you use an NVR which will take a stream away.
  • Substream RTSP (lower resolution) is limited to only 1 stream open and can work when the mainstream is in use.
  • No Hikvision API support, so this needs to be setup as ONVIF and will get auto found and setup by the binding.
  • Aspect ratio is 4:3 and is a fish eye lens. May not match with other cameras you own but this can be a feature as it allows you to see a parcel on the ground under the camera.
  • Doorbell button does not get sent as an event. You can use Zwave reed door sensors mounted near a magnetic bell, or a simple relay instead of bell unit can be used to short a door sensor out and inform openHAB. Another solution to detect the button press is found here:

Alternatives to look at if this model does not suit:

  • Dahua AD-110 and the newer AD-410 have the Dahua API included in these doorbells, so will have lots of features that work out of the box with the IpCamera binding.
  • Any Bullet or Dome style camera that has an API from Amcrest, Dahua, Hikvision and Instar as these brands have models that support alarm input terminals that can be wired up to any doorbell button. Their APIs will send the pushes back to openHAB and also can directly trigger recordings even if openHAB is down (redundancy built in).
  • Doorbird make a big range of cameras designed for doorbell and gate access.
  • Dahua VTO2202F-P is a POE doorbell with ONVIF but the night vision only turns on after the button is pushed. You can install external IR floods which has the plus of keeping bugs away from the camera.

Example of how to get this camera working:


Thing ipcamera:onvif:Doorbell "Doorbell" @ "Cameras"
	ipAddress="", password="ABC123", username="admin", serverPort=54321,


Number Doorbell_recordingGif "Update GIF" { channel="ipcamera:onvif:Doorbell:recordingGif" }
String Doorbell_gifHistory "GIF History" { channel="ipcamera:onvif:Doorbell:gifHistory" }
Number Doorbell_gifHistoryLength "GIF History Length" { channel="ipcamera:onvif:Doorbell:gifHistoryLength" }
Number Doorbell_RecordingMP4 "MP4 Record" { channel="ipcamera:onvif:Doorbell:recordingMp4" }
String Doorbell_MP4History "MP4 History" { channel="ipcamera:onvif:Doorbell:mp4History" }
Number Doorbell_MP4HistoryLength "MP4 History Length" { channel="ipcamera:onvif:Doorbell:mp4HistoryLength" }
Dimmer Doorbell_ffmpegMotionControl "Motion Threshold [%d]" { channel="ipcamera:onvif:Doorbell:ffmpegMotionControl" }
Switch Doorbell_ffmpegMotionAlarm "FFmpeg Motion" { channel="ipcamera:onvif:Doorbell:ffmpegMotionAlarm" }
Switch Doorbell_externalMotion "External trigger for Motion" { channel="ipcamera:onvif:Doorbell:externalMotion" }
Switch Doorbell_motionAlarm "Video Motion" { channel="ipcamera:onvif:Doorbell:motionAlarm" }
Switch Doorbell_PIRAlarm "PIR Motion" { channel="ipcamera:onvif:Doorbell:cellMotionAlarm" }
String Doorbell_lastMotionType "Last Motion Type" { channel="ipcamera:onvif:Doorbell:lastMotionType" }
Dimmer Doorbell_audioThreshold "Audio Threshold [%d]" { channel="ipcamera:onvif:Doorbell:thresholdAudioAlarm" }
Switch Doorbell_audioAlarm "Audio Detected" { channel="ipcamera:onvif:Doorbell:audioAlarm" }
Switch Doorbell_startStreamingHLS "Start TestCams HLS" { channel="ipcamera:onvif:Doorbell:startStream" }
String Doorbell_mjpegStreamUrl "Mjpeg Url" { channel="ipcamera:onvif:Doorbell:streamUrl" }
String Doorbell_rtspUrl "RTSP Url" { channel="ipcamera:onvif:Doorbell:rtspUrl" }
String Doorbell_HLS "Front Door" { channel="ipcamera:onvif:Doorbell:hlsUrl", synonyms="door bell, front camera", ga="Camera" [ protocols="hls" ] }


Text label="FrontDoor Camera" icon="camera"{
			Slider item=Doorbell_ffmpegMotionControl
			Switch item=Doorbell_ffmpegMotionAlarm
			Slider item=Doorbell_audioThreshold
			Switch item=Doorbell_audioAlarm
			Switch item=Doorbell_motionAlarm
			Switch item=Doorbell_PIRAlarm
			Text item=Doorbell_lastMotionType			
			Video url="" encoding="mjpeg"
			Text label="Mjpeg Stream" icon="camera"{Video url="" encoding="mjpeg"}
			Text label="HLS Stream" icon="camera"{Webview url="" height=15}


rule "Auto Front Doorbell"
	Item Doorbell_PIRAlarm changed to ON
		//KitchenHomeHubPlayURI.sendCommand("")	//can send jpg whilst GIF is recorded.
        if(Doorbell_RecordingMP4.state == 0 || Doorbell_RecordingMP4.state == NULL){
		var DoorbellMp4TimeStamp = new DateTimeType().format("%1$ty-%1$tm-%1$td_%1$tH-%1$tM-%1$tS").toString
		//may run out of streams if recording to 2 formats and watching unless you use gifPreroll.
        getActions("ipcamera", "ipcamera:onvif:Doorbell").recordGIF("ipcamera",5)
		getActions("ipcamera", "ipcamera:onvif:Doorbell").recordMP4(DoorbellMp4TimeStamp,5)
			sendBroadcastNotification("Someone is at the door and baby is alseep.")
		}   else{

rule "Send doorbell GIF to HomeHub and Pushover"
	Item Doorbell_recordingGif changed to 0
	sendPushoverMessage(pushoverBuilder("GIF from Doorbell").withApiKey("xxxxxxxxxx").withUser("xxxxxxxxxxx").withDevice("MattPhone").withAttachment("/etc/openhab2/html/Doorbell/ipcamera.gif"))

Advanced options worth looking at:

gifOutOptions="-r 2 -filter_complex crop=iw:0.44*ih:0:1/3*ih,scale=-2:360:flags=lanczos,setpts=0.5*PTS,split[o1][o2];[o1]palettegen[p];[o2]fifo[o3];[o3][p]paletteuse"
  • If you get false positives from the PIR or perhaps have a cat that sets it off during the night, you may like to play with the CROP to create a Line crossing style alarm. Use the motionOptions in the thing file and enter a Crop that allows FFmpeg to look for motion in a much smaller area, or in a narrow rectangle. You can also use this to block out trees that move or people that walk past on a footpath. I’m guessing the syntax would be the following, so if you get it working please post what you found was good and also how much CPU it uses to have that running.
motionOptions="-vf crop=iw:0.44*ih:0:1/3*ih"

Mouting bracket created that you can 3d print if the supplied ones don’t suit.


Great post, thanks! You might wanna obfuscate your pushover credentials.

What kind of hub client are you using which supports push notifications via standard URL?

The google/nest hub is what I use and you just install the chromecast binding. The playUri channel is hidden until you click show more if you did not know you can cast a simple URL.
The result with a home hub is that the last visitor is left displaying on the screen with movement.

By doing this you can fully block the camera from the outside world and it keeps working, minus 2 way audio or recording access. For those two you need the app which has no monthly fees if you install a micro Sd card.

1 Like

Working on echo show (native):
One way audio only
Image is not Ultra HD so looks like it uses the sub stream
As per all cameras (skill or monocule) - stream is about 10 seconds behind

Not working on echo (native):
2 way audio
Motion alerts

I don’t really use the echo for the cams though due to the time delay. Motion alerts will be set up through openhab with TTS to them.

I see there are two channels (PIR and Motion), does the PIR only get generated on button push…
I see someone from here on ipcamtalk had used a homematic to transform the door bell signal. What sort of signal does the doorbell output to chimes - thinking I may be able to use a cheap Shelly one or something if there’s a good 12v there connected to the chime output. (I don’t have a chime indoors we just use our phones)

As a note, I didn’t have a doorbell originally so until I run the cables through I powered the doorbell off a 9v battery which worked fine without a chime

@matt thanks for continuing to add features and support to the Hikvision/EZVIZ doorbell camera. I have installed the 7-18 update and all seems to be working well as far as video motion detection. I am having some issues with using AudioAlarm however.

It seems any setting other than 100% for the AudioThreshold causes the channel to die/no response. I have both a switch and dimmer linked to AudioThreshold. The switch to enable and disable works without issue, but if I change the threshold setting below 100% the channel dies and can’t be brought back without an OH restart and setting the Threshold to 100%. I noticed in your example items, that you are only using the dimmer no switch on AudioThrehold channel so I unlinked the switch and restarted, but the issue is still present. Any ideas what might be causing this? @delid4ve, @bgilmer Any other users experience something similar?

1 Like

Motion is video motion detection. PIR is the onboard hardware motion sensor.

As far as anyone can tell, the ONVIF data does not send any events for doorbell push.

The doorbell itself creates a dead short (voltage drop to 0V) on the power wires if the button is pushed when set to mechanical mode. You can also use this to trigger a relay and send a doorbell pushed event.

Cleaning your cache as you have been jumping versions a lot and with all the config and channel changes that is probably the issue. I tested it only a few days ago and it works for me.

@matt1, Thanks for the reply. I thought the same thing so I shutdown OH, and deleted the cache and tmp folders. I am running OH in a docker so I even reinstalled OH. No change. Next I removed the Doorbell Camera Thing, shutdown OH and as before removed the cache and tmp folders. Restarted OH and recreated the “ONVIF Doorbell Camera Thing”. Reconnected items with channels, restarted once again, but no change in behavior. To have any changes in Audio Threshold take hold, I have to make the changes and then restart OH. I am using paper to configure the DoorbellCamera Thing, but at this stage I wouldn’t think it makes a difference as to whether I use paper or item files to link channels. Everything else seems to be working as intended. I will keep playing but if something occurs to you that I maybe missing, please flag it for me. If I end up solving this issue I will also post here and let you know. Thanks.

Do you use a thing file? If no then delete and readd the camera. I recommend a thing file is used then everything else can be done with paper ui. Once this gets merged and stops changing it will get easier.

EDIT: I see u already did delete and re-add…

Are you changing the motion and audio controls very closely together or using persistence on them? They both use the same ffmpeg instance so try making sure you change them at least 10 seconds apart, does that solve the issue?

They both use the same ffmpeg instance

I thought this might be the case and your statement led me to the solution. I was manually adding an FFMpeg Motion Input as rtsp:// As soon as I deleted that rtsp URL the AudioThreshold began to work properly. I’m not sure why that caused problem as it was the correct URL, but it apparently was root cause of my issue. Thanks for your help.

The camera has the audio disabled by default until you enable it in the camera app. Potentially the sub stream has not had the audio turned on, worth looking at the trace logs to see if what ffmpeg is saying as that would confirm or give clues.

The camera has the audio disabled by default until you enable it in the camera app.

Correct. I have the audio enabled and the AudioAlarm actually worked fine as long as I didn’t try to change the Threshold setting. If I did change it I would need to restart OH for the new setting to take. Otherwise the channel would just go dead. I will enable trace, add back the rtsp url and see what I can find.

I assume the doorbell needs the ONVIF firmware for this to work, correct? If so, I suggest referencing the “Hikvision Doorbell 101” from For many months now, David L over there has been doing a great job trying to maintain an updated list of which firmware versions support ONVIF along with instructions on which hardware models can use which firmwares.

@matt1 This topic is very helpful. Appreciate you putting it together. I have two of these doorbells, so I will certainly be giving this a try. Thanks again!

1 Like

Yes it needs any of the ONVIF firmwares. I have added the link and also some new info that I have been playing with…
Bottom of first post under the heading…
Advanced options worth looking at:

@matt1 I had few minutes this morning to take a look at the TRACE log of the binding when using FFMpeg_Motion_Input, but I wasn’t able to see any obvious issues or errors. It was basically a few GET and PUT commands and SOAP that just repeated . A snippet is shown here in case you make something of it. Perhaps is has something to do with running inside a docker on a server. For now I have things working fine without the need for specifying FFMpeg_Motion_Input, so I’m good, but if I can be assistance to help pin this down should others have a similar problem I am happy to help out. Thanks once again for all of your efforts. Monumental.

2020-07-20 08:17:05.307 [DEBUG] [nding.ipcamera.onvif.OnvifConnection] - Sending ONVIF request:PullMessages
2020-07-20 08:17:06.991 [DEBUG] [pcamera.internal.StreamServerHandler] - Stream Server recieved request 	GET:/ipcamera.jpg?_t=2020-07-20T12:17:06.632Z
2020-07-20 08:17:06.995 [TRACE] [ing.ipcamera.handler.IpCameraHandler] - Sending camera: GET:
2020-07-20 08:17:07.530 [DEBUG] [pcamera.internal.StreamServerHandler] - Stream Server recieved request 	GET:/ipcamera.jpg?_t=2020-07-20T12:17:07.300Z
2020-07-20 08:17:07.533 [TRACE] [ing.ipcamera.handler.IpCameraHandler] - Sending camera: GET:
2020-07-20 08:17:09.210 [TRACE] [ing.ipcamera.handler.IpCameraHandler] - Sending camera: GET:
2020-07-20 08:17:13.044 [TRACE] [nding.ipcamera.onvif.OnvifConnection] - Onvif reply is:<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="" xmlns:soapenc="" xmlns:xsi="" xmlns:xs="" xmlns:tt="" xmlns:tds="" xmlns:trt="" xmlns:timg="" xmlns:tev="" xmlns:tptz="" xmlns:tan="" xmlns:tst="" xmlns:ter="" xmlns:dn="" xmlns:tns1="" xmlns:tmd="" xmlns:wsdl="" xmlns:wsoap12="" xmlns:http="" xmlns:d="" xmlns:wsadis="" xmlns:xop="" xmlns:wsnt="" xmlns:wsa="" xmlns:wstop="" xmlns:wsrf-bf="" xmlns:wsntw="" xmlns:wsrf-rw="" xmlns:wsaw="" xmlns:wsrf-r="" xmlns:trc="" xmlns:tse="" xmlns:trp="" xmlns:tnsn=""><env:Header><wsa:Action></wsa:Action>

2020-07-20 08:17:13.045 [DEBUG] [nding.ipcamera.onvif.OnvifConnection] - Onvif Event Topic:, Data:, Value:
2020-07-20 08:17:13.045 [DEBUG] [nding.ipcamera.onvif.OnvifConnection] - Sending ONVIF request:Renew
2020-07-20 08:17:13.056 [TRACE] [nding.ipcamera.onvif.OnvifConnection] - Onvif reply is:<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="" xmlns:soapenc="" xmlns:xsi="" xmlns:xs="" xmlns:tt="" xmlns:tds="" xmlns:trt="" xmlns:timg="" xmlns:tev="" xmlns:tptz="" xmlns:tan="" xmlns:tst="" xmlns:ter="" xmlns:dn="" xmlns:tns1="" xmlns:tmd="" xmlns:wsdl="" xmlns:wsoap12="" xmlns:http="" xmlns:d="" xmlns:wsadis="" xmlns:xop="" xmlns:wsnt="" xmlns:wsa="" xmlns:wstop="" xmlns:wsrf-bf="" xmlns:wsntw="" xmlns:wsrf-rw="" xmlns:wsaw="" xmlns:wsrf-r="" xmlns:trc="" xmlns:tse="" xmlns:trp="" xmlns:tnsn=""><env:Header><wsa:Action></wsa:Action>

2020-07-20 08:17:13.057 [DEBUG] [nding.ipcamera.onvif.OnvifConnection] - Onvif Event Topic:, Data:, Value:
2020-07-20 08:17:13.057 [DEBUG] [nding.ipcamera.onvif.OnvifConnection] - Sending ONVIF request:Renew
2020-07-20 08:17:13.064 [TRACE] [nding.ipcamera.onvif.OnvifConnection] - Onvif reply is:<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="" xmlns:soapenc="" xmlns:xsi="" xmlns:xs="" xmlns:tt="" xmlns:tds="" xmlns:trt="" xmlns:timg="" xmlns:tev="" xmlns:tptz="" xmlns:tan="" xmlns:tst="" xmlns:ter="" xmlns:dn="" xmlns:tns1="" xmlns:tmd="" xmlns:wsdl="" xmlns:wsoap12="" xmlns:http="" xmlns:d="" xmlns:wsadis="" xmlns:xop="" xmlns:wsnt="" xmlns:wsa="" xmlns:wstop="" xmlns:wsrf-bf="" xmlns:wsntw="" xmlns:wsrf-rw="" xmlns:wsaw="" xmlns:wsrf-r="" xmlns:trc="" xmlns:tse="" xmlns:trp="" xmlns:tnsn=""><env:Header><wsa:Action></wsa:Action>

Hi @John_Siemon. I am running the EZViz with HikVision FW on straight-up OH2 on a Ubuntu 18.04 server. If you will post your .things, .items and .rules files I will load them up here to see if the issue is the docker container or something else.

@bgilmer What I found is that the issue arises when I have a sub stream specified in DoorBellCamera Thing for “FFMpeg_Motion_Input”. If I don’t use the sub stream and FFMpeg_Motion_Input is left blank, everything works as expected. When using FFMpeg_Motion_Input subbstream, I can change threshold values and they appear to take, but the AudioAlarm channel dies. However FFmpeg Motion Alarms continue to work fine. If I restart OH, then everything including the AudioAlarm works again with the new setting. My DoorbellCamera is still a Work-in-Progress, but is working well without using the sub channel. I have manually created the Doorbell Camera Thing using PaperUI, not a .thing file. Using the ipcamera binding I selected “ONVIF Generic Camera…” and added the username,PW, Port, etc. Again all working/Online, no issue. I do a text based .items and .rules, but they are very simple and I use PaperUI to link .items to Doorbell Camera channels. In the case of FFMpegThreshold and AudioThreshold I have linked both a Dimmer and Switch. All of the video motion alarms are part of the gDoorbellSensors Group. The AudioAlarm remains separate for now. I use a 3 second refresh for ipcamera.jpg that I post to my HABPanel/sitemap. I think at this stage it is all pretty standard/unremarkable, but if you see anything that needs to be changed please flag it for me.

The only other thought I have had is to try using all all text based configurations (Thing,Item, Channels, etc) to determine if there may be something odd going on with PaperUI. Not out of the question, but low probability.

For the sub stream I use rtsp://EZVIZ IP:554/Streaming/Channels/102


Switch vHTTPONLYGenericIPCameraWithOnlyHTTPSupport_UpdateTheImage  (Group_HabPanel_Dashboard)
Image vHTTPONLYGenericIPCameraWithOnlyHTTPSupport_SnapshotFromCamera  (Group_HabPanel_Dashboard)
String vONVIFGenericIPCameraWithONVIFSupport_ImageURL  (Group_HabPanel_Dashboard)

Switch vFFmpegCamEnableMotion "FFmpeg MotionAlarm on/off" (gDoorbell,Group_HabPanel_Dashboard)
Dimmer vFFmpegMotionThreshold "FFmpegMotion Detection Threshold" (gDoorbell,Group_HabPanel_Dashboard)
Switch vCamEnableAudioAlarm "Enable AudioAlarm on/off" (gDoorbell,Group_HabPanel_Dashboard)
Dimmer vCamAudioThreshold "Audio Threshold" (gDoorbell,Group_HabPanel_Dashboard)
Switch vCamPIR "PIR Triggered- Someone Approaching" (gDoorbellSensors)  
Switch vCamMotionAlarm "MotionAlarm Triggered - Someone Approaching" (gDoorbellSensors) 
Switch vCamAudioAlarm "AudioAlarm Triggered- Someone Approaching" (gDoorbell) //(gDoorbellSensors)  
Switch vCamFFMpegAlarm "FFMPEGAlarm Triggered- Someone Approaching" (gDoorbellSensors)  

Switch vVisitorApproachingAlarm "Visitor Approaching" { expire="5s,command=OFF" }
String vLastMotionType "Last Motion Detected [%s]" (gDoorbell)
String vRTSP "RTSP URL" (gDoorbell)


rule "React to Doorbell Audio Trigger "

    Item gDoorbellSensors changed to ON or 
    Item vCamAudioAlarm changed to ON
    //Item vCamAudioAlarm changed to ON or
    //Item vCamPIR changed to ON //or
    //Item vCamMotionAlarm changed to ON
    //Item vCamFFMpegAlarm changed to ON

	sendNotification("”, "Visitor is Approaching")


sitemap ipcamera label="Doorbell Camera" 
Frame {
        Text label="Doorbell Camera " icon="camera" {Image url="" refresh=3000}


Frame {
        Text item=gDoorbellSensors  label="Visitor Approaching [MAP(]" icon=siren valuecolor=[==OFF="green",==ON="red"]
        Text item=vCamAudioAlarm label="Audio Alarm - Front Porch [MAP(]"  icon=siren valuecolor=[==OFF="green",==ON="red"]      
        //Text item=vVisitorApproachingAlarm  label="Visitor Approaching [MAP(]" icon=siren valuecolor=[==OFF="green",==ON="red"]
        Text item=vLastMotionType label="Last Motion Detected [%s]"
        Text label="Advanced Controls" icon="settings"
        Switch item=vFFmpegCamEnableMotion label="FFmpeg MotionAlarm on/off" 
        Slider item=vFFmpegMotionThreshold label="FFmpeg Motion Detection Threshold [%d]" icon="heating"
        Switch item=vCamEnableAudioAlarm label="Enable AudioAlarm on/off" 
        Slider item=vCamAudioThreshold label="Audio Sensitivity Threshold [%d]"  icon="heating"