Skip to content

Instantly share code, notes, and snippets.

@martijndierckx
Created May 30, 2023 07:47
Show Gist options
  • Save martijndierckx/8b0df1efd9531b1c65f35d7b4ea580bb to your computer and use it in GitHub Desktop.
Save martijndierckx/8b0df1efd9531b1c65f35d7b4ea580bb to your computer and use it in GitHub Desktop.
How to setup an IMOU DB61i Doorbell in order to get access to the RTSP streams and configuration API endpoints.

How to 'properly' configure an IMOU DB61i Doorbell

I had been looking for a doorbell which offers local RTSP streams for a very long time. Armcrest offered just that in its AD410 model since a couple of years. Only problem ... it was not available in Europe.

But a couple of weeks ago my eye caught the DB61i model of IMOU, which apparently shares the same internals as the Armcrest AD410 and the Dahua DH-DB6I, and which is pretty cheaply available in Europe. 🥳🚀

Using the provided IMOU Life app I wasn't able to get the configurability I craved. But since they shared the same internals, I figured maybe ... just maybe ... I could use the Dahua DMSS app (all apps are also clones).

Eureka! The DMSS app works flawlessly!
The Dahua app has one big difference in the device configuration flow: It allows you to set the device password. Which allows you to access the RTSP streams and allows some configuration.

Device configuration

The configuration endpoints are pretty well documented. Search for 'DAHUA_IPC_HTTP_API_V1.00x' and you'll find a PDF describing most of them.

All of the endpoints are available trough HTTP GET and need basic authentication: http://admin:PASSWORD@IP-ADDRESS. The username is admin. The password is what you have setup in the DMSS app when configuring your device.

Append any of the following paths, and you'll see the magic happen 🦄:

  • Switch between h264 and h265 (note the correct notation in the URL)

    /cgi-bin/configManager.cgi?action=setConfig&Encode[0].MainFormat[0].Video.Compression=H.264
    
  • Remove timestamp from video (needs to be redone every time the device reboots)

    /cgi-bin/configManager.cgi?action=setConfig&VideoWidget[0].TimeTitle.EncodeBlend=false
    
  • Remove logo from video (=permanent)

    /cgi-bin/configManager.cgi?action=setConfig&VideoWidget[0].PictureTitle.EncodeBlend=false
    
  • Disable local audio recording to have 2 way audio working

    /cgi-bin/configManager.cgi?action=setConfig&Record[0].SaveAudio=false
    
  • Disable cloud connection

    /cgi-bin/configManager.cgi?action=setConfig&T2UServer.Enable=false
    /cgi-bin/configManager.cgi?action=setConfig&VSP_PaaS.Enable=false
    /cgi-bin/configManager.cgi?action=setConfig&VSP_PaaS.CustomEnable=false
    
  • Make the device think it's online, so it doesn't flash red (needs to repeated often. f.e. every 5 mins)

    /cgi-bin/configManager.cgi?action=setConfig&VSP_PaaS.Online=true
    
  • Disable NTP

    /cgi-bin/configManager.cgi?action=setConfig&NTP.Enable=false
    
  • Change NTP Period (it does NTP very often by default)

    /cgi-bin/configManager.cgi?action=setConfig&NTP.UpdatePeriod=360
    

I'm still looking for the endpoints to change the ring volume and sound. Tips are welcome 😘

Adding a non-admin user

While the configuration endpoints are available, the 'user' group is not created on the device and it doesn't seem possible to create it. Meaning you cannot create a user with limited rights.

/cgi-bin/userManager.cgi?action=addUser&user.Name=rtsp&user.Password=rtsp&user.Memo=rtsp&user.Group=user&user.Reserved=false&user.Sharable=true

Controlling the light

