https://github.com/will-white/dahua-companion
Small, simple, and fast event driven Dahua (Amcrest) doorbell processor for home automation integration
https://github.com/will-white/dahua-companion
containerization event-driven golang mqtt pubsub stream-processing
Last synced: about 1 month ago
JSON representation
Small, simple, and fast event driven Dahua (Amcrest) doorbell processor for home automation integration
- Host: GitHub
- URL: https://github.com/will-white/dahua-companion
- Owner: will-white
- Created: 2025-02-10T02:36:34.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2026-05-07T05:23:51.000Z (about 1 month ago)
- Last Synced: 2026-05-07T07:31:49.750Z (about 1 month ago)
- Topics: containerization, event-driven, golang, mqtt, pubsub, stream-processing
- Language: Go
- Homepage:
- Size: 23.9 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- Agents: AGENTS.md
Awesome Lists containing this project
README
# Dahua Companion
The Dahua Companion allows you to integrate your [Dahua](https://www.dahuasecurity.com/) and [Amcrest](https://amcrest.com/wifi-video-doorbell-cameras.html) doorbell's button/ring/buzzer with any home automation that can listen to queue / events.
The Dahua Companion will listen for the button/ring/buzzer and then send a message/event/topic via MQTT e.g. `doorbell/pressed` with no payload.
## How it works
Dahua cameras report events via a long polling HTTP connection. And what you subscribe to effects what events the camera reports back with.
Dahua's API is included in the documentation folder.
For this project we're only concerned with the `AlarmLocal` event (This is the buzzer/ringer/button pressed event). And more specifically we publish only the `AlarmLocal` started events since we don't care when Dahua decides an alarm is "over".
After we receive an event we publish a `doorbell/pressed` to the MQTT broker.
This project also has wrappers around the HTTP subscription and MQTT broker to always make sure it's connected. The only thing we don't have is an internal queue to monitor in between MQTT outages. Since it doesn't make sense to send events that no longer matter.
## Home Assistant Example
```
alias: Doorbell buzzer
triggers:
- trigger: mqtt
topic: doorbell/pressed
actions:
- action: notify.echos
metadata: {}
data:
message: Someone is at the front door
data:
type: tts
mode: single
```