Tasmota and OpenBeken MQTT Reboot Command: Restart vs Reset, FullTopic, Security
User question
reboot by mqtt command
Artificial Intelligence Response
Direct answer to the question
- Publish a Restart command to the device’s MQTT command topic.
- Most common case (Tasmota/OpenBeken defaults):
- Topic: cmnd//Restart
- Payload: 1
- Example (no auth): mosquitto_pub -h -t "cmnd//Restart" -m "1"
- Do not send the message as retained.
Key points
- Use the device’s actual MQTT topic and FullTopic format.
- Payload “1” performs a soft reboot; it does not erase configuration.
- Verify reboot via the device’s LWT and RESULT topics.
Detailed problem analysis
- Topic structure: Tasmota and OpenBeken use a configurable FullTopic (default “%prefix%/%topic%/”). For commands, %prefix% is “cmnd”. With the default, the restart command is sent to cmnd//Restart with payload 1.
- Case sensitivity: Commands are case-insensitive on both Tasmota and OpenBeken (Restart, restart, RESTART all work).
- What happens on reboot:
- The device publishes tele//LWT = "Offline", disconnects, reboots, then comes back with LWT = "Online".
- You typically also get an acknowledgement before reboot: stat//RESULT with a JSON like {"Restart":"Restarting"}.
- “Restart” vs “Reset”:
- Restart 1: software reboot, preserves settings.
- Reset x: resets configuration to varying degrees (dangerous if you only want a reboot). Avoid unless you intend to wipe or partially wipe config.
- MQTT QoS/retain:
- Use QoS 0 or 1; do not retain the command. A retained “Restart” on a command topic can cause a reboot loop on every reconnect.
Current information and trends
- Tasmota continues to use Restart 1 over MQTT for software reboot; OpenBeken intentionally mirrors Tasmota’s MQTT command grammar, so the same command and topic pattern apply.
- Some ecosystems (e.g., Shelly Gen2, ESPHome) support restarts via different mechanisms (RPC or native integrations) rather than a universal MQTT “restart” topic. If you use those, confirm their specific method in the device docs.
Supporting explanations and details
- Verifying success:
- Subscribe to tele//LWT and stat//# during the operation: mosquitto_sub -t "tele//LWT" -t "stat//#" -v
- Expect “Offline”, a short gap, then “Online”.
- Delayed or chained actions:
- You can queue commands with Backlog, e.g., publish to cmnd//Backlog with payload "Delay 50; Restart 1" (5 s delay = 50 x 100 ms ticks).
- Multiple devices:
- MQTT doesn’t allow wildcards in publish topics. Use a script or automation (Node-RED, Home Assistant, shell loop) to iterate over a list of device topics and publish Restart 1 to each.
Ethical and legal aspects
- Safety and availability: Rebooting actuators (heaters, pumps, critical lighting) can interrupt service and may lead to unsafe conditions. Schedule reboots during maintenance windows and ensure failsafe states.
- Security: Protect your MQTT broker with authentication/TLS and topic-level ACLs so that untrusted clients cannot trigger reboots.
Practical guidelines
- One-off command (no broker auth):
- mosquitto_pub -h 192.168.1.10 -t "cmnd/livingroom_plug/Restart" -m "1"
- With broker auth:
- mosquitto_pub -h 192.168.1.10 -u mqttuser -P mqttpass -t "cmnd/livingroom_plug/Restart" -m "1"
- Monitoring:
- mosquitto_sub -h 192.168.1.10 -t "tele/livingroom_plug/LWT" -v
- HTTP fallback (Tasmota/OpenBeken web API):
- curl "http:///cm?cmnd=Restart%201"
- If HTTP auth is enabled: curl "http:///cm?user=&password=&cmnd=Restart%201"
- Note: On Tasmota, the HTTP API may need to be enabled in settings.
- Troubleshooting:
- Confirm the device is connected to the broker (LWT = Online).
- Verify the FullTopic and device topic match your publish topic.
- Ensure your ACL permits publishing to cmnd//*.
- Make sure the message is not retained (-r must not be used with mosquitto_pub).
Possible disclaimers or additional notes
- Some firmware builds or custom MQTT topic templates differ from defaults—always check the device’s MQTT configuration.
- A hung device may not process software Restart; a power cycle might be required.
Suggestions for further research
- Review your firmware’s MQTT and command reference (Tasmota “MQTT” and “Commands” docs; OpenBeken command/mqtt docs).
- If you use other ecosystems (e.g., Shelly Gen2, ESPHome), consult their specific restart mechanisms (often RPC or integration services rather than the Tasmota-style topic).
Brief summary
- To reboot via MQTT on Tasmota/OpenBeken, publish payload 1 to cmnd//Restart and avoid retained messages.
- Verify with LWT and RESULT topics.
- Use Backlog for delayed restarts and scripts/automation to handle multiple devices safely.
If you tell me which firmware/device you’re using and your MQTT topic template (FullTopic), I’ll provide an exact command you can paste and run.
Disclaimer: The responses provided by artificial intelligence (language model) may be inaccurate and misleading. Elektroda is not responsible for the accuracy, reliability, or completeness of the presented information. All responses should be verified by the user.