Dahua VTO event manager script

riogrande75

Pulling my weight
Joined
Oct 19, 2017
Messages
378
Reaction score
131
Location
AUSTRIA
I always wanted a script that notifies me of any event of my VTO2000A (doorbell ringing, faults, video motion, etc.).
With such a script I could send notifications to my mobile phone, send emails,...

With the help of some other users we realized this idea in PHP: The DahuaEventHandler
So far it's still beta, but it works pretty good already.

Any feedback is welcome!

PS: Sorry for german comments in the code...
 

2ndLeaf

Young grasshopper
Joined
Dec 13, 2018
Messages
49
Reaction score
15
Location
California
Thanks, riogrande75. I try your script and it works well. I am able to send myself an email with the snapshot whenever someone rings the doorbell.
 
Joined
Jun 8, 2020
Messages
3
Reaction score
0
Location
france
Thank for your work you seem to have a lot of skill ;), the DahuaEventHandler is a good idea to add feature.
In another thread i was looking for a method to modify my ringtone and you give this link : [Info] - VTO/VTH Konfiguration ändern mit der "Dahua-JSON-Debug-Console-v2"

i didn't fin the "method":"configManager.setConfig", to set the RingFile thunderstruck.mp3 in theDahuaEventHandler available in the github.
Should i add it in a function like function Main() ?
have you a new example ?

I try to run it on my pc whith a apache server make a copy/paste change line 4
and have an error
Parse error: syntax error, unexpected '?> ', expecting function (T_FUNCTION) in C:\UwAmp\www\DahuaEventHandler.php on line 389
add a }line 388
error


Warning: date(): It is not safe to rely on the system's timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in C:\UwAmp\www\DahuaEventHandler.php on line 9
Call Stack​
Set date_default_timezone_set('Europe/Paris'); line 9 (I'm french)

and a new "Fatal error: Cannot redeclare SaveSnapshot() (previously declared in C:\UwAmp\www\DahuaEventHandler.php:374) in C:\UwAmp\www\DahuaEventHandler.php on line 374 "

now i didn't know whar to do else.

My VTO is the VTO2202F-P

Do you think your script should work ?
 

riogrande75

Pulling my weight
Joined
Oct 19, 2017
Messages
378
Reaction score
131
Location
AUSTRIA
You have to modify the script in the way described in german forum. You might use e.g. this as a start script.
You can also try some other scritps I wrote recently to understand how they work. Just run them with "php scriptname.php" on you Linux cli.
Here a list of this simple scripts: riogrande75/Dahua
 
Top