Hi all.
I have been playing with my VTO2111D-WP those last couple of days to find a way to notify my home automation system that someone is at the door.
I would have loved to see a text field in the web GUI to enter a specific URL that will be called when someone pushes on the doorbell. But of course there is none and Dahua did not foresee any other way to do this...
So I found some suggestions on forums like using Tasker that would call a URL when a smartphone/tablet receives a push notification. Another was to set the VTO to record snapshots on a FTP server then use a tool to detect that the FTP directory has been updated. But guess what! My VTO does not record a snapshot when the doorbell button is pushed but only when the call is answered!
So I found another solution that I want to share here. I have some android devices on which I installed gdmss and subscribed to push notifications (note that I do not get the notification when my device is asleep but that is another story...). I analyzed the packets and the doorbell always sends TCP packets to 172.217.168.234 (Google server) port 443 when the button is pushed (would probably be port 2195 for Apple devices). So the idea is to detect those specific packets and do a specific action like calling an URL of my home automation system. This is actually very simple to do (one line ) on my dd-wrt router:
This is an infinite loop in which tcpdump monitors the traffic and exits as soon as the first packet is sent by the doorbell (192.18.1.124) to Google server (172.217.168.234). Then it calls a URL on the home automation server (192.168.1.10) to inform it that someone is at the door. This method is quite generic and could be used with many other connected devices.
EDIT: I noticed that the called Google server is not always the same. Actually the first packet sent by the doorbell is a DNS query to get the IP of fcm.googleapis.com and the IP can change. A simple and probably sufficient solution is to remove the IP from the tcpdump parameters to only check the port 443.
I have been playing with my VTO2111D-WP those last couple of days to find a way to notify my home automation system that someone is at the door.
I would have loved to see a text field in the web GUI to enter a specific URL that will be called when someone pushes on the doorbell. But of course there is none and Dahua did not foresee any other way to do this...
So I found some suggestions on forums like using Tasker that would call a URL when a smartphone/tablet receives a push notification. Another was to set the VTO to record snapshots on a FTP server then use a tool to detect that the FTP directory has been updated. But guess what! My VTO does not record a snapshot when the doorbell button is pushed but only when the call is answered!
So I found another solution that I want to share here. I have some android devices on which I installed gdmss and subscribed to push notifications (note that I do not get the notification when my device is asleep but that is another story...). I analyzed the packets and the doorbell always sends TCP packets to 172.217.168.234 (Google server) port 443 when the button is pushed (would probably be port 2195 for Apple devices). So the idea is to detect those specific packets and do a specific action like calling an URL of my home automation system. This is actually very simple to do (one line ) on my dd-wrt router:
Code:
while true; do tcpdump -i br0 -n -c 1 'src host 192.168.1.124 and dst host 172.217.168.234 and dst port 443'; curl -k 'https://192.168.1.10/api?xxx'; sleep 5; done
This is an infinite loop in which tcpdump monitors the traffic and exits as soon as the first packet is sent by the doorbell (192.18.1.124) to Google server (172.217.168.234). Then it calls a URL on the home automation server (192.168.1.10) to inform it that someone is at the door. This method is quite generic and could be used with many other connected devices.
EDIT: I noticed that the called Google server is not always the same. Actually the first packet sent by the doorbell is a DNS query to get the IP of fcm.googleapis.com and the IP can change. A simple and probably sufficient solution is to remove the IP from the tcpdump parameters to only check the port 443.
Code:
while true; do tcpdump -i br0 -n -c 1 'src host 192.168.1.124 and and dst port 443'; curl -k 'https://192.168.1.10/api?xxx'; sleep 5; done
Last edited: