loading

/* First instructable here, so be nice :) */

Okay, there are too many open source home automations out there but whenever I tried to look into making any of these I ended up with a bitter taste because of one or a few of the following reasons:

  • The software part was open but the hardware was based on boards either too complicated to produce myself economically or simply proprietary that I could only buy ready
  • The sensors/parts were too expensive
  • It was too ugly for my living room

So I started from scratch by listing my requirements:

    • It has to be open source and open hardware as much as I can
    • It should not rely on external web/cloud/log servers
    • I want to control heating independently
    • I want to control hot water independently
    • I want to be able to monitor and control it over the internet (from work basically)
    • I want to be able to add more functionality later
    • I want to be able to control it "old-school" with its buttons and screen while in the house without the need of a smartphone at hand
    • I want to be able to not only schedule it for regular usage but also to manually override it and set my own

    With all the above requirements and after some prototyping, experimenting, failing and experimenting again I decided:

    1. RaspberryPi should be the main board running plain old raspbian
    2. A cheap 1602 LCD display should be enough for my needs
    3. 4 buttons should be enough (Heating boost, Hot water boost, Temperature+, Temperature-)
    4. A custom shield-type board should be produced compatible with most RasPi variants/versions
    5. A pretty enclosure should be purchased to stay pretty - so this will be the non open source part of this ible, sorry (I'm working on a 3D printed case)
    6. Its name will be HestiaPi - derived from the Greek goddess of home hearth, warmth and heating

    Step 1: So What Is HestiaPi?

    So what is HestiaPi?

    • HestiaPi is a box, similar to what many home thermostats look like
    • You fix it on the wall where your old thermostat used to be
    • It connects to your old heating/hot water wiring
    • It connects to the Internet over WiFi
    • Inside it is a credit card sized computer running Linux
    • No additional system is running anywhere else on the internet and no other computers are required to run any other programs. Everything is hapening right inside that box!

    Sounds fun? Let's build one! Here is what you will need.

    Hardware

    • 1 x RaspberryPi (version A, A+, B, B+ and B2 are all fine but prefer B2 as its faster) - 27GBP
    • 1 x 4GB MicroSD card (Full SD if you plan to use an old RaspberryPi A or B) - 4GBP
    • 1 x Power supply for mains that provides 5V and at least 2Amp - 5GBP
    • 1 x HestiaPi shield - 24GBP or make it yourself
    • 1 x Enclosure box - any that fits (don't need to buy ours 22GBP)
    • 1 x USB WiFi dongle (optional) - 6GBP

    Total: 36GBP for our makers - 88GBP for the lazy people

    Software

    All the programs running are stored in the MicroSD card and inserted inside the RasPi. The only configuration you need to change is your WiFi network name (SSID) and password.

    So let's start!

    Step 2: Quick Setup (for the Experienced Makers)

    For those who just want it done follow this guide. The rest who want all the details visit the next step.

    4GB MicroSD card

    Download the image file first and write it on the card (instructions)

    Once all is done, leave the card to the side and move to the HestiaPi shield.

    HestiaPi shield

    Double-sided PCB file (GitHub) in PDF, Gerber and SVG formats (Fritzing format, more info here)

    Components list PDF.

    Assemble

    1. Insert the SD card inside RasPi
    2. Push the HestiaPi shield on the RasPi aligning the first pins first (pin1 and pin2)
    3. Push the relay module to snap in place with the HestiaPi shield*
    4. Connect USB WiFi dongle
    5. Connect power
    6. Wait for boot
    7. Find HestiaPi's IP (see next step if you don't know how)
    8. Open your browser to this IP

    * Please note that the reset function requires a 2 pin female header to be soldered on Raspberry Pi (on A+, B+ and B2 models).

    We have skipped the wiring to your home as if you don't know how to do it yourself it is best for everyone to leave it to a professional or someone who does know. The relay module offers two independent volt-free changeover contact relays so you decide what is best for you.

    Step 3: Detailed Setup

    This is just the previous step but with more details this time.

    4GB MicroSD card

    The fastest way to get all the needed files inside your card is by copying what is called an *image* file that I have prepared. This is a different process to just copy-pasting the files from your computer and it will not work by simply doing that. It requires one additional little program that you may already have and a computer.

    Download the image file first (3.9GB) from the bottom of the page and then follow the detailed instructions from the link on this page for Linux, Windows or Mac on how to write it on the card.

    Once all is done, leave the card to the side and move to the HestiaPi shield.

    HestiaPi shield

    You will need to make a double-sided printed circuit board (PCB) for this step. Instructables has a ton of ideas on how to make PCB, the cheap way, or in very professional level depending on how much time you have and what finishing quality you are aiming for. I am not going to go into details on how to make PCBs here as its out of scope. Please do your googling if you are a beginner.

    No matter what method you choose though you will need at least one of the available formats I have prepared for you. Copper, silkscreen and mask layers are all there!

    Once the PCB is ready, get your shopping list (HTML | PDF) for all the components needed.

    Final step is to solder all the components* following the Label ID each one has and finding it on the silkscreen map on each side of the PCB. Please note that some components are very small and you may need tweezers. Again, learning how to solder is not what this 'ible is about so practise first or visit a local hackerspace/fablab where people usually help each other learning new skills.

    Case

    The case can be a tricky part. You need to fit everything together, make an opening for the screen, the 4 buttons, the 2 LED and the reset button. Ideally you will also need to move the temperature sensor to the furthest possible from sources of heat like the CPU of RasPi and the power suppy module. It is also good practice to have one surface of the sensor in direct contact to the outside air to get the best reading of the room temperature (see photo). Buying the case is the easiest way but the whole point is making *your* case the way you want it. There are cases where people may embed it inside cupboards or whatever their house has to offer. Your imagination is the limit! 3D printing it is of course the way ahead and we will soon have sketch files for you ready to print yourselves.

    Assemble

    1. Insert the SD card inside RasPi
    2. Push the HestiaPi shield on the RasPi aligning the first pins first (pin1 and pin2). See previous step photos
    3. Push the relay module to snap in place with the HestiaPi shield*. See photos here
    4. Connect USB WiFi dongle
    5. Connect power
    6. Wait for it to boot
    7. Find HestiaPi's IP (see next step on how to do that)
    8. Open your browser to this IP

    * Please note that the reset function requires a 2 pin female header to be soldered on Raspberry Pi (on A+, B+ and B2 models).

    We have skipped the wiring to your home as if you don't know how to do it yourself it is best for everyone to leave it to a professional or someone who does know. The relay module offers two independent volt-free changeover contact relays so you decide what is best for you.

    Step 4: Configuring HestiaPi

    Finding HestiaPi's IP

    I hope you know what does IP mean :) You don't need to know much more about networks.

    If you are not familiar with the way RasPi works this part can be tough but we have made this very easy for you. All you need is an Ethernet cable (see photo).

    Open HestiaPi's case and connect one end to HestiaPi's Ethernet port and the other end of the cable to your laptop.

    Once this is done open your browser on your laptop and enter this address.

    http://myhestiapi.com:8080

    If you don't have an ethernet port at your laptop connect it to the device that provides your home network. This is usually your WiFi modem. Then try any of the following:

    http://192.168.1.32:8080 or http://192.168.2.32:8080

    STEP 1:

    Click on "Configure Client".

    STEP 2:

    Click on "Scan for Networks" and wait for the scan to complete.

    STEP 3:

    Click on "Connect to this network" next to the name (SSID) of your network.

    STEP 4:

    Enter your password (1) and click Save (2).

    STEP 5:

    Wait for the WiFi settings to be saved successfully (1) and write down the address shown (2). This is HestiaPi's IP address, i.e. 10.10.10.52. We got it!

    STEP 6:

    You can now remove the Ethernet cable and have your laptop connected to your WiFi.

    It is advisable to restart your HestiaPi now simply by removing its power, waiting a couple of seconds and reconnecting it. HestiaPi needs about 1 minute to start for the first time. Once it starts check the screen. It should show your WiFi network name and the IP address we found from Step 5. If the screen goes dim, press any button to light it up again.

    STEP 7:

    All the hard work is now over! Head over to that address from Step 5 and you should see your HestiaPi alive for the very first time!

    Step 5: HestiaPi - the Web Interface

    The main page of HestiaPi is almost self explanatory. Here is a short "user's manual"

    1. Current time
    2. Current room temperature (it was Summer during this screenshot :) )
    3. Reduce desired temperature by 0.5 degree
    4. Increase desired temperature by 0.5 degree
    5. Desired temperature
    6. Current Heating status - Grey means OFF, Red means ON
    7. Current Hot Water status - Grey means OFF, Red means ON
    8. Manual boost/override for heating
    9. Manual boost/override for hot water

    Manual boost is the way to ignore the schedules and start right now the heating or the hot water. It can also be used if schedules is not your thing.

    Both manual boosts, once pressed, bring out a popup to ask you for how long you will want it on. To save you time, your last choice is already selected so if you want the same as last time, just press "Toggle" (see screenshot). Within a couple of seconds the following will happen:

    1. You will hear a click from HestiaPi meaning the function is enabled
    2. The LCD on HestiaPi will lit and a countdown will show how much time is left for the override
    3. The indicator on the web interface (6, 7) will turn red
    4. A countdown next to the manual override button will show how much time is left for the override

    You can cancel the manual override anytime by pressing the same button.

    Step 6: HestiaPi - Up and Running! [VIDEO]

    That's it! HestiaPi is successfully installed and set up.

    You can now use it with the buttons and screen (old-school) or from your phone.

    The web interface allows you to also setup complicated schedules.

    Schedules like "every weekday morning have hot water at 8am and set the temperature at 21C from 8am to 9am". This can be set in 1 step!

    HestiaPi also supports groups of schedules so that you can group individual schedules and enable or disable them all at once. This can be very handy for people with shift works so that they can have one group for working mornings and another group for evenings. That way they can enable whichever they want with one click!

    The web interface allows you to check and change some settings. You can also check for available software upgrades. More features get added all the time!

    As it is open source you can easily hack it to do what YOU want it to do, like our friend Nancy who hacked the web UI to control its Christmas lights instead (see video below)!

    Feel free to ask any questions you may have as I understand it is a bit complicated project involving both software and hardware (which is the best mix for my taste :) ). All your questions and comments or suggestions help us get better so keep them coming and we will try to answer all of them!

    Step 7: Troubleshooting

    Here is a short troubleshooting guide for the common problems. Use the forum on our website for further assistance.

    Problem: I start HestiaPi but nothing happens even after 3 minutes.

    Solution: Sounds like there is a problem with the SD card. Make sure you followed the steps about writing the contents of the card correctly. Repeat the process if necessary. Make sure all connections are good. Make sure RasPi lights blink for the first minute.

    Problem: myhestiapi.com does not work
    Solution: This website is a tool available only during setup with an Ethernet cable connected directly to HestiaPi

    Problem: myhestiapi.com does not work

    Solution: Make sure you have DHCP enabled in your Ethernet settings on your laptop

    Problem: Schedule or manual boost override for heating start but heating remains off.

    Solution: Desired temperature is set to a value higher than the current one. Increase desired heating.

    Problem: I start HestiaPi but the relays go crazy after about 1 minute
    Solution: What actually happens is that HestiaPi thinks you press its buttons about 4 times per second so it tries to catch up with your speed. This is a common problem that can happen in 2 cases. Case 1. You were too lazy to read the instructions and you just started your RasPi with the SD card image only without the shield snapped on it. The GPIO pins (if the shield is connected) are normally pulled high, that is +3.3V reach each button GPIO when no buttons are pressed. When a button is pressed, its GPIO is connected to ground (GND, 0V). So when you have no shield attached to the Pi, it thinks that you keep all the buttons pressed as they are floating and they are not connected to +3.3V. Solution for case 1, I believe is obvious. Don't start HestiaPi before attaching all hardware. Case 2. You tried to produce the PCB yourself and you either forgot resistors R1, R2 or one of your copper tracks is not connected. Solution for case 2, is also obvious :)

    Problem: All above do not cover my case

    Solution: You will need to enter debugging mode by first opening an SSH connection (use PuTTY) to the IP you got from step 4.

    Username is

    pi 

    password is

    hestia

    then enter the following commands

    sudo service boilercontrol stop
    

    cd /opt/boilercontrol/

    sudo ./run.sh

    Now you can read on the screen additional information about what is happening behind the fancy LCD and web interface. Once you are done, simply restart RasPi or type:

    q, ENTER
    
    sudo service boilercontrol start

    Step 8: Whats Next - Fututure Improvements

    From our website (hestiapi.com/features) we try and get some feedback on what real users want. Here are some of the top requests we have so far. Each time a new development cycle starts one of the top is chosen to be implemented! Feel free to thumbs-up or suggest your own in the link above.

    SmartPhone App
    Native Android and iOS application for my phone/tablet to access and control my HestiaPi remotely easier than the web interface. Well that's actually very close to be launched. Here is a little teaser using OpenHAB:

    Humidity
    Show current indoor relative humidity. Maybe even log it and plot it against time along humidifier status and heating.

    Wireless relay for remote units
    My hot water is in a different room/system and I am not planing on running a cable accross the room

    Wireless temperature sensor
    Additional wireless temperature sensor for upstairs/bedroom

    Temperature Logging and charts
    Allow logging for temperature values and plot them in charts of variable period of time ideally along heating status changes.

    Comfort/Eco/AntiFreeze Modes

    Modes like comfort, eco and anti-freeze are very helpful

    GSM SMS alternative/support

    For remote homes with no fixed internet line send commands via a simple SMS

    WiFi extender

    Allow HestiaPi WiFi to operate in AP mode and act as a WiFi extender for rooms with poor reception

    <p>Full demo video added! Have a look (in step 1)</p>
    <p>Helllo! Great work :) Where can we buy the PCB Board? Is this possible? </p>
    <p>Thank you Jonathan :) Please use our website for info about what you need.</p>
    <p>I enjoyed building the Hestia Pi project. I managed to get it to fit into a 4X3 1/2 inch food box by using an external wallwart PSU and a Pi Zero.</p><p>The interface board was handwired using double sided prototype board as shown. The relay board was the same as the original design.</p><p>The code in the image would not run on a Pi Zero, I had to put the SD card in a Pi B and run </p><p>sudo apt-get update</p><p> sudo apt-get upgrade</p><p> sudo apt-get dist-upgrad</p><p>The only other issue was that /var/cache was mounted as a RAMDISK with a max size of 50MB and this is not enough after the upgrade.</p><p>Rather than try to increase it, I commented out the relevant line in /etc/fstab</p><p>My Bill of Materials may be of intrest:</p><p>pi zero + 8GB micro sd card and unavoidable shipping from <a href="http://pimoroni.com/" rel="nofollow">pimoroni.com</a><br>&pound;13 <br><br>The rest from Ebay free shipping in all cases <br><br>1602 LCD display <br>&pound;1.38 <br><br>wifi dongle <br>&pound;1.33 <br><br>2 channel relay board <br>99p <br><br>Dallas DS18B20 temp sensor 99p, but that was a pack of two so <br>50p <br><br>Prototype board &pound;2.35, but that was a pack of 10 so <br>24p <br><br>male &amp; female header strip pairs &pound;1.75 but that was ten pairs and I <br>needed two so <br>35p <br><br>Tact switches 99p but that was a bag of 20, four needed so <br>20p <br><br>Total <br>&pound;17.99 (22.53 USD)</p><p>Pinched the plastic food box from the kitchen so that doesn't </p><p>count. </p>
    <p>That's the spirit! Congrats! Maybe you should have checked our <a href="http://hestiapi.com/" rel="nofollow">website</a>(<a href="http://hestiapi.com/" rel="nofollow">http://hestiapi.com</a>) before proceeding with your project as we have evolved to a touch screen version with lots of new features coming soon like wireless and/or multiple sensor, humidity control and more. Full instructions are already available for free and once we get a chance we will post a new instructable here. This is how it looks in a newly designed 3D printable case!</p><p>Very well done!</p>
    Awesome, this is absolutely something that I plan to build for my own home, running home assistant separately on my private server. Added to my favorites!
    <p>Thanks gfeikens. I think you will like even more the new touch screen model coming up: http://www.hestiapi.com/news</p>
    <p>We are in the WINNERS! THANK YOU!</p><p>Here is our gratitude:</p><p>Promised Smartphone App almost ready (video added in step 8 too)</p><p><a href="http://www.hestiapi.com/news" rel="nofollow">http://www.hestiapi.com/news</a></p>
    <p>Great project! IoT devices for our homes must be open hardware and with free software otherwise we will run into many problems if companies control them. I will be making this soon as it seems very well documented! Got my vote! :)</p>
    <p>It is so obvious that being open is the way ahead. We so share your thoughts. THANK YOU for your vote! 7 days left!</p>
    This looks great! I've been wanting a smart thermostat (who doesn't?) but the British Gas Hive and Nest Thermostat are so expensive&hellip; I think I might have to make this over summer!
    If you can make it why buy closed proprietary black boxes? Free lifetime repairability and hackability included in HestiaPi ;)
    <p>This is a great first instructable! That web interface looks great!</p>
    It is designed to look good on small screens, like phones. We all know how crap it feels to zoom and pan those old design pages on our phones. Lighter responsive design is also on the ToDo list to make it look even better but first native Android and iOS application is the next thing coming up. Glad you like it. Thinking about making it?
    By adding more relays I assume the program could be modified go control AC as well?
    I think there are 5 or 6 spare GPIO contacts so all these can be relays!
    If the AC unit can be controlled via a relay contact then yes but keep in mind that at the moment the function is for heating only and a winter mode is to be added so you can use HestiaPi for cooling too. I th
    <p>nice job. very professional</p>
    Great job on your first instructable. Very well made and thoroughly explained.
    <p>Thank you Saiyam! A few minor improvements on their way...</p>

    About This Instructable

    13,124views

    273favorites

    More by gulliverrr:Real Time Clock (RTC) with LinkIt ONE Fish Tank temperature realtime visualiser Turn your HTPC on from your couch 
    Add instructable to: