mdsh.com/wiki


RecentChanges

TextFormattingRules
AllWikiTopics
OrphanedWikiTopics
ToDoWikiTopics
WikiLockList
RSS
Export2HTML

WikiSearch

SetUsername

StartingPoints
Home
Heatmiser @May 27, 2013 11:45:36 AM

Install and basic configuration of the Heatmiser software

Adapted for server style installation from: http://code.google.com/p/heatmiser-wifi/wiki/InstallationBasic
Get the software required to get the Heatmiser software:
$ sudo apt-get update
$ sudo apt-get install subversion


Get the Heatmiser software:
$ cd /usr/share
$ sudo svn export http://heatmiser-wifi.googlecode.com/svn/trunk/ heatmiser-wifi


Install required modules for the Heatmiser software to run:
$ sudo apt-get install -y libxml-simple-perl libjson-perl
$ sudo cpan CGI Cwd DBI File::HomeDir Getopt::Std IO::Socket JSON LWP::UserAgent Proc::Daemon Proc::PID::File Time::HiRes XML::Simple

Answer yes to any questions about whether the tool should configure itself and choose mirror sites automatically

Test with command line parameters:
cd heatmiser-wifi
$ bin/heatmiser.pl -h <HOST> -p <PORT>


Configure, and test again:
$ vi /etc/heatmiser.conf
# These settings are used by the Perl software for connecting to the Heatmiser thermostat
HOST <HOST>
PIN <PORT>

For all configuration options see: http://code.google.com/p/heatmiser-wifi/wiki/ConfigurationOptions
$ bin/heatmiser.pl

Run as Daemon

Get the software requireed to run as a daemon:
sudo apt-get update
sudo apt-get install mysql-server


Create MySQL account
$ mysql -u<ROOT_USER> -p<PASSWORD>
mysql> CREATE DATABASE heatmiser;
Query OK, 1 row affected (0.02 sec)

mysql> CREATE USER 'heatmiser'@'localhost';
Query OK, 0 rows affected (0.15 sec)

mysql> GRANT ALL ON heatmiser.* TO 'heatmiser'@'localhost';
Query OK, 0 rows affected (0.04 sec)

mysql> QUIT;
Bye


Test connection to MySQL:
$ mysql -u heatmiser heatmiser
mysql> SHOW DATABASES;
+--------------------+
| Database |
+--------------------+
| information_schema |
| heatmiser |
+--------------------+
2 rows in set (0.00 sec)

mysql> SHOW GRANTS FOR 'heatmiser'@'localhost';
+------------------------------------------------------------------+
| Grants for heatmiser@localhost |
+------------------------------------------------------------------+
| GRANT USAGE ON *.* TO 'heatmiser'@'localhost' |
| GRANT ALL PRIVILEGES ON `heatmiser`.* TO 'heatmiser'@'localhost' |
+------------------------------------------------------------------+
2 rows in set (0.00 sec)

mysql> QUIT;
Bye


Optionally add configuration options:
$ vi /etc/heatmiser.conf
# These settings are used by the Perl software for connecting to the MySQL database
# DBSOURCE dbi:mysql:heatmiser
# DBUSER heatmiser
# DBPASSWORD heatmiser

For all configuration options see: http://code.google.com/p/heatmiser-wifi/wiki/ConfigurationOptions

Install daemon script and init.d script:
$ sudo ln -s /usr/share/heatmiser-wifi/bin/heatmiser_daemon.pl /usr/local/bin/heatmiser_daemon
$ sudo ln -s /usr/share/heatmiser-wifi/bin/init /etc/init.d/heatmiser_daemon


Start service and test:
$ sudo service heatmiser_daemon start
$ cat /var/log/heatmiser

May 27 11:29:46: >>>> heatmiser_daemon started >>>>
$ mysql -u heatmiser heatmiser
mysql> SHOW TABLES;
+---------------------+
| Tables_in_heatmiser |
+---------------------+
| comfort |
| events |
| settings |
| temperatures |
| timer |
| weather |
+---------------------+
6 rows in set (0.00 sec)

mysql> SELECT * FROM settings;
+------------+----------+------------+
| thermostat | name | value |
+------------+----------+------------+
| heatmiser | holiday | |
| heatmiser | mode | heating |
| heatmiser | version | 1.6 |
| heatmiser | model | PRTHW |
| heatmiser | progmode | 5/2 |
| heatmiser | units | C |
| heatmiser | vendor | Heatmiser |
| heatmiser | host | heatmiser |
+------------+----------+------------+
8 rows in set (0.00 sec)

mysql> QUIT;
Bye


Set daemon to start at boot time:
$ sudo update-rc.d heatmiser_daemon defaults
Adding system startup for /etc/init.d/heatmiser_daemon ...
/etc/rc0.d/K20heatmiser_daemon -> ../init.d/heatmiser_daemon
/etc/rc1.d/K20heatmiser_daemon -> ../init.d/heatmiser_daemon
/etc/rc6.d/K20heatmiser_daemon -> ../init.d/heatmiser_daemon
/etc/rc2.d/S20heatmiser_daemon -> ../init.d/heatmiser_daemon
/etc/rc3.d/S20heatmiser_daemon -> ../init.d/heatmiser_daemon
/etc/rc4.d/S20heatmiser_daemon -> ../init.d/heatmiser_daemon
/etc/rc5.d/S20heatmiser_daemon -> ../init.d/heatmiser_daemon


configure webserver

Edit any DNS configuration required and reload DNS server


VeryQuickWiki Version 2.8.1 | Admin

All contents copyright mdsh.com (C) 2011-2023.