Skip to content
This repository was archived by the owner on Feb 21, 2022. It is now read-only.

InstallationTimeSync

Alexander Thoukydides edited this page Mar 19, 2015 · 3 revisions

Automatic Time Synchronisation

Once rudimentary communication with the thermostat has been confirmed by following the Basic Setup it is possible to setup automatically synchronising the thermostat's clock to that of the computer on which this software is installed. If this is done then it is advisable to ensure that the computer's clock is itself set automatically via NTP.

Set Time Manually

First try running the script manually to ensure that it is installed properly:

~/heatmiser-wifi-read-only/bin/heatmiser_time.pl -v

If everything is working then it should output something like:

heatmiser

Before: 2012-04-15 17:39:45 Computer: 2012-04-15 17:37:31 After: 2012-04-15 17:37:31


This shows that the thermostat's clock has been adjusted slightly to match that of the computer.

## Add a Cron Job ##

Edit the crontab file:
```bash
crontab -e

This should start an editor with the current contents of the crontab file. Add a new line to synchronise the time automatically once a day (at 2:02am to correct quickly for the start and end of summer time):

02 02 * * * /home/user/heatmiser-wifi-read-only/bin/heatmiser_time.pl

where user should be replaced as appropriate.