Introduction: HestiaPi Touch - Open Smart Thermostat

About: Hacker, maker and fixer on electrical, electronic and woodworking projects.

About HestiaPi Touch

HestiaPi Touch is a completely open source smart thermostat for your home. All digital files and information are available below and our main website.

With it, you can monitor your home’s temperature, relative humidity, and atmospheric pressure. You can also control your heating, ventilation, air conditioning, hot water, and more from anywhere you have an Internet connection. You can do all this securely and with confidence your private data stays private. HestiaPi Touch is compatible with many devices and home automation systems and can serve as a central point of control that ties them all together in your home.

Previous model

HestiaPi Touch is the result from the feedback we got from our previous successful instructable. So this may be the reason the name may sound familiar ;).

Crowdfunding campaign

HestiaPi will be running a crowdfunding campaign till the 2nd of July to fund the latest model offering all latest features. Your support will mean a lot to the open source community fighting against consumerism giants. Please use this link:

https://www.crowdsupply.com/makeopenstuff/hestiapi...

Let's dig right into it...

Step 1: PCB Components

See BOM for details.

  1. BME BME280, output signal Digital Signal; power supply 3.3-5.5V DC
  2. K2 – Heating Relay OMRON PCB Power Relay – G5LE contact rating 125VAC @ 10 AMP / 30VDC @ 8 AMP; switching circuit SPDT; package THT; variant variant 2; voltage 12V; part # G5LE-1
  3. K1 – Hot Water Relay OMRON PCB Power Relay – G5LE contact rating 125VAC @ 10 AMP / 30VDC @ 8 AMP; switching circuit SPDT; package THT; variant variant 2; voltage 12V; part # G5LE-1
  4. H Humidity contact Unprotected I/O. Do not connect directly to a relay!
  5. U1 Power supply HLK-PM01
  6. D1 Rectifier Diode type Rectifier; package Melf DO-213 AB [SMD]; part # 1N4001
  7. D2 Rectifier Diode type Rectifier; package Melf DO-213 AB [SMD]; part # 1N4001
  8. Q1 PNP-Transistor type PNP; package SOT-23 [SMD]; part # 2N2222
  9. Q2 PNP-Transistor type PNP; package SOT-23 [SMD]; part # 2N2222
  10. R1 1.2kΩ Resistor tolerance ±5%; package 1206 [SMD]; resistance 1.2kΩ
  11. R2 1.2kΩ Resistor tolerance ±5%; package 1206 [SMD]; resistance 1.2kΩ
  12. J1 RaspberryPi Zero or Zero W Any version

Step 2: PCB Preparation

Tools needed

  • Your favourite soldering tools
  • 3mm drill bit
  • Pliers
  • Wire cutter

Mechanical preparation

In order to save space, the black protruding camera connector's plastic lock needs to be removed by force. Pull by hand one side first, then the other one and remove.

For easier assembly with the case by the supplied screws and nuts a 3mm
drill is advised to be used for clearance on the 4 holes on the RaspberryPi.

Step 3: Soldering Order

  1. If your RaspberryPi came with headers presoldered you will need to remove the last 4 (2 and 2) from the right hand side as shown above. Add some solder at the bottom and gently push in. You don't need to completely remove the pin. Just make sure it does not protrude and lays flat on the HestiaPi PCB.
  2. Solder the reset button in the RUN pins on RaspberryPi with the button facing the GPIO pins, up. It may touch the two GPIO pins but this will not affect anything. It has a 2.5mm spacing while the RUN pins 2.54mm so it may be a bit tight. Be careful not to bend the legs.
  3. Solder the male 2x18 pin header starting from RaspberryPi's pin 1, on the left, leaving 4-pin space, on the right, for the reset button to be pressed. Take extra care and the right soldering temperature in order to leave the least solder on the pins. The pins at the bottom will need to enter through the PCB too so if too much solder is used, they will not fit.
  4. Align, starting from pin 1, the PCB and the RaspberryPi with the male header already soldered. Make sure the 4 fixing holes of the PCB align with the 4 fixing holes of the RaspberryPi. Keep them tightly pressed until you solder 4 pins on left end and 4 pins on the right. Then solder the rest.
  5. Solder the terminal block, the power supply and the relays, ideally in this order.
  6. If you design your own case and space is plenty, solder the 2 female 1x4 headers on the PCB (labeled BME) and BME sensor. Otherwise bend and solder the dupont 1x4 wire directly to the PCB and BME sensor. VIN to +, GND to -, SCL to SCL and SDA to SDA. The Hex case has a tight sensor compartment at the bottom and some people have pulled the connectors apart by accident stopping temperature readings.
  7. Align the LCD to pin 1 and press gently all the way down. If you are using the Hex case, the LCD needs to be secured to the cover first.

