Build a Web connected raspberry pi thermostat and control your heating from any smart devices, PiHome comes with following two options one Wired to GPIO and wireless with nRF24L01.

I strongly suggest you to download PiHome Smart Heating img file for your raspberry pi with PiHome pre-installed and configured with all dependencies. You can download User Manual for PiHome Connection

Wired Heating System Connected to Raspberry Pi GPIO

nRF24L01 Wireless Heating System Based on MySensors Library

Step 1

OS (Raspbian Jessie) Installation and WiFi Configuration

Step 2

Install Apache, PHP and MySQL on a Raspberry Pi (LAMP)

Step 3

MySQL Access From Remote Computer

Step 4

Install git and then clone pihome project from GitHub to your Apache document root location.

sudo apt-get install git
sudo git clone https://github.com/pihome-shc/pihome "/var/www"

MySQL/MariaDB

If you set to MySQL users and password as per instructions then run setup.php from command line otherwise modify setup.php with correct MySQL username and password and save it.

If you are using using Raspberry PI LAMP image from here then you need to perform these steps to create MySQL Database username and password.

mysql -u root -p
CREATE USER 'pihome'@'localhost' IDENTIFIED BY 'pihome2018';
GRANT ALL PRIVILEGES ON *.* TO 'pihome'@'localhost' WITH GRANT OPTION;
FLUSH PRIVILEGES;

Run setup to install PiHome Smart Heating on your Raspberry Pi.

/usr/bin/php /var/www/setup.php

setup.php will create pihome database and then import table structure, create table view, save db config file with and create all relevant cron jobs.

Set your time zone on your Raspberry pi and then set time zone settings in your MySQL/MariaDB Database(pihome->System->Timezone).

Step 5 – 6 Depends on your choice of Wired to GPIO or Wireless nRF24L01 System

Step 5

For wireless setup enable Wi-Fi Smart home gateway from Settings->Gateway

Step 6

Build 18650 Battery Powered Temperature Sensors

Now brows to your raspberry pi IP address while connected to your home Wi-Fi and you should see page.  Default login username is admin and password pihome

PiHome Login Page

PiHome Login Page