-
-
Notifications
You must be signed in to change notification settings - Fork 428
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
Start discovery with a parameter (like a pairing code in case of Matter) #4388
Comments
I'm in for the UI part. I guess Dan could do this as well but I think he is busy enough with the Matter binding itself. By enhancing the REST API, does this include to provide the UI with the information whether a pairing code is required? Even better would be to also provide information about the pairing code format, e.g. a description and a RegEx for validation through the REST API. The binding could provide this through config descriptions to core. |
This issue has been mentioned on openHAB Community. There might be relevant details there: https://community.openhab.org/t/incorporating-matter/127907/140 |
That is a good idea but that makes the stuff more complex than I imagined. This could be a new discovery GET API for a binding returning these information: GET discovery/bindingId |
Yeah it’s relatively complex on the core side, but I at least want the information whether to display such an input … I don’t want to display it always, because this would confuse the user and clutter the UI. |
I have not thought too much about it, but as far as the internal framework, i guess it would be nice if a binding advertised that it supported a discovery code through org.openhab.core.config.discovery.DiscoveryService, much like we have "isBackgroundDiscoveryEnabled" maybe "isAdditionalCodeEnabled" ? Then "startScan" could pass this code in as a optional parameter. In the UI i could see when picking the binding type and scanning this being an option. It would also be great in the UI to allow the user to enter this code OR take a picture of of a QR code for the text (very common now). |
Yes, good idea. |
Good idea Dan. I think we should extend the Next the
Finally, it would be really nice if a binding could provide a description for the pairing code so the UI could tell the user the required format. |
Please let me know what you think, especially any ideas wrt to the implementation of the description are highly welcomed! |
I have almost finished the implementation in core framework. I will push something before the weekend. |
I was actually staying away from "required" so that the discovery service of a binding could support both scanning with and without a code, but i agree this should be default false and not necessary for most bindings to handle. |
Just FYI this will be very nice for the matter binding. I'm working on prototyping an IOS extension that will use the built in matter/thread framework in IOS 16 to detect new matter devices via bluetooth, then allow the user to add them to the Wifi or Thread network, then commission them to the Matter fabric. I'll end up using this new discovery feature for the Matter Fabric part, so once we get them onto the Wifi or Thread network, i can call the discovery API with the pairing code from the IOS client, and openHAB will take care of the rest ! |
I wonder whether there is a binding (or better a „system“) that supports both cases … Your iOS extension sounds super nice! |
If I understand the question correctly, then the answer is yes. Zigbee can either use a device specific pairing code / key, or it can use a generic key. Most devices use the generic key, but the device specific code is becoming more popular. Both will be needed though for Zigbee. |
Thanks for the info, I think you understand the question right. |
My current implementation makes the input required or not. I will change it to make it optional. It is just a test to change and a method to rename. |
Related to openhab#4388 Signed-off-by: Laurent Garnier <[email protected]>
Related to openhab#4388 Signed-off-by: Laurent Garnier <[email protected]>
Related to openhab#4388 Signed-off-by: Laurent Garnier <[email protected]>
Related to openhab#4388 Signed-off-by: Laurent Garnier <[email protected]>
Feature is now implemented |
The Matter binding being developed by @digitaldan requires to fill a pairing code when scanning for a new device.
My feeling is that we need a new optional input field in Main UI to fill this parameter just before clicking the Scan button.
Main UI will then pass this parameter, if filled by user, to the REST API.
@digitaldan : please first confirm that it is THE solution.
If we go in that direction, I can do the work in core framework (enhancing REST API with a new parameter and handling this parameter in the discovery stuff), keeping a backward compatibility for all existing binding discovery (parameter will be ignored). But then we would need for your help @florian-h05 to update this screen. Are you volunteer for that?
@digitaldan : finally you will just have to override in your binding a new method
void startScan(String scanParameter)
in your discovery class.WDYT ?
The text was updated successfully, but these errors were encountered: