MCH2022 badge?
go to

MQTT button rev. 5 (by Mr_Diba)

MQTT Button

This application will send an MQTT message when a button is pressed and released and can set a color to a button.

To use this application you should set the IP address of your MQTT server and the topic name in the "Settings" menu.

When a button is pressed a "on" will be send to <topicname>/<buttonnumber>. For example /test/2 where /test/ is configured as a topic name. When the button is released a "off" will be send.

To light up a button send a hex color e.g. 0x0000ff to <topicname>/led/<buttonnumber> and the button will light up in that color.


  • When a color is set and the button is pressed the color will be cleared. This should return to the same color.
  • Configuration to set the 'push' color.
  • Long press and double press messages.
  • Toggle options for buttons.


  1. Send MQTT working.
  2. Receive MQTT message to set button color.
  3. Added Settings menu where you can enter a IP address and topic, added audio messages
Category: utility
Status: working
Vote Comment Date
up 3 years ago
is there a way I can supply a username and password I need to connect to my broker?
  • CampZone 2020: working
  • No dependencies found
  • No dependants found
File Last edited Size 2020-07-23 07:32:21 2.55 KiB 2020-07-23 07:32:21 1008 B
connect_mqtt.mp3 2020-07-23 07:32:21 17.22 KiB
fail_connect_mqtt.mp3 2020-07-23 07:32:21 20.35 KiB
wifi_disconnect.mp3 2020-07-23 07:32:21 12.35 KiB 2020-07-23 07:32:21 780 B
enter_settings.mp3 2020-07-23 07:32:21 23.13 KiB