Support for Security Camera System via NVR - ESeeCloud/dvr163

@pgross @wes93

Thank you both for notifying me about this add-on and for confirming it works! I won’t have time to try it out until the weekend but I can’t wait! I’ve been waiting for this for many years and I’m excited that the functionality finally exists!

@AlexxIT - I know I’m probably just getting greedy now - but is there any way we can also catch and trigger off of motion detection events that the NVR generates? Great work on this add-on and thanks very much for sharing it!

I finally got around to troubleshooting my dvr163 add-on and found it’s still able to capture motion events.

Here is the repository: GitHub - pgross41/hassio-addons: Home Assistant Add-on for interacting with Eseenet/dvr163 NVR and instructions. The add-on will listen on port 25 for email messages from the NVR and allow you to send the data to a script. Here is example config:
image
(it looks like the Dropbox integration is also still working in case you want to store the snapshots)

Here is the script I’m using to “receive” the emails but you can of course customize it to use those provided template values however you want.

alias: Motion detected notifications
sequence:
  - service: shell_command.snapshot_to_disk
    continue_on_error: true
    data_template:
      image_data: "{{image_data}}"
      channel_number: "{{channel_number}}"
  - service: script.notify_phone_cam_motion
    data_template:
      channel_number: "{{channel_number}}"
      file_name: "{{file_name}}"
      message: "{{message}}"
      timestamp: "{{timestamp}}"

Here’s my snapshot_to_disk script that writes the image to a jpg file:

shell_command: 
  snapshot_to_disk: /bin/bash -c "echo '{{ image_data }}' | base64 -d > www/images/snapshot_cam_{{ channel_number }}.jpg"

and lastly, the script to notify my phone (which requires the jpg be written out via snapshot_to_disk above)

alias: Notify Patrick Phone cam
sequence:
  - service: notify.notify_phone_cam_motion
    data:
      title: "{{message}}"
      message: "{{timestamp}}"
      data:
        image: >-
          https://my_public_host.com/local/images/snapshot_cam_{{channel_number}}.jpg?{{now().strftime("%s")}}.jpg
        clickAction: >-
          https://www.dropbox.com/home/Apps/DVR163/ch{{channel_number}}?file={{file_name}}.jpg
        sticky: false
        channel: Motion cam {{channel_number}}
        priority: high
        ttl: 0
1 Like

Hi @Wes93,

I hope you can help me too. I have tried the configs you have suggested but nothing seems to work and I have no idea what am I doing wrong.

This is my config:

streams:
  camera.doorbell: rtsp://admin:[email protected]:554/h264Preview_01_main
  camera.e1pro: rtsp://admin:[email protected]:554/h264Preview_01_main 
  camera.printer1: http://192.168.68.149:8080/?action=stream
  camera.printer2: http://192.168.68.149:8081/?action=stream#rotate=90
  camera.yeskamo: bubble://admin:[email protected]:10000/bubble/live?ch=0&stream=0


NVR:
  bubble://admin:[email protected]:10000/bubble/live?ch=0&stream=0
    
Cameras:
  bubble://admin:[email protected]:10000/bubble/live?ch=0&stream=0
  
  
log:
  level: info  # default level
  api: trace
  exec: debug
  ngrok: info
  rtsp: warn
  streams: error
  webrtc: fatal

As you can see only the “camera.yeskamo” acutally appears.
image

When I click on “stream” on “camera.yeskamo” I get:

IP, port, username and password all appear to be correct as I used them to set up the windows CMS app that YESKAMO (the manufacturer) provides

and it those details work (I am only showing one stream for privacy but all 4 work):

Hello,
is normal that you can’t see the other cameras because they stay in a wrong place, this is the correct config file:

streams:
  camera.doorbell: rtsp://admin:[email protected]:554/h264Preview_01_main
  camera.e1pro: rtsp://admin:[email protected]:554/h264Preview_01_main 
  camera.printer1: http://192.168.68.149:8080/?action=stream
  camera.printer2: http://192.168.68.149:8081/?action=stream#rotate=90
  camera.yeskamo: bubble://admin:[email protected]:80/bubble/live?ch=0&stream=0
  nvr: bubble://admin:PASS@NVRIP:80/bubble/live?ch=0&stream=0
  camdirect: bubble://admin:PASS@CAMERAIP:80/bubble/live?ch=0&stream=0
  
log:
  level: info  # default level
  api: trace
  exec: debug
  ngrok: info
  rtsp: warn
  streams: error
  webrtc: fatal

IMPORTANT!!! You should use port 80 and not 10000, port 10000 is only for CMS!!!
Tell me if works now :smiley:, i’m pretty sure that works :smiley:

Hi @Wes93

first of all I really appreciate your reply!!

Ok so I misinterpreted your post. So with as per your suggestion I have this :
image

With port 80 I get:
image

I see that port 80 appears in:

