fwestenberg / reolink_dev

Home Assistant Reolink addon
MIT License
550 stars 101 forks source link

Reolink Duo/NVR and future multichannel device support #451

Closed xannor closed 2 years ago

xannor commented 2 years ago

I just got a duo, and never having an NVR, I am now seeing how difficult it can be to view/handle multichannel devices with this integration. I have worked out a basic concept to the config flow to present a list of the "channels" instead of the slider, but since I cannot really create multiple config entries from the flow, I was wondering if you guys think it would be good to center the integration on a device instead of the camera entities?

My thoughts are that the config and option flows would create a single config entry for the device and inside that device you would select the channels you want entities for, this could even be expanded to the streams so one camera entity could be created per stream/channel. If a person wanted to change the channels/streams they were "tracking" with the integration, they could just change the options and select the new ones they wanted (or in the case of the NVR if they added more cameras.)

The only major changes this would cause would be that the toggle that are for the device (such as notifications/etc) would use the first entities api, but all of the other entities could have their own api object and function as they do now.

Since I dont own an NVR I dont know if this would cause problems with the NVR (does it allow unique notifications per channel?)

I dont want to go too far down this road if this is not a direction you guys want to go with this integration, so please let me know if I should continue. It may be a couple of weekends before I have a working push.

phil-schneider commented 1 year ago

Hello, how did you integrate multichannel devices? I was not able to do so, or I just dont know . Can you please help and/or explain?

dhavaldesai-HA commented 1 year ago

Same issue here. how did you integrate multiple channel? During the setup, it asks me to select "channel 1" OR "channel 2" on Reolink Duo?

xannor commented 1 year ago

I think with this integration, you can only do one channel at a time. I never got a response from them about my ideas so I let it drop here. Instead I went my own route, though my work on it is still very much alpha.

phil-schneider commented 1 year ago

Well, this is open source. Somebody is investing his spare free time for this integration and sharing his work with us. Thank you for that. We can not demand or expect anything. This integration was done, because the original manufactor did do a good job or doesn't care.

I integrated the second camera/channel direktly with the stream url into home assistant.