Raspberry Pi based thermostat system with web control interface (for heating)
These instructions will get you a copy of the project up and running on your local machine.
Tested on the next configuration:
Hardware:
- Raspberry Pi 3;
- DS18S20;
- 1 Channel Controllable Relay Board Module;
- Resistors
Software:
- Raspbian GNU/Linux 9.4 (stretch)
- Web server (Apache/Nginx)
- PHP >= 7.1.3 (required extensions: OpenSSL, PDO, Mbstring, Tokenizer, XML, Ctype, JSON)
- MySQL / MariaDB 10.1
How build a thermostat system with Raspberry Pi
Laravel installation issues
Composer installation issues
- Clone the code from the repository via Git or download the files to your Raspberry Pi;
- Set directories within the
storage
and thebootstrap/cache
directories writable by your web server; - Configure your web server's document / web root to be the
public
directory; - Run
composer install
orcomposer.phar
(if you don't have composer installed globally); - Configure Laravel key: run
php artisan key:generate
in the installation directory and set it toAPP_KEY
key of.env
; - Create a database on the Raspberry Pi (collation
utf8mb4_unicode_ci
); - Configure database connection in the
.env
file; - Set the language you need in the (
LOCALE
key of.env
,en
andru
values are supported); - Set your timezone (
TIMEZONE
key of.env
); - Set your GPIO pin for a relay (
GPIO_PIN
key of.env
); - Configure the DS18S20 sensor ID:
- in console run
cat /sys/bus/w1/devices/w1_bus_master1/w1_master_slaves
; - copy the value that starts from
28-
and paste it toSENSOR_ID
key of the application configuration file (.env);
- Run
php artisan migrate:refresh --seed
in the installation directory to update the database data.
- The active mode is highlighted with yellow;
- Configure modes for heating;
- If no mode is active at the moment no target temperature and mode title are shown;
- Laravel - The web framework used
- LaravelCollective Forms & HTML - Forms building tool
- Bootstrap - Toolkit for developing with HTML, CSS, and JS
- jQuery - A a fast, small, and feature-rich JavaScript library.
- Timedropper - A jQuery time plugin
- Dmytro Nozdrin - Initial work - https://nozdrin.net
The application is open-sourced software licensed under the MIT license.