This write up and others have saved me so I’ll share a few notes. Thanks to all who contrubute so much, I’m trying to add some insight and admit I lack etiquette and form. I mostly learned from Sean’s contributions and those he credits. I chose to lean on the DNS trigger as it has been flawless unless I fiddle, but that’s not tested long term. I would next build a current (Shelly/GPIO) box for than and include my back door, different cameras, and another “input” if I went that way.
-
I ran a pihole to scrape DNS logs becasue I didn’t want to depend on my main firewall (pfsense) and it’s so easy to spin a container for pihole and tell pfsense to send DNS for whatever clients to whatever pihole(s) …plenty of good reasons to have those to play with
-
it works to flawlessly notify HA of dorrbell pushes for me so far. At first without being selective on syntax I’d get 4 triggers because the logs are showing responses and cached responses… so first hit is 3, then w/ cache subsequent were 4. you need to add the while read;do echo “$REPLY”|grep -q -F “query[A] alarm.use.s3.amazonaws.com” syntax to avoid this, looking only for the initial log mention of that url.
If you play with your doorbell (using ivms or batch)… it needs to get rebooted to send the request reliably once again. I suspect that it wouldn’t call home to the app either if it didn’t hit the pihole/DNS but haven’t proved that yet. Anyway, it works, but if you fiddle to test, give it a reboot.
I never saw a difference in detection, no matter what zones I drew, between the ONVIF detections thatw ere published. I would invite anyone to paste a
. I would love insight on that. According to Sean
A few different entities will be available over ONVIF:
-
Cell Motion Detection. I believe this is video motion detected by the doorbell in the motion detection zone that you may have set up from the desktop configuration tool (screenshots in the Desktop Configuration Tool section above)
-
Motion Alarm. I believe this is the PIR sensor.
-
Field Detection. I don’t know what this is. It has never detected anything for me.
-
MainStream and SubStream. Camera entities for the low/high resolution stream. I recommend disabling these entities to help you avoid accidentally using them somewhere and consuming precious streaming connections.
-
Reboot. A button that reboots the doorbell.
But I see not difference in my logs in HASS betwen the detections of cell and motion. I agree the others do nothing. I’m using the 200321 firmware too because I want the sanpshot url, but admit I didn’t see if the detection ONVIF signals were different on other firmwares.
so other hints/notes:
-I run my container for pihole in LXD on QNAP, super slick, zero-time reboot, SSH, webmin, CRON
-you can send all kinds of notifications using TTS alarm notification, actionable notifications with links to the camera app or the feeds for HASS or your other cameras. Without cloud (outgoing only) you can push notifications to the public internet and then from your phone with VPN or whatever (no cloud) do everything but speak back through the MIC. I would LOVE to intercept that call and route by Voip/webrtc to the phone as the apps (terribly) try to.
here’s my bash on the pihole to catch the doorbell presses and fire the automation
#! /bin/bash
tail -fn0 /var/log/pihole/pihole.log | while read;do echo "$REPLY"|grep -q -F "query[A] alarm.use.s3.amazonaws.com" && curl -X POST -H "Authorization: Bearer 0011XXsuperinsanepassword0011" -H "Content-Type: application/json" -d "{\"entity_id\": \"automation.00_doorbell_push\"}" http://192.168.517.615:8123/api/services/automation/trigger;done```