elad-bar / ha-blueiris

Integration with Blue Iris Video Security Software
179 stars 42 forks source link

Connectivity Sensors Do Not Work #215

Closed shahmirthesquid closed 1 year ago

shahmirthesquid commented 1 year ago

Hi, the connectivity sensors for the cameras do not work. I have been facing some disconnection issues with one of my cameras, so I tried to use home assistant's history function to check the connectivity history of the camera. The connectivity sensor shows that the camera has always been connected. When I explicitly unplugged the camera, blue iris clearly showed "camera failed to connect" but the connectivity sensor in home assistant still shows it as connected.

I believe this is happening cuz this plugin is making a depreciated JSON API call to the blue iris server. I am unfamiliar with this codebase, but have a lot of experience with the blue iris JSON API. If someone could just tell me which source file deals with the connectivity sensor, I am sure I could fix this problem myself and submit a merge request.

kramttocs commented 1 year ago

The sensors require mqtt setup and configuration. Have you gone through that process? If not, please review the guide here in the repo.

shahmirthesquid commented 1 year ago

Hi, sorry I realize now that this issue was due to my error. I have setup MQTT according to documentation blueiris-server.md and everything is working now.

I would have liked it if this homeassistant integration used the "isNoSignal" attribute of each camera so that manual user configuration and MQTT would not be necessary. The manual configuration can be quite time consuming since it has to be done for each camera individually. Also there is a significant delay between the disconnection and home assistant alert over MQTT even after reducing my BlueIris watchdog timeout.

These are just a few friendly suggestions from me. Thank you guys very much for this home assistant integration, it has been a big help to me in my home. I really appreciate your guys effort to build and maintain a project like this <3

kramttocs commented 1 year ago

Great! Glad it's working. I think using that attribute is a great idea (assuming it actually represents what is seems like it should). If you want to poke around in the code, by all means please do. I've made some changes and added some functionality in this repo (and try to help with issues reported) but haven't fully wrapped my head around the camera level sensor workings.