-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
require OperationalCredentialsDelegate refactor #7951
Comments
Despite additions and refinements, we do not believe the sdk commissioner implementation can currently meet our product needs. To this end, and per the proposed solution above, I have developed a prototype that would meet our needs. See the prototype here: https://github.com/msandstedt/connectedhomeip/tree/com-fsm. Leveraging the recently added src/lib/support/StateMachine class, this defines commissioning states and transition events as object types, and allows app implementations to add and remove states and events as needed. Reordering is also readily achievable. And because states and events are types, not values, both can have an arbitrarily sophisticated interfaces. This keeps most transient state data out of any sort of long-lived top-level object, and so the peak memory footprint should be lower. Core sdk commissioning states can be seen here: An example application implementation can be seen here. This is minimally tied into chip-tool: I would welcome any feedback people might have. |
The commissioning state machine operates without dependence on the chip::Controller::DeviceCommissioner, CommissioneeDeviceProxy, CASEClient or CASESessionManager objects. And using the recently introduced StateMachine utility in src/lib, the needed flexibility for ecosystem-specific commissioning flows is available. The state machine is separated into two primary resources: * CommissioningStates.h with templates that can support all commissioners * ExampleCommissioningStateMachine.h, a concrete implementation that uses the states and provides an example that apps can copy, modify, and extend App implementations can add, remove and reorder states as necessary. Arbitrarily complex async UI logic is also easily achieved without the need to define any callback delegate interfaces. This implicitly fixes issues like project-chip#11917 (Refactor DeviceAttestationVerifier to have Async interface). ExampleCommissioningStateMachine takes the place of DeviceCommissioner in chip-tool, providing feature parity. chip-tool now uses the new code to commission devices, and on success then places them into a DeviceController for persistence and subsequent interaction. Fixes project-chip#7951
The commissioning state machine operates without dependence on the chip::Controller::DeviceCommissioner, CommissioneeDeviceProxy, CASEClient or CASESessionManager objects. And using the recently introduced StateMachine utility in src/lib, the needed flexibility for ecosystem-specific commissioning flows is available. The state machine is separated into two primary resources: * CommissioningStates.h with templates that can support all commissioners * ExampleCommissioningStateMachine.h, a concrete implementation that uses the states and provides an example that apps can copy, modify, and extend App implementations can add, remove and reorder states as necessary. Arbitrarily complex async UI logic is also easily achieved without the need to define any callback delegate interfaces. This implicitly fixes issues like project-chip#11917 (Refactor DeviceAttestationVerifier to have Async interface). ExampleCommissioningStateMachine takes the place of DeviceCommissioner in chip-tool, providing feature parity. chip-tool now uses the new code to commission devices, and on success then places them into a DeviceController for persistence and subsequent interaction. Fixes project-chip#7951
The commissioning state machine operates without dependence on the chip::Controller::DeviceCommissioner, CommissioneeDeviceProxy, CASEClient or CASESessionManager objects. And using the recently introduced StateMachine utility in src/lib, the needed flexibility for ecosystem-specific commissioning flows is available. The state machine is separated into two primary resources: * CommissioningStates.h with templates that can support all commissioners * ExampleCommissioningStateMachine.h, a concrete implementation that uses the states and provides an example that apps can copy, modify, and extend App implementations can add, remove and reorder states as necessary. Arbitrarily complex async UI logic is also easily achieved without the need to define any callback delegate interfaces. This implicitly fixes issues like project-chip#11917 (Refactor DeviceAttestationVerifier to have Async interface). ExampleCommissioningStateMachine takes the place of DeviceCommissioner in chip-tool, providing feature parity. chip-tool now uses the new code to commission devices, and on success then places them into a DeviceController for persistence and subsequent interaction. Fixes project-chip#7951
The commissioning state machine operates without dependence on the chip::Controller::DeviceCommissioner, CommissioneeDeviceProxy, CASEClient or CASESessionManager objects. And using the recently introduced StateMachine utility in src/lib, the needed flexibility for ecosystem-specific commissioning flows is available. The state machine is separated into two primary resources: * CommissioningStates.h with templates that can support all commissioners * ExampleCommissioningStateMachine.h, a concrete implementation that uses the states and provides an example that apps can copy, modify, and extend App implementations can add, remove and reorder states as necessary. Arbitrarily complex async UI logic is also easily achieved without the need to define any callback delegate interfaces. This implicitly fixes issues like project-chip#11917 (Refactor DeviceAttestationVerifier to have Async interface). ExampleCommissioningStateMachine takes the place of DeviceCommissioner in chip-tool, providing feature parity. chip-tool now uses the new code to commission devices, and on success then places them into a DeviceController for persistence and subsequent interaction. Fixes project-chip#7951
The commissioning state machine operates without dependence on the chip::Controller::DeviceCommissioner, CommissioneeDeviceProxy, CASEClient or CASESessionManager objects. And using the recently introduced StateMachine utility in src/lib, the needed flexibility for ecosystem-specific commissioning flows is available. The state machine is separated into two primary resources: * CommissioningStates.h with templates that can support all commissioners * ExampleCommissioningStateMachine.h, a concrete implementation that uses the states and provides an example that apps can copy, modify, and extend App implementations can add, remove and reorder states as necessary. Arbitrarily complex async UI logic is also easily achieved without the need to define any callback delegate interfaces. This implicitly fixes issues like project-chip#11917 (Refactor DeviceAttestationVerifier to have Async interface). ExampleCommissioningStateMachine takes the place of DeviceCommissioner in chip-tool, providing feature parity. chip-tool now uses the new code to commission devices, and on success then places them into a DeviceController for persistence and subsequent interaction. Fixes project-chip#7951
The commissioning state machine operates without dependence on the chip::Controller::DeviceCommissioner, CommissioneeDeviceProxy, CASEClient or CASESessionManager objects. And using the recently introduced StateMachine utility in src/lib, the needed flexibility for ecosystem-specific commissioning flows is available. The state machine is separated into two primary resources: * CommissioningStates.h with templates that can support all commissioners * ExampleCommissioningStateMachine.h, a concrete implementation that uses the states and provides an example that apps can copy, modify, and extend App implementations can add, remove and reorder states as necessary. Arbitrarily complex async UI logic is also easily achieved without the need to define any callback delegate interfaces. This implicitly fixes issues like project-chip#11917 (Refactor DeviceAttestationVerifier to have Async interface). ExampleCommissioningStateMachine takes the place of DeviceCommissioner in chip-tool, providing feature parity. chip-tool now uses the new code to commission devices, and on success then places them into a DeviceController for persistence and subsequent interaction. Fixes project-chip#7951
The commissioning state machine operates without dependence on the chip::Controller::DeviceCommissioner, CommissioneeDeviceProxy, CASEClient or CASESessionManager objects. And using the recently introduced StateMachine utility in src/lib, the needed flexibility for ecosystem-specific commissioning flows is available. The state machine is separated into two primary resources: * CommissioningStates.h with templates that can support all commissioners * ExampleCommissioningStateMachine.h, a concrete implementation that uses the states and provides an example that apps can copy, modify, and extend App implementations can add, remove and reorder states as necessary. Arbitrarily complex async UI logic is also easily achieved without the need to define any callback delegate interfaces. This implicitly fixes issues like project-chip#11917 (Refactor DeviceAttestationVerifier to have Async interface). ExampleCommissioningStateMachine takes the place of DeviceCommissioner in chip-tool, providing feature parity. chip-tool now uses the new code to commission devices, and on success then places them into a DeviceController for persistence and subsequent interaction. Fixes project-chip#7951
The commissioning state machine operates without dependence on the chip::Controller::DeviceCommissioner, CommissioneeDeviceProxy, CASEClient or CASESessionManager objects. And using the recently introduced StateMachine utility in src/lib, the needed flexibility for ecosystem-specific commissioning flows is available. The state machine is separated into two primary resources: * CommissioningStates.h with templates that can support all commissioners * ExampleCommissioningStateMachine.h, a concrete implementation that uses the states and provides an example that apps can copy, modify, and extend App implementations can add, remove and reorder states as necessary. Arbitrarily complex async UI logic is also easily achieved without the need to define any callback delegate interfaces. This implicitly fixes issues like project-chip#11917 (Refactor DeviceAttestationVerifier to have Async interface). ExampleCommissioningStateMachine takes the place of DeviceCommissioner in chip-tool, providing feature parity. chip-tool now uses the new code to commission devices, and on success then places them into a DeviceController for persistence and subsequent interaction. Fixes project-chip#7951
The commissioning state machine operates without dependence on the chip::Controller::DeviceCommissioner, CommissioneeDeviceProxy, CASEClient or CASESessionManager objects. And using the recently introduced StateMachine utility in src/lib, the needed flexibility for ecosystem-specific commissioning flows is available. The state machine is separated into two primary resources: * CommissioningStates.h with templates that can support all commissioners * ExampleCommissioningStateMachine.h, a concrete implementation that uses the states and provides an example that apps can copy, modify, and extend App implementations can add, remove and reorder states as necessary. Arbitrarily complex async UI logic is also easily achieved without the need to define any callback delegate interfaces. This implicitly fixes issues like project-chip#11917 (Refactor DeviceAttestationVerifier to have Async interface). ExampleCommissioningStateMachine takes the place of DeviceCommissioner in chip-tool, providing feature parity. chip-tool now uses the new code to commission devices, and on success then places them into a DeviceController for persistence and subsequent interaction. Fixes project-chip#7951
The commissioning state machine operates without dependence on the chip::Controller::DeviceCommissioner, CommissioneeDeviceProxy, CASEClient or CASESessionManager objects. And using the recently introduced StateMachine utility in src/lib, the needed flexibility for ecosystem-specific commissioning flows is available. The state machine is separated into two primary resources: * CommissioningStates.h with templates that can support all commissioners * ExampleCommissioningStateMachine.h, a concrete implementation that uses the states and provides an example that apps can copy, modify, and extend App implementations can add, remove and reorder states as necessary. Arbitrarily complex async UI logic is also easily achieved without the need to define any callback delegate interfaces. This implicitly fixes issues like project-chip#11917 (Refactor DeviceAttestationVerifier to have Async interface). ExampleCommissioningStateMachine takes the place of DeviceCommissioner in chip-tool, providing feature parity. chip-tool now uses the new code to commission devices, and on success then places them into a DeviceController for persistence and subsequent interaction. Fixes project-chip#7951
The commissioning state machine operates without dependence on the chip::Controller::DeviceCommissioner, CommissioneeDeviceProxy, CASEClient or CASESessionManager objects. And using the recently introduced StateMachine utility in src/lib, the needed flexibility for ecosystem-specific commissioning flows is available. The state machine is separated into two primary resources: * CommissioningStates.h with templates that can support all commissioners * ExampleCommissioningStateMachine.h, a concrete implementation that uses the states and provides an example that apps can copy, modify, and extend App implementations can add, remove and reorder states as necessary. Arbitrarily complex async UI logic is also easily achieved without the need to define any callback delegate interfaces. This implicitly fixes issues like project-chip#11917 (Refactor DeviceAttestationVerifier to have Async interface). ExampleCommissioningStateMachine takes the place of DeviceCommissioner in chip-tool, providing feature parity. chip-tool now uses the new code to commission devices, and on success then places them into a DeviceController for persistence and subsequent interaction. Fixes project-chip#7951
The commissioning state machine operates without dependence on the chip::Controller::DeviceCommissioner, CommissioneeDeviceProxy, CASEClient or CASESessionManager objects. And using the recently introduced StateMachine utility in src/lib, the needed flexibility for ecosystem-specific commissioning flows is available. The state machine is separated into two primary resources: * CommissioningStates.h with templates that can support all commissioners * ExampleCommissioningStateMachine.h, a concrete implementation that uses the states and provides an example that apps can copy, modify, and extend App implementations can add, remove and reorder states as necessary. Arbitrarily complex async UI logic is also easily achieved without the need to define any callback delegate interfaces. This implicitly fixes issues like project-chip#11917 (Refactor DeviceAttestationVerifier to have Async interface). ExampleCommissioningStateMachine takes the place of DeviceCommissioner in chip-tool, providing feature parity. chip-tool now uses the new code to commission devices, and on success then places them into a DeviceController for persistence and subsequent interaction. Fixes project-chip#7951
The commissioning state machine operates without dependence on the chip::Controller::DeviceCommissioner, CommissioneeDeviceProxy, CASEClient or CASESessionManager objects. And using the recently introduced StateMachine utility in src/lib, the needed flexibility for ecosystem-specific commissioning flows is available. The state machine is separated into two primary resources: * CommissioningStates.h with templates that can support all commissioners * ExampleCommissioningStateMachine.h, a concrete implementation that uses the states and provides an example that apps can copy, modify, and extend App implementations can add, remove and reorder states as necessary. Arbitrarily complex async UI logic is also easily achieved without the need to define any callback delegate interfaces. This implicitly fixes issues like project-chip#11917 (Refactor DeviceAttestationVerifier to have Async interface). ExampleCommissioningStateMachine takes the place of DeviceCommissioner in chip-tool, providing feature parity. chip-tool now uses the new code to commission devices, and on success then places them into a DeviceController for persistence and subsequent interaction. Fixes project-chip#7951
The commissioning state machine is a short-lived object that is instantiated to commission a given device, and then may be disposed when this succeeds or fails. The design uses the StateMachine utility in src/lib to provide an extensible framework to consuming apps. And it minimizes memory footprint by maintaining only that state in memory that is currently needed. The state machine is provided as these primary resources: * State.h, Event.h: common state and event templates * Discoverer: a commissionable node discoverer * ExampleCommissioningStateMachine.h: a concrete implementation that uses the states, events and discoverer to provide an example that apps can copy, modify, and extend App implementations can add, remove and reorder states as needed. Arbitrarily complex async UI logic can be realized with this design without the need to define callback delegate interfaces in the sdk. ExampleCommissioningStateMachine is integrated into chip-tool, providing feature parity. chip-tool uses the code to commission devices, and on success then places them into a DeviceController for persistence and subsequent interaction. Fixes project-chip#7951
The commissioning state machine is a short-lived object that is instantiated to commission a given device, and then may be disposed when this succeeds or fails. The design uses the StateMachine utility in src/lib to provide an extensible framework to consuming apps. And it minimizes memory footprint by maintaining only that state in memory that is currently needed. The state machine is provided as these primary resources: * State.h, Event.h: common state and event templates * Discoverer: a commissionable node discoverer * ExampleCommissioningStateMachine.h: a concrete implementation that uses the states, events and discoverer to provide an example that apps can copy, modify, and extend App implementations can add, remove and reorder states as needed. Arbitrarily complex async UI logic can be realized with this design without the need to define callback delegate interfaces in the sdk. ExampleCommissioningStateMachine is integrated into chip-tool, providing feature parity. chip-tool uses the code to commission devices, and on success then places them into a DeviceController for persistence and subsequent interaction. Fixes project-chip#7951
The commissioning state machine is a short-lived object that is instantiated to commission a given device, and then may be disposed when this succeeds or fails. The design uses the StateMachine utility in src/lib to provide an extensible framework to consuming apps. And it minimizes memory footprint by maintaining only that state in memory that is currently needed. The state machine is provided as these primary resources: * State.h, Event.h: common state and event templates * Discoverer: a commissionable node discoverer * ExampleCommissioningStateMachine.h: a concrete implementation that uses the states, events and discoverer to provide an example that apps can copy, modify, and extend App implementations can add, remove and reorder states as needed. Arbitrarily complex async UI logic can be realized with this design without the need to define callback delegate interfaces in the sdk. ExampleCommissioningStateMachine is integrated into chip-tool, providing feature parity. chip-tool uses the code to commission devices, and on success then places them into a DeviceController for persistence and subsequent interaction. Fixes project-chip#7951
The commissioning state machine is a short-lived object that is instantiated to commission a given device, and then may be disposed when this succeeds or fails. The design uses the StateMachine utility in src/lib to provide an extensible framework to consuming apps. And it minimizes memory footprint by maintaining only that state in memory that is currently needed. The state machine is provided as these primary resources: * State.h, Event.h: common state and event templates * Discoverer: a commissionable node discoverer * ExampleCommissioningStateMachine.h: a concrete implementation that uses the states, events and discoverer to provide an example that apps can copy, modify, and extend App implementations can add, remove and reorder states as needed. Arbitrarily complex async UI logic can be realized with this design without the need to define callback delegate interfaces in the sdk. ExampleCommissioningStateMachine is integrated into chip-tool, providing feature parity. chip-tool uses the code to commission devices, and on success then places them into a DeviceController for persistence and subsequent interaction. Fixes project-chip#7951
The commissioning state machine is a short-lived object that is instantiated to commission a given device, and then may be disposed when this succeeds or fails. The design uses the StateMachine utility in src/lib to provide an extensible framework to consuming apps. And it minimizes memory footprint by maintaining only that state in memory that is currently needed. The state machine is provided as these primary resources: * State.h, Event.h: common state and event templates * Discoverer: a commissionable node discoverer * ExampleCommissioningStateMachine.h: a concrete implementation that uses the states, events and discoverer to provide an example that apps can copy, modify, and extend App implementations can add, remove and reorder states as needed. Arbitrarily complex async UI logic can be realized with this design without the need to define callback delegate interfaces in the sdk. ExampleCommissioningStateMachine is integrated into chip-tool, providing feature parity. chip-tool uses the code to commission devices, and on success then places them into a DeviceController for persistence and subsequent interaction. Fixes project-chip#7951
The commissioning state machine is a short-lived object that is instantiated to commission a given device, and then may be disposed when this succeeds or fails. The design uses the StateMachine utility in src/lib to provide an extensible framework to consuming apps. And it minimizes memory footprint by maintaining only that state in memory that is currently needed. The state machine is provided as these primary resources: * State.h, Event.h: common state and event templates * Discoverer: a commissionable node discoverer * ExampleCommissioningStateMachine.h: a concrete implementation that uses the states, events and discoverer to provide an example that apps can copy, modify, and extend App implementations can add, remove and reorder states as needed. Arbitrarily complex async UI logic can be realized with this design without the need to define callback delegate interfaces in the sdk. ExampleCommissioningStateMachine is integrated into chip-tool, providing feature parity. chip-tool uses the code to commission devices, and on success then places them into a DeviceController for persistence and subsequent interaction. Fixes project-chip#7951
The commissioning state machine is a short-lived object that is instantiated to commission a given device, and then may be disposed when this succeeds or fails. The design uses the StateMachine utility in src/lib to provide an extensible framework to consuming apps. And it minimizes memory footprint by maintaining only that state in memory that is currently needed. The state machine is provided as these primary resources: * State.h, Event.h: common state and event templates * Discoverer: a commissionable node discoverer * ExampleCommissioningStateMachine.h: a concrete implementation that uses the states, events and discoverer to provide an example that apps can copy, modify, and extend App implementations can add, remove and reorder states as needed. Arbitrarily complex async UI logic can be realized with this design without the need to define callback delegate interfaces in the sdk. ExampleCommissioningStateMachine is integrated into chip-tool, providing feature parity. chip-tool uses the code to commission devices, and on success then places them into a DeviceController for persistence and subsequent interaction. Fixes project-chip#7951
@msandstedt What work remains here? |
There are two things here. While originally the discussion started with the operational credentials delegate interface being insufficient, that now has been addressed. The other thing that came up in discussions was general non-extensibility of the commissioner. I had proposed one solution to this. The AutoCommissioner is another. I think at this point we are considering the current commissioner implementation to be acceptable, and therefore this issue can be closed. |
Problem
Related: #5055, #6656, #7859
The current OperationalCredentialsDelegate interface has a number of limitations that block integration into many designs. Some examples:
chip::controller::deviceCommissioner
object and into appsProposed Solution
In meetings with stakeholders, it has become clear that the problems with the OpCreds delegate interface are actually a symptom of a more fundamental problem. The
chip::controller::DeviceCommissioner
design is missing a necessary layer of abstraction. Consider theDeviceComissioner
object's internal states:These shouldn't exist here in the first place. The sdk's
chip::controller::DeviceCommissioner
object is preempting what should be the role of the commissioner app proper. Instead of driving its own state machine, we need the sdk to provide stateless commissioning methods that map to transactions in the spec's commissioning sequence. These are the edges in the commissioning state machine, not the states themselves.It seems then that the functionality provided by `chip::controller::DeviceCommissionert must be divided into two halves:
The text was updated successfully, but these errors were encountered: