Generic IP Camera Config Flow and zeroconf

My IP cameras work correctly with the ‘generic’ integration when configured via configuration.yaml

I’ve noticed that they advertise via the zeroconf protocol, so it should be possible for them to be autodetected via HA core, with maybe a full or semiautomatic config_flow.

I am volunteering to implement this - my approach would be:

  1. Implement a config_flow for the ‘generic’ (camera) integration.
  2. Add zeroconf to trigger the config_flow, hopefully with as many parameters automatically filled in as possible.
  3. Implement in such a way that it is easy for other developers to support their generic IP cameras that advertise via zeroconf.
  4. Keep configuration.yaml configuration method as still valid - to avoid breaking changes.

Small complications:

  • There’s no integration owner for ‘generic’ so not sure who the ‘design authority’ is. Seems like a group effort with lots of committers.

  • My cameras are Hikvision (reflashed Trendnet). I notice that there is a hikvision integration already which provides sensors for motion/activity coming from the camera. If ultimately both ended up in the GUI as config flow, this could be confusing to users (set up two integrations to make one camera work for both video and sensors).

Does anyone have any suggestions/edits to my proposal before I start?

1 Like

First draft PR now complete:

Still work in progress but working for me. Need to add tests etc.
Planning to set up zeroconf functionality as a separate PR to keep the PR size small.

PR is now ready inc tests and I have a follow up PR that previews the camera feed as part of the gui config_flow.

Next step is zeroconf. If you are interested in using this, please help by reviewing the PRs.