- Powered by Raspberry Pi
- Used in combination with a regular room thermostat
- Reads the temperature through a HomeWizard smart home module
- Uses Pushover to alert you if something goes wrong
- The last measured temperature, target temperature, override status, heating status, humidity and the time at the last update are stored in a MySQL database
- thermostat.php runs every 5 minutes, controls the GPIO and updates the database
- The web interface uses javascriptm, which interacts with the database through data.php
This requires a working installation of Apache, PHP5 and MySQL with CURL.
- Install WiringPi and compile the GPIO utility
- Enable the PHP Phar extension
- Import WTherm.sql into phpMyAdmin
- Copy the WTherm folder to /usr/local/bin
- Edit the
config.php
- Test your configuration by adding a user:
php5 adduser.php username password
- Copy the www folder contents into your website location (normally /var/www)
- Allow your Apache user to execute PHP scripts as root:
Add
%www-data ALL=(ALL) NOPASSWD: /usr/bin/php5
to /etc/sudoers - Add the startup script
php5 /usr/local/bin/WTherm/startup.php > /dev/null
to /etc/rc.local - Set the thermostat script to run every 5 minutes:
Add
*/5 * * * * root php5 /usr/local/bin/WTherm/thermostat.php >> /usr/local/bin/WTherm/wtherm.log
to /etc/crontab - Set the archiving script to run every hour:
Add
0 * * * * root php5 /usr/local/bin/WTherm/archivelog.php >> /usr/local/bin/WTherm/wtherm.log
to /etc/crontab - That's it! Try it out :)
The source code and design files for this project are released under the MIT license. For more information, please view the LICENSE file.