Software
“How to setup Button+, Home Assistant and your own local message broker. ”
Button+ is a great option to control your home automation, but also a challenging one. You need to have some technical knowledge to get the most out of it. In this tutorial I'll explain how to configure your setup to be self supporting without the use of a public broker. All based on a locally run Home Assistant server.
Architecture
To use Button+ to control your home automation, you first need to understand the buttons architecture.
Button+ is a smart button although its fully depended on external logic. To operate, it uses a message queue (also known as service bus) principle based on the MQTT standard. Basically you send messages from your home automation server to a MQTT broker which button+ listens to and acts upon. This also works the other way around.

“Out of the box” Button+ uses a public broker hosted by button+ and accessible without any restrictions. This is the first you want to get rid of, as you don’t want other people controlling your lights.
In this tutorial I will explain a first setup of Button+ with Home Assistant (HA) and the Mosquitto MQTT broker.
Install message broker
First you need a MQTT broker to be able to set up the communication between HA and Button+. You can use any MQTT broker you like. I used the opensource Mosquitto broker, which comes as a HA add-on app. Its very light weight, so I run it next to HA on the same Raspberry Pi.
Home Assistant > Settings > Apps
Search for Mosquitto broker and install it. When done, start it. (I would also check the start on boot option)
Create a new user for MQTT via your Home Assistant's frontend Settings > People > Users , (i.e. not on Mosquitto's Configuration tab). Notes:
- This name cannot be homeassistant or addons, those are reserved usernames.
- If you do not see the option to create a new user, ensure that Advanced Mode is enabled in your Home Assistant profile.
Configure Button+
Next will be setting up the button+ to use your broker.
Navigate to your button+ and select the MQTT brokers section.
Create a new broker, lets call it local and point to the IP of your MQTT broker. Typically the IP address of your HA server. Port 1883, web socket port 1884. Provide the username and password you created in the previous step. Select all three checkboxes, and you’re done.
Status should read: Connected.

Your first automation
Now lets setup a first automation. In this case we want to show the current time, replacing the out of the box functionality based on the public broker.
To do this we need HA to send the time to Button+ using an automation.
Home assistant > Settings > Automations & Scenes
Create (new) Automation
- On the When step select
time & location > trigger pattern. Enter * on the minutes value. (This means the automation will run every minute)
- Then do step select
MQTT > MQTT Publish
Specify the topic. This is the topic name that button+ should listen to. buttonplus/time
Check the payload box and enter the logic to get the current time {{ now().strftime('%H:%M') }}
- Save the automation. Lets call it
current time.

Now we switch back to Button+ to consume the message.
Button+ > Display configuration > display items
Lets change the current time display item to use your own data.
Create (or change) MQTT Topic, custom
- Event type:
[15] Display item value
- Broker Id: select your own broker:
local (as we called it paragraph configure Button+)
- Topic:
buttonplus/time (as we set in step 2 of the automation)

Done. Your Button+ will now show the current time.
In next tutorials I'll explain how to show the current weather, using the tiny-svg capability of Button+ V2. Also I'll explain the usage of Hue lighting and how to keep it in sync with other triggers.