Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Installation #40

Open
peteeee opened this issue Apr 18, 2021 · 3 comments
Open

New Installation #40

peteeee opened this issue Apr 18, 2021 · 3 comments

Comments

@peteeee
Copy link

peteeee commented Apr 18, 2021

Great application.

Been using it since the beginning and it has worked well for me with the Hikvision DB2 doorbell camera / PIR

Last week moved the installation to another computer.

Installed the docker version and all appeared OK seeing it running in mqtt Explorer.

Only thing noticed is that the motion trigger never changed from off to on with motion.

So today installed baremetal ==>
1 - apt install npm
2 - npt install

restarted docker version and tested for motion looking at mqtt explorer.

This time it worked right out of the box.

Curious why I had to install NPM for docker version to work?

I've added another piece here installing paho mqtt on an openwrt router and using a script to trigger a relay on an ESP01 which is hardwired connected to alarm panel. Works well and just is another option for use.

@peteeee
Copy link
Author

peteeee commented May 4, 2021

So new version quit working using the Hikvision DB.

The old version on another computer works well.

No changes have been made the Hikvision DB configuration.

@peteeee
Copy link
Author

peteeee commented May 4, 2021

The logs look fine...just do not see any motion from the PIR.

[email protected] start /onvif2mqtt
node dist/index.js
{"level":30,"time":1620005937808,"msg":"Loading configuration. {"configPath":"/config/config.yml"}","v":1}
{"level":30,"time":1620005937828,"msg":"Validating configuration file.","v":1}
{"level":30,"time":1620005937834,"name":"Manager","msg":"Beginning initialization...","v":1}
{"level":30,"time":1620005937834,"name":"MQTT","hostname":"192.168.244.150:1883","msg":"Connecting.","v":1}
{"level":30,"time":1620005937893,"name":"MQTT","hostname":"192.168.244.150:1883","msg":"Successfully connected.","v":1}
{"level":20,"time":1620005937893,"name":"MQTT","hostname":"192.168.244.150:1883","msg":"Publishing. {"topic":"onvif2mqtt/status","value":"ON","retain":true}","v":1}
{"level":30,"time":1620005937894,"name":"ONVIF/Doorbell","hostname":"192.168.244.152","msg":"Attempting connection.","v":1}
{"level":20,"time":1620005937897,"name":"MQTT","hostname":"192.168.244.150:1883","msg":"Publishing. {"topic":"onvif2mqtt/Doorbell/motion","value":"OFF","retain":true}","v":1}
{"level":30,"time":1620006002565,"name":"ONVIF/Doorbell","hostname":"192.168.244.152","msg":"Successfully connected.","v":1}
{"level":30,"time":1620006005120,"name":"ONVIF/Doorbell","hostname":"192.168.244.152","msg":"CreatePullPointSubscription Doorbell","v":1}
[email protected] start /onvif2mqtt
node dist/index.js
{"level":30,"time":1620086500268,"msg":"Loading configuration. {"configPath":"/config/config.yml"}","v":1}
{"level":30,"time":1620086500273,"msg":"Validating configuration file.","v":1}
{"level":30,"time":1620086500277,"name":"Manager","msg":"Beginning initialization...","v":1}
{"level":30,"time":1620086500277,"name":"MQTT","hostname":"192.168.244.150:1883","msg":"Connecting.","v":1}
{"level":30,"time":1620086500318,"name":"MQTT","hostname":"192.168.244.150:1883","msg":"Successfully connected.","v":1}
{"level":20,"time":1620086500319,"name":"MQTT","hostname":"192.168.244.150:1883","msg":"Publishing. {"topic":"onvif2mqtt/status","value":"ON","retain":true}","v":1}
{"level":30,"time":1620086500320,"name":"ONVIF/Doorbell","hostname":"192.168.244.152","msg":"Attempting connection.","v":1}
{"level":20,"time":1620086500322,"name":"MQTT","hostname":"192.168.244.150:1883","msg":"Publishing. {"topic":"onvif2mqtt/Doorbell/motion","value":"OFF","retain":true}","v":1}
{"level":30,"time":1620086500558,"name":"ONVIF/Doorbell","hostname":"192.168.244.152","msg":"Successfully connected.","v":1}
{"level":30,"time":1620086502542,"name":"ONVIF/Doorbell","hostname":"192.168.244.152","msg":"CreatePullPointSubscription Doorbell","v":1}

@ksupipr
Copy link
Contributor

ksupipr commented Jun 10, 2021

The logs look fine...just do not see any motion from the PIR.

Add in this line
https://github.com/dmitrif/onvif2mqtt/blob/master/src/onvif/SubscriberGroup.js#L62

this.logger.info('ONVIF received event', { subscriberName, eventType });

All publish events: https://github.com/dmitrif/onvif2mqtt/blob/master/src/onvif/SubscriberGroup.js#L12

The camera can return an event with a different name

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants