Last night i installed Habmin2. This is a graph/dashboard web app that displays data from OpenHAB.

In the README the author/maintainer makes apologies for the state of the project and the steps to go through to get it working. That's often the way with hobby projects. I've seen far far worse (and i've put far worse on github i'm sure).

Here's the pretty graphs that Habmin2 makes:

graphs1.png
graphs2.png
graphs3.png

I also had to get mysql persistence working. That involved a lots of errors about tables not existing. I watched the db fill, and openhab was recieving many updates and not saving them. I left it running over night and it still haven't created all the tables or items that i should be.. :-S I'll need to RTFM more maybe.

Openhab mysql persistence is creating a table for each "item". A main table called "Items" looks like this:

+--------+-----------------------------+
| ItemId | ItemName                    |
+--------+-----------------------------+
|      1 | Netatmo_Hallway_Noise       |
|      2 | Netatmo_Hallway_CO2         |
|      3 | Netatmo_Hallway_Pressure    |
|      4 | Arduino_kitchenmoisture     |
|      5 | Arduino_kitchentemp         |
|      6 | Arduino_bed1temp            |
|      7 | Arduino_bed1humidity        |
|      8 | Arduino_kitchenhumidity     |
|      9 | Motion_Hallway              |
|     10 | Heater_DiningRoom           |
|     11 | Espresso_Kitchen            |
|     12 | Netatmo_Porch_Temperature   |
|     13 | Netatmo_Porch_Humidity      |
|     14 | Netatmo_Hallway_Humidity    |
|     15 | Netatmo_Hallway_Temperature |
+--------+-----------------------------+

and they then do this denormalised thing, where they make a table for each item (not using foreign keys)

+-------------------+
| Tables_in_openhab |
+-------------------+
| Item1             |
| Item10            |
| Item11            |
| Item12            |
| Item13            |
| Item14            |
| Item15            |
| Item2             |
| Item3             |
| Item4             |
| Item5             |
| Item6             |
| Item7             |
| Item8             |
| Item9             |
| Items             |
+-------------------+

They look like this:

mysql> select * from Item9;
+---------------------+-------+
| Time                | Value |
+---------------------+-------+
| 2015-11-20 22:14:37 | OFF   |
| 2015-11-20 22:22:37 | ON    |
| 2015-11-20 22:24:37 | OFF   |
| 2015-11-20 22:25:38 | ON    |
| 2015-11-20 22:26:38 | OFF   |
| 2015-11-20 23:34:49 | ON    |
| 2015-11-20 23:35:49 | OFF   |
| 2015-11-21 00:00:00 | OFF   |
| 2015-11-21 07:05:17 | ON    |
| 2015-11-21 07:06:17 | OFF   |
| 2015-11-21 07:42:20 | ON    |
| 2015-11-21 07:43:20 | OFF   |
| 2015-11-21 07:49:20 | ON    |
| 2015-11-21 07:51:20 | OFF   |
| 2015-11-21 07:57:20 | ON    |
| 2015-11-21 07:58:20 | OFF   |
| 2015-11-21 08:33:32 | ON    |
| 2015-11-21 08:35:37 | OFF   |
| 2015-11-21 09:02:06 | ON    |
| 2015-11-21 09:03:06 | OFF   |
| 2015-11-21 11:49:00 | ON    |
| 2015-11-21 11:50:00 | OFF   |
| 2015-11-21 12:03:26 | ON    |
| 2015-11-21 12:04:26 | OFF   |
| 2015-11-21 12:13:42 | ON    |
| 2015-11-21 12:14:42 | OFF   |
+---------------------+-------+
26 rows in set (0.00 sec)
mysql> select * from Item8;
+---------------------+-------+
| Time                | Value |
+---------------------+-------+
| 2015-11-20 22:13:57 |    36 |
| 2015-11-21 00:00:00 |    36 |
| 2015-11-21 02:26:05 |    37 |
| 2015-11-21 02:27:37 |    36 |
| 2015-11-21 02:30:41 |    37 |
| 2015-11-21 02:30:59 |    36 |
| 2015-11-21 02:39:33 |    37 |
| 2015-11-21 02:40:28 |    36 |
| 2015-11-21 02:42:37 |    37 |
| 2015-11-21 02:43:32 |    36 |
| 2015-11-21 02:45:22 |    37 |
| 2015-11-21 02:45:40 |    36 |
| 2015-11-21 02:46:17 |    37 |
| 2015-11-21 02:46:35 |    36 |
| 2015-11-21 02:56:23 |    37 |
| 2015-11-21 02:58:50 |    36 |
| 2015-11-21 02:59:08 |    37 |
| 2015-11-21 02:59:45 |    36 |
| 2015-11-21 03:01:35 |    37 |
| 2015-11-21 03:01:53 |    36 |
| 2015-11-21 03:02:12 |    37 |
| 2015-11-21 08:31:08 |    36 |
+---------------------+-------+
22 rows in set (0.00 sec)