This repository shows some examples how to build components in Python based on MQTT for communication, JSON for serialization and STMPY for the implementation of state machines.
The code examples are given for educational purposes, not professional deployment.
pip install paho-mqtt
pip install stmpy
This is a specific example of a component that listens to MQTT for incoming commands and reacts. The component realizes a manager for timers that can be started from a voice assistant.
Documented source code: https://falkr.github.io/stmpy-components/TimerManager.m.html
Paho provides communication via MQTT.
JSON supports to serialize data objects into strings, and back again.
STMPY provides support for state machine in Python.