Hello
@giggetto71
Update:
I have been out all day with the family, but something was on my mind that I read this morning whilst trying to create this library. I've not long got back home, so I decided to update this library.
Logger connected to: Google Pixel 7 Pro
--------- beginning of main
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create (first time) **
MatterCommissioning.Initialize: Getting CommissioningClient...
MatterCommissioning.Initialize: CommissioningClient created successfully.
Call B4XPages.GetManager.LogEvents = True to enable logging B4XPages events.
** Activity (main) Resume **
MatterCommissioning.StartCommissioning: BEGIN
MatterCommissioning.StartCommissioning: Payload = MT:Y.K9042C00KA0648G00
MatterCommissioning.StartCommissioning: Request built. Calling commissionDevice()...
MatterCommissioning.StartCommissioning: END
MatterCommissioning: commissionDevice() SUCCESS
MatterCommissioning: Preparing commissioning UI launch...
MatterCommissioning: Registering IOnActivityResult in B4A...
MatterCommissioning: Extracting B4A request code...
MatterCommissioning: Launching commissioning UI via startIntentSenderForResult...
MatterCommissioning: IntentSender launched successfully.
** Activity (main) Pause event (activity is not paused). **
SS_MatterCommissioning
Author: Peter Simpson
Version: 1.01
- MatterCommissioning
- Events:
- CommissioningFailed (Error As String)
- CommissioningSuccess (DeviceName As String)
- Functions:
- Initialize (EventName As String)
Initializes the MatterCommissioning object.
EventName is the event name prefix (e.g., "mc").
- StartCommissioning (onboardingPayload As String)
Starts the Matter commissioning process using the provided onboarding payload.
onboardingPayload is the Matter QR code payload string (starts with MT).
Click Here to download the zip file, place all the dependencies in your additional libraries folder. You can now do the usual with the attached two zip files, the B4A example and B4A library.
You
will need a real Matter QR payload key. The test key currently inside the B4A example should be okay for you to use (for testing purposes only), it launches the
Commissioning UI.
This is
NOT an official B4A library release (call it a pre-beta), it's a quick test that may or may not work.
Please note:
This is just a very basic test library that is extremely limited in functionality. I just wanted to know if I could put something together that can connect to devices. If this works, I'll do some reading to see what other features I might be able include once the
CommissioningSuccess event is successfully raised.
Enjoy...