DataYours now provides a local, or remote, data storage provider within the AltUI framework, and works on Vera and under openLuup on any machine. It enables the use of the AltUI interface to archive and plot device variable history. The source files are available from GitHub: https://github.com/akbooer/DataYours
DataYours will register itself with AltUI, if installed, and be available as a Data Storage Provider under the graphing menu for each variable. A simple naming convention with a one-letter suffix will, by default, configure a data archive for that variable to be:
[ul][li].d - one minute resolution for one day[/li]
[li].w - five minute resolution for one week[/li]
[li].m - twenty minute resolution for one month (30 days)[/li]
[li].q - one hour resolution for one quarter (90 days)[/li]
[li].y - six hour resolution for one year[/li][/ul]
The database can be configured to be local to Vera (or openLuup) or on a remote machine, through the setting of the LOCAL_DATA_DIR parameter.
Attached is an example of system memory usage plotted using the name “memory.d”, although not a full day’s data yet populates the graph.
The mapping from name extension, like .m, to the archive structure is done with a standard DataYours configuration file [tt]storage_schemas.conf[/tt] which should be located in LOCAL_DATA_DIR. In the following code snippet are the schema rules which will implement the above mapping. They can, of course, be changed to suit. These rules are only use in the creation of new files, so it is also possible to create a specific archive structure for a particular metric and just use that name without any extension modifier.
# # Schema definitions for Whisper files. Entries are scanned in order, # and first match wins. This file is read whenever a file create is required. # # [name] (used in log reporting) # pattern = regex # retentions = timePerPoint:timeToStore, timePerPoint:timeToStore, ... # 2016.01.24 @akbooer # basic patterns for AltUI Data Storage Provider [day] pattern = \.d$ retentions = 1m:1d [week] pattern = \.w$ retentions = 5m:7d [month] pattern = \.m$ retentions = 20m:30d [quarter] pattern = \.q$ retentions = 1h:90d [year] pattern = \.y$ retentions = 6h:1y
Since DataYours is inherently a modular, distributed system, the data may be replicated on local and remote databases. It is also possible to run without DataYours installed on the local system at all, sending everything to a remote machine, but there needs to be a one-time manual registration of the remote machine as an AltUI Data Storage Provider. The AltUI interface for saving and plotting the data remains, in either case, the same (and is far more straight-forward than the dashboard interface provided by DataYours.)
Example screenshot attached below.