-
Notifications
You must be signed in to change notification settings - Fork 23
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
Add support for cameras with multiple channels (thermal cameras, for example) #241
base: dev
Are you sure you want to change the base?
Conversation
Thanks for this contribution. Now it is clearer. Many existing tests failed because of introducing new request |
First of all, thanks a lot for all your work creating this addon. If you need the output of the Streaming/channels request, I will be happy to share it. About your question: Apologies, probably what you say would be the better solution. I'd say a thermometry event in its simplest form is simply motion detection, but if you prefer you could also split it to be a separate event in const.py. |
yes, please send the |
I added missing request to the existing fixtures and added your multichannel camera fixture. I added a small test and modified obtaining channel id as well. |
Perfect, thanks! I added a separate event for thermometry now. This should be sufficient to create the separate binary sensor, right? I would appreciate if you can compare to the diagnostic data I sent. |
yes, binary sensor and switch are created, please confirm if sensor is properly triggered and if switch works. Diagnostic data does not include these things. |
I thought it works fine, but I didn't delete and re-add the device. Then it didn't work anymore with the "thermometry" binary sensor when I tried again today. The 2 channels are shown fine, but no binary sensor or switch is created for the device anymore at all then:
The Event/Trigger call returns more events, but it seems for some reason the integration does not create the sensors for thos events:
Could you check the log please? https://pastebin.com/Bn9dyAHM You can even see the events coming in from the camera, but they are not parsed as the sensors weren't created when I added the device. I would appreciate your help to finalize this. |
did you pull my latest update e081136 |
I see that the camera sends alert as motion detection (VMD)
so binary_sensor.xxxxxxxxxxxxxxxxxxx_2_thermometry wont be triggered, |
Nope, I missed that latest update. Just tried it, and yes, the thermometry binary sensor shows up, but no other sensors (such as motion detection). However, HASS doesn't even receive thermometry events anymore according to the logs.
Yes, you are correct about VMD, it sends those events, also fielddetection. But the sensors for motion detection etc. aren't created by the integration. With the changes in my earlier pull request (mapping thermometry to motion detection simply), at least I was able to get a motion detection sensor showing up, which apparently (then) received the thermometry events, and worked for that. |
yea, |
To summarize, I think the current state of works:
Thanks, I will try your fix next week. |
@maciej-or Do you want me to test your latest changes? Or are they still under development? |
yes, it is ready to test, pls check if binary sensor is triggered and switch |
This pull request adds support for Hikvision thermal cameras with multiple channels that are not NVRs. The implementation simplifies the handling of these devices by treating their channels similarly to standard camera streams.
This is a simplified version of #239
Key Changes:
The integration now:
Note: I'm unsure how to write tests for HA addons, but the changes are pretty simple and straightforward to review.