dmitrif / onvif2mqtt

Translate ONVIF events (from IP Cameras) to MQTT messages.
Other
116 stars 31 forks source link

Testing AVTech AVM2453 #20

Open jpiscaer opened 3 years ago

jpiscaer commented 3 years ago

Hi! I have a couple of AVTech AVM2453 cameras with ONVIF support which don't show up on mqtt.

They do connect successfully: {"level":30,"time":1607202992810,"name":"ONVIF/camera-driveway","hostname":"10.10.10.10","msg":"Successfully connected.","v":1}

But I think the ONVIF messages these cameras send are non-compliant. The camera's config page shows tnsav:MotionDetection as the topic for motion events, and this is configurable.

But when I check out the actual messages being sent, they're sending out tns1:VideoAnalytics/tnsav:MotionDetection as the topic.

Screen Shot 2020-12-05 at 22 31 49

I tried setting the topic to the more standard tns1:VideoSource/MotionAlarm but then the cameras send out tns1:VideoAnalytics/tns1:VideoSource/MotionAlarm, which isn't picked up by onvif2mqtt either.

Screen Shot 2020-12-05 at 22 31 03

The question here is: how can I edit onvif2mqtt to pick up the tns1:VideoAnalytics prefix?

dmitrif commented 3 years ago

Hi, @jpiscaer currently the event names are hardcoded. I will take a look at making these configurable. Until then feel free to submit a PR against this file: https://github.com/dmitrif/onvif2mqtt/blob/master/src/onvif/SubscriberGroup.js#L13