Can be done in the same way, and needs the same authentication.

  • Turn on

    /cgi-bin/configManager.cgi?action=setConfig&Lighting_V2[0][0][1].Mode=ForceOn&Lighting_V2[0][0][1].State=On
    
  • Flicker

    /cgi-bin/configManager.cgi?action=setConfig&Lighting_V2[0][0][1].Mode=ForceOn&Lighting_V2[0][0][1].State=Flicker
    
  • Turn off

    /cgi-bin/configManager.cgi?action=setConfig&Lighting_V2[0][0][1].Mode=Off
    

RTSP Streams:

The device offers 2 streams, which also need the same basic authentication:

  • 2560x1920 15fps:

    rtsp://admin:PASSWORD@IP-ADDRESS:554/cam/realmonitor?channel=1&subtype=0#backchannel=0
    
  • 720x576 15fps:

    rtsp://admin:PASSWORD@IP-ADDRESS:554/cam/realmonitor?channel=1&subtype=1#backchannel=0
    

Make sure you add #backchannel=0 to the end of the URL. This disables the 2-way audio on the stream. If you don't, the device will think there's an ongoing conversation and the doorbell button won't work.

Homekit Secure Video

You can use Scrypted and the Dahua doorbell plugin to get HKSV up and running seamlessly including 2-way audio. Just make sure you configure the main stream of the device as h264 (see above).

Node-RED

You can capture the ONVIF events (including doorbell button presses) in Node-RED using Bart Butenaers' plugin (requires manual install).

Go2RTC

As a bonus: I use go2rtc to proxy the streams from my cameras to the different consumers. Requesting too many concurrent streams might make your camera hickup.

@fotis3d
Copy link

fotis3d commented Jun 16, 2024

Thanks for the URLs. That's cool because the Dahua ConfigTool (at least the version I have) doesn't support these cameras. Just checking if anyone else using db61i has run into this. I've been unable to access ONVIF streams randomly on 4 DB61i's since March. No system updates. They all just suddenly stopped working. I haven't tried factory resetting any of them. Has anyone else run into this?

What happens to me regularly lately is losing the ONVIF access because the Doorbell changes the time byitself. In order for me to work I set the timezone manually and disable the DST on the cameras settings. But sometimes the doorbell set the DST to "on" changes the time and therefore I lose it from onvif. I have to go in the settings disable the DST restart the device in order to be able to re-link it in Home Assistant that I use.

I have contacted Imou about that but to no avail. I am trying to figure out is this is caused by Home Assistant but I doubt.

@ManiacDC
Copy link

Thanks for the URLs. That's cool because the Dahua ConfigTool (at least the version I have) doesn't support these cameras. Just checking if anyone else using db61i has run into this. I've been unable to access ONVIF streams randomly on 4 DB61i's since March. No system updates. They all just suddenly stopped working. I haven't tried factory resetting any of them. Has anyone else run into this?

What happens to me regularly lately is losing the ONVIF access because the Doorbell changes the time byitself. In order for me to work I set the timezone manually and disable the DST on the cameras settings. But sometimes the doorbell set the DST to "on" changes the time and therefore I lose it from onvif. I have to go in the settings disable the DST restart the device in order to be able to re-link it in Home Assistant that I use.

I have contacted Imou about that but to no avail. I am trying to figure out is this is caused by Home Assistant but I doubt.

Oh my gosh, that was it! Thanks so much. It's not home assistant, I'm using AgentDVR. What happens is the ONVIF pages literally stop responding, they don't even work in a web browser. I turned off DST and it started working again.

Thanks to this post I had realized I could just use the rtsp streams directly (not sure why I never thought of it before). If I find DST keeps turning on like you did, I'll switch back to using that - but for now, I'm back to ONVIF.

@fotis3d
Copy link

fotis3d commented Jun 16, 2024

@ManiacDC I also use Agent DVR with onvif. And yes it stops there too Since onvif needs the correct time.

But overall I have noticed that this happens when I basically restart Home Assistant after a possible update of an intergration. Then the doorbell enables the DST and I lose it from Agent DVR and of course I lose the sensor of the button when pressed in Home Assistant. BUT RTSP never stops.

