-
Notifications
You must be signed in to change notification settings - Fork 600
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
Next generation hardware handling #2429
Conversation
6da6974
to
6d3d5a8
Compare
Co-authored-by: Franck Nijhof <git@frenck.dev>
This would be also requested by Deconz @manup |
@@ -284,7 +308,7 @@ def volumes(self) -> Dict[str, Dict[str, str]]: | |||
# Init other hardware mappings | |||
|
|||
# GPIO support | |||
if self.addon.with_gpio and self.sys_hardware.support_gpio: | |||
if self.addon.with_gpio and self.sys_hardware.helper.support_gpio: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new libgpiod
uses /dev/gpiochip*
devices. Do we support that? I guess we could just add that as well if an addon wants GPIO access. See e.g. https://embeddedbits.org/new-linux-kernel-gpio-user-space-interface/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done by cgroup rules. We need only to know if we can apply it. But yeah, this function would be gone after I know the sys endpoint and can do it like for audio.
Co-authored-by: Stefan Agner <stefan@agner.ch>
Co-authored-by: Stefan Agner <stefan@agner.ch>
Co-authored-by: Stefan Agner <stefan@agner.ch>
…ervisor into next-hardware
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
About the deprecation warnings, I think we should only print those for add-ons that are installed.
Co-authored-by: Joakim Sørensen <joasoe@gmail.com>
Co-authored-by: Joakim Sørensen <joasoe@gmail.com>
Proposed change
Rewrite the complete udev handling inside Supervisor. Now we only based on the host udev events and all hardware interactions are based on these events/lists.
It also removes the udev handling needs from the add-on. This is now a complete handle over the supervisor. The add-on config has a new option type
device
. This will be lookup and control by Supervisor and make most of the device hot&plug able. Based on device types or USB IDs, we generate a complete list for UI selection. We work internally also with the udev ID to make sure devices get correct mapped, also if the user does not use device-by-id selectors.These changes aim a full working device handling to the user, almost like he do run Core.
Type of change
Additional information
Checklist
black --fast supervisor tests
)If API endpoints of add-on configuration are added/changed: