Housedb

What is it? questionmark

This small webpage is used by some of my domotica projects.
For now, it contains a small database that holds information for my 7Segment power meter.

Created in Symfony2, it also holds a command that is executed every 5 minutes to refresh several caches. By doing this there is no need to query the Vera3 every 10 seconds for information.

Symfony2 php code questionmark

All the code can be found om my github https://github.com/timdows/webpages/tree/master/Housedb
2015-10-03 15_03_55-Photos

The VeraCache entity holds one table with 28 rows, every row represents a variable.
The SevenSegment class under ClientModels holds only a couple of getters and setters, to reduce unnecessary information.
2015-10-03 15_07_27-Mozilla Firefox

This json result is used to display values on the 7Segment power meter.

The command that runs every 5 minutes can be executed from a cronjob. The output will show the requests fired towards the Vera3.
2015-10-03 16_27_46-Mail

TODO questionmark

  1. If it takes longer than 5 minutes to refresh the cache, there will be an issue of double running cronjobs. This can be solved by holding a is_running value somewhere

What could be better questionmark

  1. I guess not so much

Comments are closed.