There is also the SIP option. SIP Doorbell, android tablet and HA integration
The only way I see this currently work outside the DIY spectrum is through SIP. I’ve struggled with the same problems for a while since I have an axis door station a8004-ve. Together with RasPBX, a SIP client on the phone ( GS Wave / Acrobits ) and Doordroid as an WebRTC client into HA it sort of works. Incoming and outgoing calls are registered everywhere even with remote push. However still have some issues with the 2 way audio, depending on who’s calling it works or not. If the doorstation calls I get no audio on the WebRTC client, the other way around I do get 2 way communication ( video is nicely being sent everywhere ). I know this is due to NAT / SSL restrictions etc so it’s definitely possible but not for the faint of heart …
Easiest and probably cheapest is to go with a solution around HA … like the Hikvision with a separate indoor station and an app.
I’ve since discovered the DB1 doorbell DOES provide motion events, using ONVIF message events. Blue Iris can subscribe to these and trigger video recording from them.
Do you (or anyone else) know if you can subscribe to these motion events with any of the HA integragtions other than blue iris. While It seems like BI is a great tool, It more than I need, but I would love to be able to do some automations based on the motion event.
we could make a nice video doorbell with a raspberry pi, a night view camera and a button but the only problem is the case.
There is no watarproof case for the raspberry which looks moderately good and have some holes for the camera, IR leds and a button.
You could design one and get it 3D printed online if you don’t have a 3D printer. If it was me I would install them onto a piece of stainless steel plate and recess the lot into the wall such that it’s just a nice flat piece of stainless sitting there with a few holes. The camera lens could be sealed against the inside of the plate, you would need to have holes for sound to go through for mic and speaker if you are going to include audio… problem still exists that HA doesn’t really deal with audio in this way to the GUI.
the steel plate is a great idea, maybe the button could be capacitive behind the transparent glass
the components could be fixed on the plate and slide from the base of the box upwards to make it more weatherproof
in the next weeks i will try to make the drawings
What about the button press, have you worked around that? Also if you don’t mind me asking, which firmware version are you using?
DB1 motion detection through onvif events can now be utilized using my new docker image / node package that captures ONVIF events and transmit them over MQTT.
For EzViz and RCA you will have to flash it with Laview firmware to get ONVIF support.
This doorbell only publishes the motion detection, but fails to publish doorbell presses.
Docker: Docker Hub
Github: dmitrif/onvif2mqtt
@dfarkov thank you for sharing this. Trying to run it for a hikvision doorbell. can you confirm the following:
mqtt:
host: <mqtt host ip>
port: 1883
username: user
password: pwd
# All of your ONVIF devices
onvif:
# Name for the device (used in MQTT topic)
- name: doorbell
hostname: <camera ip>
port: 80
username: user
password: pwd
@juan11perez That should work just fine It should end up publishing to onvif2mqtt/doorbell/motion
.
Let me know if you run into any issues.
@dfarkov Thank you. Tried running with that configuration and the following docker compose
onvif2mqtt:
container_name: onvif2mqtt
image: dfarkov/onvif2mqtt:latest
restart: unless-stopped
volumes:
- /mnt/cache/appdata/onvif2mqtt:/config
environment:
- PGID=100
- PUID=99
- TZ=Asia/Dubai
# mem_limit: 512m #1G
# mem_reservation: 256m
labels:
- "com.centurylinklabs.watchtower.enable=true"
But the docker is not starting and producing the following error:
{
"level":30,"time":1585338336327,"msg":"Loading configuration. {\"configPath\":\"/config/config.yml\"}","v":1}
{"level":30,"time":1585338336329,"msg":"Validating configuration file.","v":1}
{"level":30,"time":1585338336374,"name":"Manager","msg":"Beginning initialization...","v":1}
{"level":30,"time":1585338336374,"name":"MQTT","hostname":"192.168.1.100:undefined","msg":"Connecting.","v":1}
(node:19) UnhandledPromiseRejectionWarning: Error: Connection refused: Not authorized
at MqttClient._handleConnack (/node_modules/mqtt/lib/client.js:920:15)
at MqttClient._handlePacket (/node_modules/mqtt/lib/client.js:350:12)
at work (/node_modules/mqtt/lib/client.js:292:12)
at Writable.writable._write (/node_modules/mqtt/lib/client.js:302:5)
at doWrite (/node_modules/readable-stream/lib/_stream_writable.js:428:64)
at writeOrBuffer (/node_modules/readable-stream/lib/_stream_writable.js:417:5)
at Writable.write (/node_modules/readable-stream/lib/_stream_writable.js:334:11)
at Socket.ondata (_stream_readable.js:714:22)
at Socket.emit (events.js:311:20)
at addChunk (_stream_readable.js:294:12)
(node:19) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:19) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
> [email protected] start /
> node dist/index.js
{
labels: {
'10': 'trace',
'20': 'debug',
'30': 'info',
'40': 'warn',
'50': 'error',
'60': 'fatal'
},
values: { trace: 10, debug: 20, info: 30, warn: 40, error: 50, fatal: 60 }
}
Thank you
Hi! Please try pulling the latest docker image version docker pull dfarkov/onvit2mqtt
. I had a bug in the previous version where it was discarding the username / password for MQTT broker.
Thank you. Done. now it’s connecting but subsequently crashing:
{"level":30,"time":1585340571477,"msg":"Validating configuration file.","v":1}
{"level":30,"time":1585340571528,"name":"Manager","msg":"Beginning initialization...","v":1}
{"level":30,"time":1585340571528,"name":"MQTT","hostname":"192.168.1.100:1883","msg":"Connecting.","v":1}
{"level":30,"time":1585340571557,"name":"MQTT","hostname":"192.168.1.100:1883","msg":"Successfully connected.","v":1}
{"level":30,"time":1585340571557,"name":"ONVIF/doorbell","hostname":"192.168.1.17","msg":"Attempting connection.","v":1}
{"level":20,"time":1585340571558,"name":"MQTT","hostname":"192.168.1.100:1883","msg":"Publishing. {\"topic\":\"onvif2mqtt/doorbell/motion\",\"value\":\"OFF\",\"retain\":true}","v":1}
{"level":30,"time":1585340571763,"name":"ONVIF/doorbell","hostname":"192.168.1.17","msg":"Successfully connected.","v":1}
/node_modules/onvif/lib/events.js:139
throw new Error('You should create pull-point subscription first!');
^
Error: You should create pull-point subscription first!
at Cam.pullMessages (/node_modules/onvif/lib/events.js:139:10)
at Cam._eventPull (/node_modules/onvif/lib/events.js:262:9)
at Cam.<anonymous> (/node_modules/onvif/lib/events.js:100:13)
at parseSOAPString (/node_modules/onvif/lib/utils.js:98:3)
at IncomingMessage.<anonymous> (/node_modules/onvif/lib/cam.js:214:4)
at IncomingMessage.emit (events.js:323:22)
at endReadableNT (_stream_readable.js:1204:12)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `node dist/index.js`
npm ERR! Exit status 1
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2020-03-27T20_22_51_787Z-debug.log
> [email protected] start /
> node dist/index.js
Ahh alright, so it seems like I haven’t implemented the pull point subscriptions for Hikvision / Axis devices. Will address that within the next week and ping you!
thank you very much.
Just a quick check-in, what is the model of your doorbell? Thank you!
I just released 1.0.3 that attempts to address this issue, let me know if it works. Thank you!
@dfarkov thank you again. I just installed your latest and getting the same error.
This is my doorbell
I’m using this with my RCA variant flashed with laview firmware for the ONVIF, it’s working perfectly. Thanks so much for this.