Hints and tips

The LCD needs to be connected before powering HestiaPi as it initialises on boot only (otherwise it looks blank-white and touch events do not register) and it may also cause a freeze or reboot due to power spike. If you cannot control mains, that is having it off during all the time of installation, our advise is to leave the SD card and LCD out, connect all 4 wires (Neutral to N, Line to L, Water to W and Heating to H), partly (not fully) insert the SD and finish off case installation with the LCD attached to the cover.

Once all is done, from outside of the case, push first the SD all the way in (it does not lock-click in place) and then insert a non-metallic tool and press the reset button. HestiaPi will boot and in about 10-15sec the LCD will show some of the boot messages.

Step 4: Printing the Case

Printing the case really depends on your own printer but here are some basic guidelines that you can adjust accordingly.

Files

Download the latest set of .STL files from our Github here.

Filament

Choose a filament that stays rigid enough in the max temperature your house may reach on a hot Summer day without the AC on :)

We use nGen filament for this reason but also because it prints easily and reliably.

Settings

Layer Height 0.2 mm

Wall Thickness 1.5 mm

Top Thickness 1 mm

Bottom Thickness 1 mm

Cover specific settings

Orientation: Print with face down

Generate Support CHECKED

Support Placement Touching Buildplate

Support Overhang Angle 60° (to avoid supporting chamfers)

Base specific settings

Orientation: Print with wall side down

Generate Support UNCHECKED

Step 5: Wall Installation

HestiaPi's case comes in 2 parts. The backplate that goes
to the wall and should not be visible and the front cover. The backplate should have 4 small holes, 4 larger holes and an opening for the wires coming from the wall.

If you bought HestiaPi, all necessary screws are included. Otherwise you would need:

  • 4 x 2.5Mx25mm hex screws
  • 4 x 2.5M hex nuts
  • 4 x 3.5Mx40mm non-countersunk screws

Place the hex screws through the 4 small holes entering from the side facing the wall. Secure them in the hex slot and make sure they are sit flush. Remove the LCD from the PCB and insert the PCB alone guiding the 4 screws through the 4 corner holes of the Pi and secure with the nuts. Avoid using a large tool. You can simply tighten them by hand. Don't overtighten.

With the remaining 4 larger holes mark your wall and drill according to the location of the wires. The opening of the backplate should match the location of the wires. Secure the backplate and PCB with the 4 larger screws.

Complete wiring according to your model instructions.

Remove any protective film from the LCD if present and lock the LCD on the cover from the inside making sure the LCD's header is at the top.

Guide the 4 wires through the slit of bottom partition of the cover and secure the sensor in it so that it is thermally protected from the rest of the circuit.

Hold the front cover aligned to the backplate and bring closer while you make sure the pin header of the PCB is aligned to the header of the LCD. Push firmly from the sides of the cover and not from the LCD till it locks in place.

Step 6: Software Installation

To make it easier for new users, HestiaPi offers ready-to-burn image files for your SD card.
If you bought your HestiaPi with an SD card, skip this step.

Prepare a new SD card

With the image file downloaded, you need to use an image writing tool (we prefer Etcher from below links) to install it on your SD card. You can't simply copy-paste it. If you downloaded a ZIP version, unzip the .img file first before the next step.

Choose the right guide for your system below (courtesy of Raspberry Pi website – thanks):

  • Linux
  • Mac OS
  • Windows (avoid if you can as people have reported issues flashing their card from Windows)

Step 7: First Boot