When I scanned with NMAP I saw port 80 and 10000 appear for the NVR IP and when I used the vendor’s software as I said with port 10000 it worked there which is why I assumed it is the correct port.

Any other ideas? :worried:

What is the software version of your NVR?
Could you send me a photo with the configured channels in NVR?

Hi @Wes93,

I just came home and got some photos from the NVR which I hope will help:




I can see on the first image that the cameras are using port 80 to connect to the NVR. :man_shrugging:

Hello Again, from what i can see everything seems correct.

  1. You can’t access the camera fede directly because they are in an NVR subnet.

  2. For access using the NVR could you please sniff the eseecloud CMS on Windows using wireshark? (You should see the URL when the CMS start the stream of one camera)

P.S. Before the wireshark sniff could you try with this URL in go2rtc?

bubble://admin:PASS@CAMERAIP:80/bubble/live?ch=1&stream=0

Best regards
Stefano

Hello Stefano!

camera.yeskamo: bubble://admin:[email protected]:80/bubble/live?ch=1&stream=0

throws the following error

image

I will definitely try the wireshark sniff route. Never used before so a new thing to try.
Thank you so much for your fast responses so far. Really appreciate your kind help!

Keep me update when you have found the URL link so se can update the documentation

1 Like

Hello again!

Now that I fiddled with Wireshark I guess I need some guidance as per what am I looking for.

I have filtered for the traffic only between my laptop and the NVR when starting the stream via the CMS software. Here are the results:

Do you want me to focus on any particular protocol?
I imagined the HTTP “GET” would be of some importance so this is what was captured:

GET /index.html?key=25426&version=2&timeout=60&TEST=true HTTP/1.1
Connection: Upgrade
Host: kp2p.dvr163.com
Origin: null
Sec-WebSocket-Extensions: x-webkit-deflate-frame
Sec-WebSocket-Key: "hidden hex key"
Sec-WebSocket-Version: 13
Upgrade: websocket
clientid: 25426

HTTP/1.1 101 Switching Protocols
Upgrade: websocket
Connection: Upgrade
Sec-WebSocket-Accept: "hidden hex key"

Do you believe “80” is still the correct port?

One thing I found very peculiar is that I see no traffic from Home Assistant to the NVR when I press the “stream” button in go2rtc.

When you start the stream of cameras from CMS could you dump the connections so we can compare the differences between one camera to another?

Also could you filted by Port 80?

Could you guide on the steps I should follow?

I have applied the following filter:

(ip.src == 192.168.68.154 or ip.src == 192.168.68.148) and ( ip.dst == 192.168.68.148 or  ip.dst == 192.168.68.154) and tcp.port == 80

where

  • the NVR is 192.168.68.148
  • the laptop is 192.168.68.154

Adding tcp.port filter:

  • tcp.port == 80 the log is empty
  • tcp.port == 10000 the log screenshot is below

By dump I hope you are referring to the *.pcapng file. Right? How can I share the dump with you?

Hello James!

How did you get the streams pulled up in VLC?
Also, maybe more importantly where did you get the latest firmware from?

I have the same NVR unit

image

Thanks!
Ilias

I had to reach out to OOSSXX, who made my NVR system to get the up to date firmware. Once you have it, you need to turn on the RTSP function in the firmware so you can access the streams with VLC.

You can pull up the main stream with rtsp://admin@(NVR IP Address):80/ch0_0.264 and the sub stream is rtsp://admin@(NVR IP Address):80/ch0_1.264. You just have to change the channel number for each camera, ch0=camera one, ch1=camera 2, etc.

I see. Should I had the RTSP option already I would not need any other method as I am currently pursuing the go2rtc way.

I wonder if the how different the OOSSXX firmware is to YESKAMO who made my NVR. My bet is they are the same thing rebranded.

Many thanks for your reply!

I will try to contact YESKAMO…
Not sure why they don’t simply publish the fw somewhere as many other companies do.

Kind regards!
Ilias


This is what my NVR looks like

My NVR looks totally different, but I have no doubt it’s the same guts. You may or may not have the RTSP option somewhere in the options already, but I know I didn’t with the stock firmware. You’d have to dig around in the menus.

Hello

may I ask what brand your NVR is? I have a YESKAMO NVR with a 2019 firmware as well.
My UI looks identical to the screenshot you posted minus the RTSP server option.

I didn’t send a query to YESKAMO customer support today hoping they will enlighten me but in the meanwhile thought to ask around.

The link that *.rom that you shared is that brand specific?

When you flashed the new firmware did you need to reconfigure the NVR? I.e. re-link the cameras etc?

Yeah. I have looked through them all. No such option for sure.
There is another comment claiming that he got the option after an fw update so I will ask that person the same question.

By the way hen you flashed the new firmware did you need to reconfigure the NVR? I.e. re-link the cameras etc?

Nope, no reconfiguration required after the update.

Honestly, I’d just send Yeskamo’s tech support an email asking if there is an update, it’s going to be way easier and faster.