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.

@bartwell
Copy link

Hello,

Excellent article, thanks!
I was looking for a way to connect my Imou DB61i but can't find secret code. In my case I've found it just in Imou application / two dots button / About device / Device picture on the top of screen / QR. Password placed under QR code.

@martijndierckx
Copy link
Author

@bartwell thanks for the feedback! Glad to see imou exposed the device password as well …

@fotis3d
Copy link

fotis3d commented Feb 11, 2024

Very good. For so much time I had trouble getting good stream because of the H265.
Getting it to stream H264 is wayyyyy faster at last.

Thanks a lot

Though I noticed one thing. When I use go2rtc and webrtc I lose the button of the doorbell. The physical button I mean does not ring the bell.

When I disable the go2rtc and only use webrtc it works fine.

Has anyone noticed anything similar ?

@martijndierckx
Copy link
Author

Make sure you add #backchannel=0 to the end of the URL.

@fotis3d
Copy link

fotis3d commented Feb 11, 2024

Make sure you add #backchannel=0 to the end of the URL.

Oh my god. You are right. And you did mention that. THANK YOU SO MUCH for this. you made my day. :)

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