Fix your HestiaPi's case to the wall first. If you simply want to test-drive HestiaPi before committing to it, connect the LCD first and then plug in a Micro USB cable to the Pi's port.

  1. Insert the MicroSD card back in the Raspberry Pi. Just push it in. It does not click. It does not lock in place. A tiny part of it will stick out just enough to grab and pull it if needed.
  2. Insert the LCD in the cover. Turn and push it in place. It should feel firm in place. Remove the protective film if present.
  3. Take all necessary precautions before applying mains voltage so cut off the power now!
  4. Connect Heating, Cooling, Fan and Hot Water (depending on model) control lines on the terminal block’s top contacts.
  5. Connect mains wires on the bottom contacts, marked L and N.
  6. Place the sensor at the bottom compartment of the cover and fit the 4 wires in the vertical slit. Note that the sensor, the little shiny square, should be placed facing outwards and ideally not be blocked by any plastic piece of the case.
  7. Push gently the cover against the 2 hooks of the base aligning at the same times the pins with the LCD connector. The cover should lock when pushed all the way in. Step back and enjoy the new looks of your wall :)
  8. If you cannot cut off the power on the cables, you are risking of HestiaPi booting before the LCD is connected. In such a scenario the LCD will not display anything but a blank white screen and you would need to restart as it is not "plug and play" like HDMI. We would advise to leave the SD card out before applying mains voltage and just before you are about to close the case, insert it but don't restart. It shouldn't boot. Once you close the case, there is a chance that it will restart. Close the case and wait 20 seconds. If nothing shows up on the screen, it didn't restart. Use something long like a screwdriver but non-conductive and press reset button. In some models it is located on the right of the LCD connector facing up. In other models it is on the right side.
  9. If at any time you want to remove the top case, there is one small round hole on each top and bottom edge of the case that push the internal hooks that keep the top case with the back plate secured. Use a pin or paperclip to push each side at a time but be gentle. Only a 2-3 mm push is needed to release them. This is a 3D printed case and not super flexible ABS.
  10. You should soon see the HestiaPi boot sequence and the loading screen at the end with a countdown. Follow these steps to connect your new HestiaPi to your WiFi.
  11. After a few seconds the screen will show if the WiFi is connected and what is the local IP it got (DHCP).
  12. The full installation may take up to 20 minutes for the very first time and a few restarts are normal. Just leave it alone. You can always SSH to it. Use pi/hestia
  13. The SD card image expands automatically to occupy the complete size of the card if available.
  14. While waiting, head over to the downloads section and download the smartphone app on your phone. Under settings set Local OpenHAB URL as http://[hestiapi_IP]:8080 and close the application.
  15. Once the LCD is showing the UI, try and load the app again or simply use your laptop and navigate to: http://[hestiapi_IP]:8080 and select “Basic UI”
  16. You should now be able to control the basic functions from either the App or your laptop.
  17. Configure your local time (UTC by default) via SSH using the raspi-config command.
  18. Please note that the UI of app, web and LCD change with some software updates so back up your customisations before running an update.
  19. OpenHAB2 has a great forum with so much information from fellow users. Salivate at what you want to make now with it.
  20. Feel free to explore the files under /etc/openhab2 names default.* in folders items, rules, sitemaps and things.

Step 8: Connect WiFi

As of 10.1 version (July 2018), you can now connect your
phone to the "HESTIAPI" network with HESTIAPI as the password. Once connected you will automatically be prompted on your phone to select your WiFi network (no hidden SSID supported yet) and enter the password. Your HestiaPi will restart to connect to your network and the HESTIAPI network will not be shown again if the details were correct.

For older versions only see below:

Insert it in your non-Windows laptop and change the file

/etc/wpa_supplicant/wpa_supplicant.conf

by entering you WiFi’s SSID and password inside the "".

If your network is using a hidden SSID uncomment this line:

# scan_ssid=1

If you only have Windows machines, from v9.2 onwards, HestiaPi comes preconfigured to connect to a default network with SSID: "HESTIAPI" and password "HESTIAPI" (both without the quotes). All you need to do is create a WiFi network with these details before connecting power to your HestiaPi Touch. Once booted, HestiaPi Touch will connect to it automatically where you can SSH into it and change "HESTIAPI" to your regular WiFi network details. Make sure you enter your details correctly.

If even this is not possible user dexterp37 (thanks!) found some very good alternatives.

Step 9: Support & Documentation

Please find all related info in the dedicated links below:

Crowdfunding campaign

HestiaPi will be running a crowdfunding campaign till the 2nd of July to fund the latest model offering all latest features. Your support will mean a lot to the open source community fighting against consumerism giants. Please use this link:

https://www.crowdsupply.com/makeopenstuff/hestiapi-touch

IoT Challenge

Participated in the
IoT Challenge