My main goals are to use this for home energy monitoring and climate control (AC/heat).
- Energy monitoring is done with an Aeon Labs Home Energy Monitor (DSB28-ZWUS).
- AC is controlled by a Trane Z-Wave thermostat
There is a plugin for the VeraLite called "DataMine" which can do graphing of energy usage, but it runs on the VeraLite itself.
I wanted to have the flexibility to record the data on a separate server in order to have additional options for storage, processing and presentation.
The MIOS OS running on the VeraLite has the option to specify an external event logger, which will be used to implement this.
I basically followed the instructions from the excellent MiCasaVerde forum:
Re: HOWTO: Event logging to database
1. set up a web server with PHP and MySQL that supports HTTPS. Configuration is described in my previous post: Install Lighttpd/PHP5/MySQL on PogoPlug or Dockstar running Debian
2. create the database and database tables for logging the VeraLite events, for example:
mysql> create database vera;
mysql> create user 'vera'@'localhost' identified by 'vera';
mysql> grant all privileges on vera.* to 'vera'@'localhost';
mysql> flush privileges;
mysql> quit;
$
$ mysql -uvera -pvera vera < alert.sql
$
3. deploy the alert.php file on the web server
- needs to be accessible at the root of the web server as /alert (use url rewrite)
- adjust the db name/username/password if necessary
4. configure VeraLite/MIOS to use the alternate event logger
http://[YOUR-VERA-IP-ADDRESS]
5. configure notifications as needed on the VeraLite through the MIOS UI