A modern, single-file MQTT message processing application with dark mode, drag & drop reordering, and real-time color-coded monitoring.
- 🎯 Single HTML File - Complete application in one file, no build process required
- 🌓 Dark/Light Theme - Automatic theme switching with persistent preferences
- 🎨 28-Color Palette - Custom background and text colors for visual status indication
- 🔄 Drag & Drop Reordering - Intuitive topic organization
- ⚡ Real-time Updates - Live MQTT message monitoring with instant visual feedback
- 📱 Responsive Design - Works seamlessly on desktop and mobile
- 🔧 MQTT Functions - Transfer, Convert, Cycle, Schedule, and Timer operations with individual on/off control
- 🎛️ Inline Editing - Click to edit payloads and publish instantly
- 🚀 Auto-connect - Automatic MQTT connection on startup
- 💾 Auto-save - All settings saved automatically to localStorage
- 👁️ Monitor Mode - Disable functions to monitor only without processing messages
- 📺 Tile View - Grid-based display optimized for 4:3 aspect ratio with click-to-publish
- 🖥️ Fullscreen Mode - Immersive fullscreen experience with dedicated control bar
- ⏰ Scheduler - Time and day-based automatic message publishing
- ⏱️ Timer - Countdown timer with audio alerts and overtime tracking
- 📡 Client Status - Online/offline status reporting with will message support
- 🔖 Retain Flags - Configurable message persistence on MQTT broker
- 📝 JSON Path - Extract values from JSON payloads using dot notation
- 🔤 Dynamic Font Size - Configurable tile font sizes with automatic overflow handling
- 🔗 Remote Config Sync - Read/write topic configuration via MQTT for external management
- Download the
index.htmlfile - Open it in any modern web browser
- Configure your MQTT broker settings
- Start monitoring and controlling your MQTT topics
No installation, no dependencies, no build process required!
- Open
index.htmlin your web browser - Click the Settings button (⚙️) in the bottom-right corner
- Go to the "MQTT Connection" tab
- Enter your broker details:
- Host: Your MQTT broker address (e.g.,
broker.example.com) - Port: WebSocket port (typically
8083) - Username: Your MQTT username (if required)
- Password: Your MQTT password (if required)
- Host: Your MQTT broker address (e.g.,
- (Optional) Configure "Client Status" tab for online/offline reporting:
- Status Topic: Topic to publish status (e.g.,
client/status) - Online Payload: Message when connected (e.g.,
online) - Away Payload: Message when disconnected (e.g.,
offline)
- Status Topic: Topic to publish status (e.g.,
- Click "Connect"
💡 The app will automatically reconnect on future visits if settings are saved. 💡 Client status messages are published with retain flag for persistent status.
- Click the Add Topic button (➕) in the control bar
- Fill in the basic information:
- Label: A friendly name for your topic
- Topic Name: The MQTT topic path (e.g.,
home/sensors/temperature) - Show in Tile View: Toggle whether to display in tile mode
- (Optional) Configure JSON Path for structured payloads:
- JSON Path for Value: Extract specific element as payload value (e.g.,
data.status) - JSON Path for Display: Extract specific element for display text (e.g.,
data.label)
- JSON Path for Value: Extract specific element as payload value (e.g.,
Payload values are displayed in a compact table format for easy configuration.
- In the topic configuration dialog, click "Add Payload Value"
- For each expected payload value:
- Payload Value: The actual MQTT payload (e.g.,
"on","23.5") - Display Text: Human-readable text (e.g.,
"Light On","Room Temperature") - BG (Background Color): Click the color preview to select from 28 colors
- Text (Text Color): Choose contrasting text color for readability
- Convert Value: Value to send when using Convert function (optional)
- Payload Value: The actual MQTT payload (e.g.,
💡 Payload values are not required for Timer and Schedule functions
💡 Wildcard (
*): Set payload value to*to define default colors for any unmatched payloads
💡 Default colors: First payload uses Teal/White (#20c997/#ffffff), subsequent payloads use Red/White (#ff0000/#ffffff)
Choose one function type per topic:
- Forwards received payloads to another topic unchanged
- Use case: Bridging between different MQTT networks
- Maps payload values to different output values
- Use case: Converting sensor readings to status messages
- Example: Temperature
"25.0"→ Status"comfortable"
- Cycles through predefined values when triggered
- Use case: Controlling multi-state devices (off → dim → bright → off)
- Settings:
- Next Payload: Trigger to advance (e.g.,
"next") - Previous Payload: Trigger to go back (e.g.,
"prev")
- Next Payload: Trigger to advance (e.g.,
- Publishes messages at scheduled times
- Use case: Automated lighting, periodic sensor checks
- Settings:
- Up to 2 independent schedules per topic
- Days of week selection (with All/None buttons)
- Time of day (24-hour format)
- Payload to publish
- Individual enable/disable per schedule
- Publishes with retain flag
- Countdown timer with automatic publishing
- Use case: Kitchen timers, irrigation control, timeout monitoring
- Behavior:
- Starts countdown when receiving an integer (seconds)
- Publishes decreasing values at specified intervals
- Stops when receiving non-numeric payload
- Continues into negative (overtime) with different colors
- Display: Shows time as HH:MM:SS (or MM:SS when hours = 0)
- Color Priority: Payload value settings override timer colors
- Use payload values for specific states (e.g., "off", "0", "60")
- Timer colors apply when no payload value matches
- Settings:
- Publish interval (seconds, default: 1)
- Countdown colors (background/text) - Blue/White by default
- Overtime colors (background/text) - Red/White by default
- Sound alert (Beep/Bell/Chime/Custom audio file)
- Click "Save" to create the topic
- Watch real-time updates in the main table
- Rows will automatically change colors based on current payload values
- Toggle Functions: Click the function button to enable/disable processing
- Green (ON): Messages are processed and functions execute
- Gray (OFF): Messages are monitored and displayed only, no processing
- Traditional table layout with full topic details
- 🖱️ Click Payload Cell: Edit and publish values instantly
- 🖱️ Right-click Row: Access context menu for edit/duplicate/delete/quick publish
- 🖱️ Drag Grip Handle: Reorder topics by dragging the ≡ icon
- 🖱️ Click Function Button: Toggle function execution on/off (monitoring continues)
- 🖱️ Duplicate Topic: Right-click and select "Duplicate" to create a copy
- Grid-based layout optimized for 4:3 aspect ratio
- Shows only Label and Display text
- 🖱️ Click Tile: Publish next payload value (cycles through values)
- Automatically calculates optimal grid size
- Per-topic visibility control
- Dynamic font sizing based on tile dimensions
- Automatic text overflow handling (shrinks font, then shows "..." if needed)
- 🖥️ Fullscreen: Enter/exit fullscreen mode
- 🌓 Theme: Toggle dark/light theme
- 📊 View: Switch between list and tile views
- ⚙️ Settings: Open settings modal
- ➕ Add Topic: Create new topic
- 📁 GitHub: Repository link (bottom)
- Control Bar (Right side): Background turns red when disconnected from MQTT broker
- Function Buttons (List view):
- Green (ON): Function active - processes messages
- Gray (OFF): Function inactive - monitors only, no processing
Label: Living Room Light
Topic: home/living-room/light
Function: Cycle
Payload Values:
- "off" → Display: "Off" → Background: Light Red
- "dim" → Display: "Dimmed" → Background: Light Yellow
- "bright" → Display: "Bright" → Background: Light Green
Next Payload: "button_press"
Previous Payload: "long_press"
Behavior: Each button press cycles: Off → Dim → Bright → Off
Function Control: Toggle the function button to enable/disable cycling while continuing to monitor the current state.
Label: Room Temperature
Topic: sensors/temperature
Function: Convert
Target Topic: home/status/comfort
Payload Values:
- "18.0" → Display: "Cold" → Convert: "heat_on"
- "22.0" → Display: "Perfect" → Convert: "auto"
- "28.0" → Display: "Hot" → Convert: "cool_on"
Default Value: "unknown"
Behavior: Temperature readings trigger HVAC commands
Function Control: Disable the function to monitor temperature without triggering HVAC commands.
Label: Motion Sensor
Topic: zigbee/motion/sensor1
Function: Transfer
Target Topic: home-assistant/binary_sensor/motion1
Payload Values:
- "true" → Display: "Motion Detected" → Background: Orange
- "false" → Display: "No Motion" → Background: Light Gray
Behavior: Forwards motion events between MQTT systems
Function Control: Turn off forwarding while still monitoring motion detection status.
Label: IoT Sensor
Topic: sensors/device1
JSON Path for Value: data.status
JSON Path for Display: data.label
Payload Values:
- "active" → Display: "Active" → Background: Green
- "idle" → Display: "Idle" → Background: Gray
Example JSON Payload:
{"data": {"status": "active", "label": "Sensor Online", "temp": 25.5}}Behavior: Extracts data.status ("active") as payload value for color matching, and data.label ("Sensor Online") as display text.
Different operations use retain flags differently to control message persistence on the MQTT broker:
- Cycle Function: Published values are retained
- Schedule Function: Published values are retained
- Tile View Click: Published values are retained
- Quick Publish (Context Menu): Published values are retained
- Inline Payload Edit: Published values are retained
- Client Status: Both online and away messages are retained
- Remote Topics Config: Configuration JSON, status, and errors are retained
- Transfer Function: Uses retain flag from received message
- Convert Function: Uses retain flag from received message
- Timer Function: Countdown values are not retained (transient state)
- Settings → "Data Management" tab
- Click "Export"
- Copy the JSON configuration
- Save to file for backup
- Settings → "Data Management" tab
- Paste JSON configuration in text area
- Click "Import"
- Configuration is automatically applied
- Export regularly to preserve configurations
- Store JSON files in version control
- Share configurations between team members
- Settings → "Font Size" tab
- Configure tile view font sizes:
- Label Font Size (%): Percentage of tile size for label text (default: 18%)
- Display Font Size (%): Percentage of tile size for display text (default: 14%)
- Range: 5% to 50%
- Changes apply immediately to tile view
Topic configuration can be read and written via MQTT, enabling external tools to manage topics.
- Client Status must be configured with a Status Topic (e.g.,
clients/livingroom) - The Status Topic is used directly as the prefix (e.g.,
clients/livingroom/topics)
| Topic | Purpose | Retain |
|---|---|---|
clients/<hostname>/topics |
Topic configuration JSON (pretty format) | Yes |
clients/<hostname>/topics/status |
success or error after external update |
Yes |
clients/<hostname>/topics/errors |
Error details when status is error |
Yes |
Publishing (MQTT Panel → External):
- Configuration is published on MQTT connect and after any config change (add/edit/delete/duplicate/reorder/import/function toggle)
- Runtime state (
currentPayload,currentValue) is excluded from the published JSON - Only publishes when configuration has actually changed
Receiving (External → MQTT Panel):
- Subscribe to
clients/<hostname>/topicsand publish a JSON array of topic objects - Each topic object must have at least a
namefield - On success: topics are replaced, UI is re-rendered,
successis published to status topic - On error:
erroris published to status topic, details to errors topic - If the received config is identical to current config, no action is taken
# Publish new configuration via mosquitto_pub
mosquitto_pub -h broker.example.com -t "clients/livingroom/topics" -r -f topics.json
# Check result
mosquitto_sub -h broker.example.com -t "clients/livingroom/topics/status" -C 1broker.mqttdashboard.com:8000(WebSocket)test.mosquitto.org:8080(WebSocket)
# Install Mosquitto
sudo apt install mosquitto mosquitto-clients
# Enable WebSocket listener in /etc/mosquitto/mosquitto.conf
listener 8083
protocol websockets
# Restart service
sudo systemctl restart mosquittodocker run -it -p 1883:1883 -p 8083:8083 \
-v mosquitto.conf:/mosquitto/config/mosquitto.conf \
eclipse-mosquitto- ✅ Chrome 88+
- ✅ Firefox 85+
- ✅ Safari 14+
- ✅ Edge 88+
Required Features:
- WebSocket support
- Drag & Drop API
- CSS Custom Properties
- localStorage API
- ✅ Check WebSocket port (usually 8083, not 1883)
- ✅ Verify broker supports WebSocket protocol
- ✅ Check firewall and network connectivity
- ✅ Try without username/password first
- ✅ Ensure payload values match exactly (case-sensitive)
- ✅ Check that payload value is configured in topic settings
- ✅ Verify MQTT messages are being received
- ✅ Use the grip handle (≡) icon on the left
- ✅ Ensure browser supports Drag & Drop API
- ✅ Try refreshing the page
- ✅ Check that localStorage is enabled
- ✅ Verify browser allows local storage for file:// URLs
- ✅ Try opening in http://localhost if needed
This is a single-file application for simplicity. When contributing:
- Preserve single-file architecture
- Test in multiple browsers
- Ensure both light and dark themes work
- Maintain backward compatibility for data formats
- Update CLAUDE.md documentation
MIT License - Feel free to use, modify, and distribute.
- Repository: https://github.com/ytx/mqtt_p
- Issues: https://github.com/ytx/mqtt_p/issues
- MQTT.js Documentation: https://github.com/mqttjs/MQTT.js
- Bootstrap Documentation: https://getbootstrap.com/docs/5.3/
Made with ❤️ for the MQTT community