What is it?
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
All the code can be found om my github https://github.com/timdows/webpages/tree/master/Housedb
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.
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.
- 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
- I guess not so much
Comments are closed.