Send http request if alarm [Dahua IPC-HFW5442E-ZE]

I tried to test but it have errors... it need more tuning to work:

Code:
DEBUG:asyncio:Using selector: EpollSelector
.....Starting Job.....
DEBUG:asyncio:Using selector: EpollSelector
INFO:mail.log:Available AUTH mechanisms: LOGIN(builtin) PLAIN(builtin)
INFO:mail.log:Peer: ('127.0.0.1', 39910)
INFO:mail.log:('127.0.0.1', 39910) handling connection
DEBUG:mail.log:('127.0.0.1', 39910) << b'220 Dell01 Python SMTP 1.4.2'
INFO:mail.log:('127.0.0.1', 39910) EOF received
INFO:mail.log:('127.0.0.1', 39910) Connection lost during _handle_client()
INFO:mail.log:('127.0.0.1', 39910) connection lost
INFO:mail.log:Available AUTH mechanisms: LOGIN(builtin) PLAIN(builtin)
INFO:mail.log:Peer: ('192.168.2.15', 64259)
INFO:mail.log:('192.168.2.15', 64259) handling connection
DEBUG:mail.log:('192.168.2.15', 64259) << b'220 Dell01 Python SMTP 1.4.2'
DEBUG:mail.log:_handle_client readline: b"\x16\x03\x01\x00\x98\x01\x00\x..."
INFO:mail.log:('192.168.2.15', 64259) >> b"\x16\x03\x01\x00\x98\x01\x00\x...."
DEBUG:mail.log:('192.168.2.15', 64259) << b'500 Error: bad syntax'
...
 
I tried to test but it have errors... it need more tuning to work:

Code:
DEBUG:asyncio:Using selector: EpollSelector
.....Starting Job.....
DEBUG:asyncio:Using selector: EpollSelector
INFO:mail.log:Available AUTH mechanisms: LOGIN(builtin) PLAIN(builtin)
INFO:mail.log:Peer: ('127.0.0.1', 39910)
INFO:mail.log:('127.0.0.1', 39910) handling connection
DEBUG:mail.log:('127.0.0.1', 39910) << b'220 Dell01 Python SMTP 1.4.2'
INFO:mail.log:('127.0.0.1', 39910) EOF received
INFO:mail.log:('127.0.0.1', 39910) Connection lost during _handle_client()
INFO:mail.log:('127.0.0.1', 39910) connection lost
INFO:mail.log:Available AUTH mechanisms: LOGIN(builtin) PLAIN(builtin)
INFO:mail.log:Peer: ('192.168.2.15', 64259)
INFO:mail.log:('192.168.2.15', 64259) handling connection
DEBUG:mail.log:('192.168.2.15', 64259) << b'220 Dell01 Python SMTP 1.4.2'
DEBUG:mail.log:_handle_client readline: b"\x16\x03\x01\x00\x98\x01\x00\x..."
INFO:mail.log:('192.168.2.15', 64259) >> b"\x16\x03\x01\x00\x98\x01\x00\x...."
DEBUG:mail.log:('192.168.2.15', 64259) << b'500 Error: bad syntax'
...

Weird, it works for me. I will install my camera next week and try to run some alarms and see if an error occurs and share my log with you.
What are the settings in your camera?
 
Have you tried connecting via ONVIF protocol in homeassistant? Event pushing is part of the onvif protocol, and home assistant can add it as a motion sensor
 
For me personally, HA it is a big NO-NO in a security system, it introduce important delays and a huge point of failure.
I am using HA mostly for notification on LG TV and mobile phones, all automatization I prefer to do locally in Tasmotized devices with rules/scripts.
 
Thanks for link, I saved for future but as I remember Dahua EZIP cameras does not respect ONVIF protocol and events are not sent correct.
At this moment I am happy running my script that translate emails from IP Cameras to MQTT messages.
 
I just tried adding a dahua dome camera(6A9230UA) to HA via ONVIF, HA motion sensors were triggered instantly when I put my hand before the camera, within 0.5 second I can tell, I was totally impressed at the the speed. There are multiple motion sensors added as long as three streaming channels, I can add the motion sensors and streams to Apple HomeKit too.

Camera firmware is newest 2.812, with ONVIF profile version 20.12(V3.0.0.1044240)