The MQTT Button
Home automation often revolves around passing messages via the MQTT protocol. It’s a lightweight, easy to implement protocol that can pass messages of arbitrary length to a server acting as a “broker”, which in turn then pushes that message to any other device which is subscribed to that MQTT feed. This makes setting up data streams or actions very simple. This ESP32-based A4 Button fires up when you press it, sending off a pre-defined message to a broker, and then going into a super low power sleep mode.
Because the firmware was designed with ESPHome, it’s very easy to modify and customize how you see fit. It also makes it very easy to integrate with Home Assistant, allowing you to fire pre-defined groups of actions or trigger anything you please in your Home Assistant setup.
The battery is charged through a magnetic charge cable, which is a nice touch. Because it uses the RISC-V version of the ESP32, power consumption is much lower, and with a fully charged battery it should last a long time between charges, depending on how often it’s used. Initial setup is done using an Access Point configuration – connect to the broadcasted WiFi network and upload the firmware customized with your home WiFi info and MQTT broker that you wish to communicate with. It’s an easy way to add a button to your home automation setup!