Esp32 Workbench Mqtt
Apps & Automationesp32-workbench-mqttEsp32 Workbench Mqtt is an Agent Skill for apps & automation published in the majiayu000/claude-skill-registry repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
MQTT broker control on the Universal ESP32 Workbench. Start and stop the broker for testing ESP32 MQTT clients. Triggers on "MQTT", "broker", "mosquitto", "pub", "sub", "publish", "subscribe".
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Inspect the Agent Skill at https://github.com/majiayu000/claude-skill-registry/blob/HEAD/skills/integration/esp32-workbench-mqtt/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/esp32-workbench-mqtt, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
ESP32 MQTT Broker
Base URL: http://192.168.0.87:8080
The workbench can run an MQTT broker (mosquitto) for testing ESP32 devices that use MQTT for communication. The broker is accessible to devices connected to the workbench's WiFi AP.
Endpoints
| Method | Path | Purpose |
|---|---|---|
| POST | /api/mqtt/start | Start the MQTT broker |
| POST | /api/mqtt/stop | Stop the MQTT broker |
| GET | /api/mqtt/status | Check broker status |
Examples
# Start the MQTT broker
curl -X POST http://192.168.0.87:8080/api/mqtt/start
# Check broker status
curl http://192.168.0.87:8080/api/mqtt/status
# Stop the MQTT broker
curl -X POST http://192.168.0.87:8080/api/mqtt/stop
MQTT Broker Details
| Property | Value |
|---|---|
| Broker IP | 192.168.0.87 (from LAN) or 192.168.4.1 (from workbench AP) |
| Default port | 1883 |
| Authentication | None (open broker for testing) |
Common Workflows
-
Test ESP32 MQTT client:
- Ensure device is on workbench WiFi (see esp32-workbench-wifi)
POST /api/mqtt/start— start broker- Device connects to
192.168.4.1:1883 - Monitor device behavior via serial or UDP logs (see esp32-workbench-logging)
POST /api/mqtt/stop— stop broker when done
-
Test MQTT disconnect/reconnect:
- Start broker, let device connect
POST /api/mqtt/stop— device loses MQTT- Monitor device's reconnection behavior
POST /api/mqtt/start— device should reconnect
-
Test MQTT + WiFi together:
- Start AP + broker
POST /api/wifi/ap_stop— device loses both WiFi and MQTTPOST /api/wifi/ap_start+POST /api/mqtt/start— restore both- Verify device recovers
Troubleshooting
| Problem | Fix |
|---|---|
| Broker won't start | Check if mosquitto is installed on the workbench Pi |
| Device can't connect | Ensure device is on workbench WiFi; use broker IP 192.168.4.1 from AP clients |
| Broker status shows stopped | Start it with POST /api/mqtt/start |