Introducing the Hive Helper, a Xiao ESP32C3 based Home Assistant device that utilizes an epaper display.
Thank you to PCBWay for sponsoring the PCB used for this project. Their site makes it easy to order PCBs. The PCBs look great and were received with such a quick turn around time. I've had no issues soldering with them and boards I have used always come out exactly as I have designed them. PCBWay makes it very easy to get started with your own custom boards!
π Hive HelperI purchased several epaper displays from WeAct I sourced on aliexpress a little over a year ago. I have been meaning to use them in home assistant related projects but I didn't have a great way to mount the display. The large number of wires needed to get the screen running also acted as a deterrent as it makes it harder for a compact deployment. As such I decided to build the Hive Helper PCB and enclosure to allow me the freedom to allow me the ability to display these in my children's rooms to gather data while looking great.
β¨ PCBThe PCB is rather simple at its core and one most people could probably put together. The key element that sets it apart is the custom part I added for the footprint of the epaper screen. I exported the dimensions from the WeAct wiki to then use for the EasyEDA tooling.
Here is some more information:
- Utilizes a Xiao ESP32C3 (although most Xiao footprint would likely work if they match the same SPI pinout)
- Has pullup resistors for the i2c line of 4.7 Ohms on SDA and SCL
- Connects to the epaper display over SPI
- Has a button setup on pin D9
- Has TX and RX mapped to a Grove input allowing for UART
- Has 2 i2c Grove inputs for further expansion
- Built in AHT21 on the i2c line
Nothing too crazy just a nice little PCB for utilizing the epaper display in a compact way.
After your initial components are soldered use the spacers to keep the epaper display flat (it would otherwise bend in on one side).
After this solder the epaper display to the board as well. I used angular cutters to ensure the pins were short at this point to avoid any potential problems. These are later removed during the enclosure install process.
With the epaper display and Xiao ESP32C3 soldered you can begin testing. Skip ahead to that section if you don't want to use the enclosure otherwise follow along below.
π¦ Enclosure SetupAfter you have the parts printed and ready the next step is to prepare the screen for the enclosure. To do this remove the nuts from the screws and carefully reinsert the screws from the opposite side of the PCB. You may need to reinsert the spacer if it falls out while doing this.
With the screws inserted you'll want to place it into the front of the enclosure.
You should be able to see the screws sticking through the enclosure holes. The reason we did this was to keep the spacers in place which otherwise may have been difficult from the front directly. You can now insert the 3m 20mm screws into these holes pushing out the screws in there now allowing the screws to hang out the back of the PCB. You'll want to attach the standoffs you printed now to those screws. These help keep the PCB from being pushed inward when utilizing the button.
There are holes on the back plate to allow heat-set inserts to be added. You'll want to add these next to allow the device to get a hold on the back. To insert you simply use your soldering iron and put pressure on the insert as you push it down into the existing holes.
Now you just need to align the back plate with the screws hanging out from the front and screw them in. I suggest screwing a little at a time until you have a good hold on all of the screws. That's it the device is assembled.
π ESPHome SetupFirst you'll need to source the fonts I used for this project. They can be found here:
You'll need to place them somewhere accessible for ESPHome to use. I place them in a fonts folder under my ESPHome install on Home Assistant.
Next create a new device clicking "Continue" to proceed:
Insert the ESPHome yaml configuration making changes as needed for your own setup.
With that in place you'll need to setup new secrets set in the yaml file. For my own projects I rarely use secrets here and just rely on it in the yaml but opted to do such for this public one. You'll then need to install your ESPHome firmware.
In Home Assistant you can configure your ESPHome devices and choose the option to "Install":
The first time may want to run "Manual download" as you'll need to get the device programmed. My home assistant install is in another room so I usually do that as my option to make things easier. You can visit https://web.esphome.io/ in Chrome or Edge to then install this download.
Connect and install your downloaded file. After this you should be able to update the device OTA without any issues.
Your device will need a few more modifications to properly work with Home Assistant for displaying the weather information.
Note: you'll need to have the associated sensors I used hooked up to get the full experience or they may show empty content on your epaper display. The fire alert and four gas sensors and the second page of the display can be altered as needed for personal use depending upon what you want to show.
π Home Assistant SetupYou'll need the met.no add-on for fetching weather information if fully following my tutorial:
You can follow the configuration steps outlined in the home assistant page for the add-on to get this fully setup.
Once the weather data is setup install and use the Home Assistant "File editor" add-on you are able to modify your configuration to add the new sensors.
Copy the yaml contents to this location to begin fetching the weather data.
Add the ESPHome device to your devices and using its UI configure the option to allow the device to communicate with Home Assistant:
You should be set now and your device should be able to fetch weather information from met.no and display it on the screen.
π Demo ApplicationTo best test this application I decided to go the practical route and include sensors I'd want in my children's room. Namely I included logic in the demo for the multichannel gas sensor from Seeed Studios and their Grove flame sensor.
The sensor values are shown in the home assistant UI updating every 10 seconds (as set by the yaml). In addition the button presses and flame status are kept in sync here as they are triggered.
π Special Thanks- Again, I'd like to thank PCBWay for sponsoring the PCB
- wifwucite for providing the ESPHome component for the multigas sensor I used, MIT License
- Ryoichi Tsunekawa for the Bebas Neue font, SIL Open Font License
- Pictogrammers for the Material Design Icons font, Apache 2.0 License
Comments