[enocean] Add generic state machine infrastructure#20218
Open
svnsssd wants to merge 2 commits intoopenhab:mainfrom
Open
[enocean] Add generic state machine infrastructure#20218svnsssd wants to merge 2 commits intoopenhab:mainfrom
svnsssd wants to merge 2 commits intoopenhab:mainfrom
Conversation
- Add STMStateMachine with generic type parameters for actions and states - Add STMTransition and STMTransitionConfiguration for transition definitions - Add StateMachineProvider interface for EEPs to implement state machine support - Add CHANNEL_STATEMACHINESTATE read-only channel for monitoring state - Add Example classes (ExampleAction, ExampleState, ExampleTransitions) as documentation - Update handler classes to use generic wildcard types for state machine support This provides a generic, extensible state machine framework that can be used by any EnOcean EEP that needs stateful behavior tracking. Signed-off-by: Sven Schad <svnsssd@gmail.com>
This was referenced Feb 12, 2026
Signed-off-by: Sven Schad <svnsssd@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introduces a generic, reusable state machine infrastructure for the EnOcean binding.
Key Features
<A extends Enum<A>, S extends Enum<S>>statemachinestatefor state visibilityArchitecture
The state machine is designed to be device-agnostic and can be used by any EEP implementation that needs state tracking. The example shows a simple START→WARMUP→ACTIVE→READY→FINISH flow.
Testing
mvn clean installChanges
Signed-off-by: Sven Schad svnsssd@gmail.com