Open mcblok opened 3 years ago
Ok I can look at that. I just verified it's still present in the alarm-local branch.
Are you docker, or install based? Want to pull and try the alarm-local branch......if you confirm its ok I'll do a pull request @mcblok
Docker
docker pull psyciknz/cameraevents:alarm-local-latest
For the dev build. Then I can move the travis build to master once this branch is completed.
Thanks for working on this. I pulled the latest and see the following error:
File "CameraEvents.py", line 909, in mqtt_on_connect if self.alerts: AttributeError: 'DahuaEventThread' object has no attribute 'alerts'
Ahh found that, I had to turning everything off from a different place, so it's now all part of that initial config (or via topic CameraEvents/<camera>/alerts Payload:b'OFF'
The error is no longer there but it still publishes images with config entries "alerts=False" and "PostImagesToMQTT=False"
Ahh I was reading in that config value as a string.... I think I have it now. Just running with alerts=False.
The PublishImagesToMQTT looks like something I started adding but didn't complete....Iv'e mucked around with that a bit and now it will post a url to the json topic imageurl rather than the binary image. I was looking at something for homebridge.
I've let it build....but I'm still in the process of running it to make sure it all works. The alerts should do what you want now, just checking that the publishImages is right that took a bit ot tweaking to get it right.
I think I have this sorted now. Let me know if it works out for you.
Great, it works now, thank you!
The script reads the alerts parameter in line 100: self.alerts = device_cfg.get("alerts")
but then overwrites this in line 563: self.alerts = True
I set alerts to False because I don't want this process to pull a snapshot image and publish large images as MQTT messages. There is also a known issue with the Dahua snapshot functionality that at times returns an internal server error after a long wait causing the event messages to be delayed. Thanks for sharing your work, it makes my cameras excellent motion detectors!