The plugin API is intentionally small in Phase 1 and will become stable only after the first real device integration.
A plugin implements:
class Plugin:
async def start(self, config, mqtt): ...
async def stop(self): ...The registry will later map a configuration type to a plugin factory.
A plugin will receive controlled interfaces for:
- transport subscription and publishing;
- device registration;
- datapoint state updates;
- availability updates;
- structured logging.
plugins:
- id: living_room_dimmer
type: shelly_dimmer_gen3
name: Living room light
mqtt:
base_topic: shellydimmerg3-dcb4d9c12590The Python plugin API is considered internal before HMBridge 1.0. Configuration formats intended for users should nevertheless be changed cautiously and documented in CHANGELOG.md.