Auto connect openHAB interfaces

Requests to auto connect interfaces for openHAB snap
snap listing: https://snapcraft.io/openhab
snap source: https://github.com/openhab/openhab-snap

Interfaces to consider for auto connection and rationel for it:

  • home
    • openHAB supports exporting and importing of configurations, those would usually stored in user’s home dir
  • mount-observe
    • openHAB service java runtime service ask as system information
  • system-observe
    • openHAB service java runtime, to adjust used resources based on system info
  • raw-usb
    • openHAB supports multiple zigbee, zwave USB dongles, those are typically access over serial interface.

+1 for mount-observe and system-observe.

home is auto-connected on classic but not on Ubuntu Core. Ubuntu Core will often not have login users, so can you describe typical use cases for why home needs to be auto-connected on core?

You said that raw-usb is needed for talking over the serial interface. Would an auto-connection for serial-port with greedy plugs be enough? If not, can you describe why?

Thanks for reply @jdstrand
We can skip home auto connect, as I realised we need to update it to all users anyway, so it form it is now it won’t work for purpose of backup/restore functionality anyway

raw-usb is a bit more tricky. Greedy plus could work, but we do not have hot plug enabled on public images, it’s still behind feature flag. And since we want to use this for appliance images, we will be using gadget snaps published by Canonical, and those do not have any slots for USB serial devices defined.
So unless there is clear plan when to remove hotplug experimental flag, I’m not sure how this could work.