PiHome Smart Heating controller required some task to be schedule on regular interval to function properly, add all following crontab jobs as root
Database Cleanup: Delete Temperature records older then 3 days. Delete Node Battery status older then 3 months. Delete Gateway Logs data older then 3 days. if you want to keep all data comments following line.
1 |
0 2 * * * /usr/bin/php /var/www/cron/db_cleanup.php >/dev/null 2>&1 |
Get CPU temperature and update database.
1 |
*/10 * * * * /usr/bin/php /var/www/cron/system_c.php >/dev/null 2>&1 |
Update Weather from OpenWeather, Make sure you signup to openweather api and update api key in database->system table.
1 |
*/30 * * * * /usr/bin/php /var/www/cron/weather_update.php >/dev/null 2>&1 |
Ping your gateway (home router) and if can not ping reboot wifi on Raspberry pi. make sure you modify /var/www/cron/reboot_wifi.sh with your gateway ip if you want to save log resuts un-commnets following line.
1 |
*/2 * * * * sh /var/www/cron/reboot_wifi.sh >>/var/www/cron/logs/reboot_wifi.log 2>&1 |
1 |
*/2 * * * * sh /var/www/cron/reboot_wifi.sh >/dev/null 2>&1 |
If you are using Wireless setup with Smart Home Gateway then you need following crong job to check and start Smart Home Gateway python script if its not running.
1 |
*/1 * * * * php /var/www/cron/check_gw.php >/dev/null 2>&1 |
If you have Temperature Sensors Wired to Raspberry pi GPIO un-comment the following line to read temperature sensors data.
1 |
*/1 * * * * python /var/www/cron/gpio_ds18b20.py >/dev/null 2>&1 |
If you signup for PiConnect – Simplify the Connected API Key you can save this key to PiConnect table to sync. your data with PiConnect this way you can mange your heating from http://www.pihome.eu/piconnect/ as todate this service is still under testing. email me at [email protected] if you need help or more information about this.
1 |
*/1 * * * * /usr/bin/php /var/www/cron/piconnect.php >/dev/null 2>&1 |