Either way because I have 5 more IMOU cameras and only the doorbell is connected in HA via onvif, in order to get the sensor when someone presses the button, I think the problem lies with HA but I am still looking into it because this never happens with my other cameras.

@ManiacDC
Copy link

@fotis3d good to know, thanks. I have other IMOU cameras too, I don't lose the ONVIF from them. The firmware in the db61i is different from those though, and it handles DST differently.

@fotis3d
Copy link

fotis3d commented Jun 16, 2024

@ManiacDC I have told Imou about this . Because in general when I enable the DST the time is wrong whatever country I choose of the same UTC . But if you have 4 of the same model and this happens to you on all of them maybe you should also let them know. Do you use Home Assistant and have them also intergrated in it ?

@ManiacDC
Copy link

@fotis3d I do not use Home Assistant. After discussing this with you, I did use feedback for the camera in the Imou app to report the issue with ONVIF not working when DST is enabled.

@grubia
Copy link

grubia commented Jul 31, 2024

I've managed to change the ring volume, but unfortunately the setting also lowers the voice volume. Instead I've disabled it completely by changing the filename of the ding_dong file.

Get full config backup with all camera settings in human readable txt format:

/cgi cgi-bin/Config.backup?action=All

Get current talkphone settings:

/cgi-bin/configManager.cgi?action=getConfig&name=VideoTalkPhoneGeneral

Output should be:

table.VideoTalkPhoneGeneral.RingFile=Ding_dong1.mp3
table.VideoTalkPhoneGeneral.RingVolume=100
table.VideoTalkPhoneGeneral.TalkVolume=100

Lowering Ding_Dong and talk volume:

/cgi-bin/configManager.cgi?action=setConfig&VideoTalkPhoneGeneral.TalkVolume=20

Disabling Ding_dong without lowering the volume(changing the name of the local file played on camera):

/cgi-bin/configManager.cgi?action=setConfig&VideoTalkPhoneGeneral.RingFile=Ding_dong1.mp4

Unfortunately VideoTalkPhoneGeneral.RingVolume does not do anything meaningful in my case.

@martijndierckx Please update the post, so we can spare others hours of reading through API documentation and config backups.

@fotis3d
Copy link

fotis3d commented Jul 31, 2024

@grubia nice. thanks :)
I still struggle with Home Assistant. Somehow the doorbell sometimes changes the timezone byitself when connected via onvif, therefore it stops working via onvif. And that is the only way I can get the signal when the button is pressed in order to get notification and run automations.

@toralux
Copy link

toralux commented Oct 25, 2024

If I want to use the Dahua DMSS app instead of the IMOU Life app, do I have to revert all my cameras to factory defaults and rea-dd them to Dahua DMSS app for them to appear in that app? Could I use both apps at the same time or I will have to choose which one?

@ManiacDC
Copy link

@toralux I haven't tried DMSS, but I've used the SmartPSS and IMOU Life apps simultaneously.

@fotis3d
Copy link

fotis3d commented Oct 26, 2024

@toralux I think once I was using both of them. Though I did not find any usage in DMSS intstead of Imou Life.

@dtczest
Copy link

dtczest commented Oct 31, 2024

@toralux I tried this today. I was not able to use DMSS and IMOU life apps at the same time because the cameras are tied to my Imou account and won't allow me to use them on the Dahua DMSS account (even though the email is the same).

@toralux
Copy link

toralux commented Nov 9, 2024

I think was able to find the password in the IMOU Life app, so I think I didn't need to register the doorbell i the DMSS app anyway. Thanks for all comments!

@jaccovw5
Copy link

jaccovw5 commented Feb 2, 2025

thank you very much for this info! It helps me a lot. Buy different doorbells. And still keep this doorbell to use for later. Now i install it back with the new settings and now i'm loving it! Finally iam done.

Bedankt Martijn!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment