Peanut is a very nice looking bird! 8 years old; baby still eh?
So here are my steps to install. Tell me if I am incorrect. Note so far 101 has worked the best for me.
BTW for the HikVision Video Doorbell ONVIF you do not need the admin login / password. Works fine for streaming / jpg stills without a username / password
1 - docker pull dfarkov/onvif2mqtt:latest
2 - cd /opt
3 - git clone
dmitrif/onvif2mqtt
4 - nano config.dev.yml
5 - cp config.dev.yml /opt/onvif2mqtt/config.yml
8 -
docker run -d --name="onvif2mqtt" -v /opt/onvif2mqtt:/config -v /etc/localtime:/etc/localtime:ro --net=host --restart always dfarkov/onvif2mqtt
OK. My bad. I put in the MQTT user name and password where the camera name and password should be. Fixed configuration and restarted it.
Docker ps looks good and it is not restarting
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
d6e6891aaa75 dfarkov/onvif2mqtt "docker-entrypoint.s…" 32 minutes ago Up 3 minutes onvif2mqtt
/opt/onvif2mqtt# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
d6e6891aaa75 dfarkov/onvif2mqtt "docker-entrypoint.s…" 45 minutes ago Up 10 minutes onvif2mqtt
60825af9a451 homeassistant/home-assistant "/bin/entry.sh pytho…" 3 months ago Up 2 weeks home-assistant
Just tested doorbell motion putting my hand in front of it and it triggered a MQTT message.
Logs look odd though.
onvif-cam@1.0.4 start /
node dist/index.js
{"level":30,"time":1585606927622,"msg":"Loading configuration. {\"configPath\":\"/config/config.yml\"}","v":1}
{"level":30,"time":1585606927647,"msg":"Validating configuration file.","v":1}
{"level":30,"time":1585606927960,"name":"Manager","msg":"Beginning initialization...","v":1}
{"level":30,"time":1585606927963,"name":"MQTT","hostname":"192.168.244.150:1883","msg":"Connecting.","v":1}
{"level":30,"time":1585606928141,"name":"MQTT","hostname":"192.168.244.150:1883","msg":"Successfully connected.","v":1}
{"level":30,"time":1585606928144,"name":"ONVIF/Doorbell","hostname":"192.168.244.152","msg":"Attempting connection.","v":1}
{"level":20,"time":1585606928149,"name":"MQTT","hostname":"192.168.244.150:1883","msg":"Publishing. {\"topic\":\"onvif2mqtt/Doorbell/motion\",\"value\":\"OFF\",\"retain\":true}","v":1}
{"level":50,"time":1585606928385,"name":"ONVIF/Doorbell","hostname":"192.168.244.152","msg":"Failed to connect to Doorbell {}","v":1}
{"level":30,"time":1585606928385,"name":"ONVIF/Doorbell","hostname":"192.168.244.152","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
Keeps running and doesn't restart.