A Python program that executes shell commands triggered by MQTT messages with payload-based configuration.
mqtt-launcher is a Python program that subscribes to MQTT topics and executes shell commands on the host machine based on message payloads. It solves the problem of remote process automation by bridging MQTT messaging with local command execution, enabling event-driven automation workflows.
IoT developers, system administrators, and automation engineers who need to trigger local actions from MQTT messages in smart home, industrial automation, or remote management scenarios.
Developers choose mqtt-launcher for its simple Python-based configuration, payload-specific command mapping, and built-in output reporting—providing a lightweight alternative to more complex automation frameworks while maintaining flexibility.
Execute shell commands triggered by published MQTT messages
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Allows precise command execution based on exact MQTT message payloads, enabling fine-grained control over automation triggers as shown in the configuration examples.
Subscribes to multiple topics using wildcard patterns, providing flexible message routing without manual topic enumeration, ideal for dynamic IoT setups.
Automatically publishes command stdout and stderr to derived MQTT topics with /report suffix, facilitating remote monitoring and debugging, as demonstrated in the screenshot.
Supports per-machine configuration via .d subdirectories that merge in lexical order, allowing easy environment-specific adjustments without modifying the main config file.
Uses the @!@ string to substitute payload into command arguments, making commands adaptable to incoming message content, as illustrated in the dev/2 and dev/3 examples.
Requires writing Python configuration files, which can be a barrier for users unfamiliar with programming or Python syntax, unlike simpler YAML or JSON-based tools.
Lacks built-in authentication or authorization for commands, relying entirely on MQTT broker security, which may be insufficient for sensitive or production environments.
When a payload doesn't match, it only logs an error without providing fallback mechanisms or detailed error reporting to MQTT topics, as seen in the 'remove' payload example.
Does not mention support for parallel command execution or queuing, which could lead to bottlenecks or race conditions in high-load or time-sensitive scenarios.