DataYours on Raspberry Pi

The [tt]DataYours[/tt] plugin, and the associated [tt]DataYours - Graphite[/tt] daemons are downloadable from the MiOS App store. A slight change to the [tt]DataDash[/tt]
code is required and attached to a few posts back in this thread (here [url=http://forum.micasaverde.com/index.php/topic,31078.msg225202.html#msg225202]http://forum.micasaverde.com/index.php/topic,31078.msg225202.html#msg225202[/url]) which also has the ‘openLuup’ code to run on the Pi.

What do I have to install on the vera?
Just the [tt]DataWatcher[/tt] daemon is all that's required, although you can do a full [tt]DataYours[/tt] install and just use it to run the watcher.

I’m assuming that you know what [tt]DataYours[/tt] is all about and that you’re wanting to migrate part of it to a Pi.

A much more comprehensive version of the ‘openLuup’ code is under construction and should be able to run almost any plugin on a Pi, or similar.

The [tt]DataYours[/tt] plugin, and the associated [tt]DataYours - Graphite[/tt] daemons are downloadable from the MiOS App store. A slight change to the [tt]DataDash[/tt] code is required and attached to a few posts back in this thread (here [url=http://forum.micasaverde.com/index.php/topic,31078.msg225202.html#msg225202]http://forum.micasaverde.com/index.php/topic,31078.msg225202.html#msg225202[/url]) which also has the 'openLuup' code to run on the Pi.

But I have first to install them on the vera and then copy the files to the PI?
Is it possible to download the files without install?

You need a minimum of files on Vera to run DataWatcher anyway. The files are very small and do not take up significant resources. It’s really the easiest way to get hold of them, but if this gives you any trouble, I’ll post a zip file.

I’ve just released a much more general version of the openLuup system, which means that a specific version for [tt]DataYours[/tt] is not required.

The release here [url=http://forum.micasaverde.com/index.php/topic,32315.msg240753.html#msg240753]http://forum.micasaverde.com/index.php/topic,32315.msg240753.html#msg240753[/url], plus the following updates on that thread, should run many standard Vera plugins.

Modifications to the startup file (for openLuup) to run [tt]Datayours[/tt] are here: [url=http://forum.micasaverde.com/index.php/topic,32315.msg240753.html#msg240753]http://forum.micasaverde.com/index.php/topic,32315.msg240753.html#msg240753[/url].

An update to the [tt]DataYours[/tt] Lua file (which still runs on a standard Vera) is attached here. What it does it to transfer the configuration parameters to all the various daemons, so you only have to configure any given parameter (eg. LOCAL_DATA_DIR) in one place, rather than in each of the daemons.

One ‘gotcha’ if you choose to run [tt]DataWatcher[/tt] under openLuup: you need to be sure that all of the devices variables that it is watching do already exist - this is important because devices and variables are not persistent under openLuup. The simple solution to this is to delay the startup code until all other devices have started. On the other hand, if you’re just logging metrics from a remote system, then this isn’t a thing you need to consider.

Hi akbooer,

I’m trying to replicate datayours data on a Rpi with openLuup e Datayour (Cache, Graph, Dash). The Watcher daemon is at the moment on the Veraedge controller.

Can you confirm that on the destination system (rpi) are replicated from the origin the treemap and the watched variables ? The storage schema of replicated and watched variables is for all “1h:7d average” and is different from the origin storage schema : is it correct ? If yes can I changed them on the destination system ?

tnks

donato

No, I don’t think so… I’m struggling a bit with the wording, so my understanding of the question may not be correct.

If you have a complete DataYours system (or at least Watcher and Cache) on your Edge, and you’re asking if the database is automatically replicated to your DataCache on the RPi, then the answer is definitely no. DataYours is, or can be, a completely distributed system, so DataWatcher knows nothing about the database structure of where it sends the data, apart from the actual IP address and port number. It’s perfectly possible for a single DataWatcher to send data to multiple distinct DataCache instances which might have completely different archive structures.

The storage schema of replicated and watched variables is for all "1h:7d average" and is different from the origin storage schema : is it correct ? If yes can I changed them on the destination system ?

The “1h:7d average” archive structure is the default in the absence of any other information (chosen to take up little space but to capture the basics, in case someone sets up the database on, for example, the Vera itself.) The actual archive structure, on a per metric (ie. device variable) basis, is determined at file creation. This can either be set up manually, or using schema and aggregation rules. There are, in fact, three ways to set up a new database with the structure you want:

[ol][li]manually with DataDash menu - not recommended (a bit tedious!)[/li]
[li]copying an existing database - if, for example, the files you want are already on your Edge[/li]
[li]using schema and aggregation rules - these are documented in the User Guide and really is the recommended way (because they’re automatically applied to the creation of any new files)[/li][/ol]

I hope this clarifies things a little. Setting up a distributed database system is not totally trivial, but it’s not really very hard if you’ve got the basic concepts right. Just to be clear, my recommendation is to create schema and archive rule files, which should be placed in your destination database directory (LOCAL_DATA_DIR) for your RPi.

Hi akbooer,

Tnks for your reply and sorry for my english. Now the DY functions are a bit clarified for me. I’ll try some tests .

If communication between sender and receiver is down for a period is it possible to resync the data base ?

Nothing wrong with your english at all! Just the difference between the way that you describe the system and I describe the system.

Now the DY functions are a bit clarified for me. I'll try some tests .
OK, good luck with that.
If communication between sender and receiver is down for a period is it possible to resync the data base ?
It depends what you want. DataWatcher itself has no way of telling if the remote system is down or not - this is because the communication is via UDP datagrams which are incredibly lightweight and part of the reason that DataYours imposes virtually no cpu or I/O overhead on the system: there is no client/server handshake.

However, if you are running DataCache locally (on the Edge) with its own database (and perhaps a rather short maximum retention time to keep file sizes down), it may be possible to arrange a subsequent merge of the missing data with that captured locally using a straight-forward Whisper database utility.

Nothing wrong with your english at all! Just the difference between the way that you describe the system and I describe the system.

Now the DY functions are a bit clarified for me. I'll try some tests .
OK, good luck with that.
If communication between sender and receiver is down for a period is it possible to resync the data base ?
It depends what you want. DataWatcher itself has no way of telling if the remote system is down or not - this is because the communication is via UDP datagrams which are incredibly lightweight and part of the reason that DataYours imposes virtually no cpu or I/O overhead on the system: there is no client/server handshake.

However, if you are running DataCache locally (on the Edge) with its own database (and perhaps a rather short maximum retention time to keep file sizes down), it may be possible to arrange a subsequent merge of the missing data with that captured locally using a straight-forward Whisper database utility.[/quote]

Yes I run DataCache locally so I’ll ask you about the Whisper Utility.

For my check : is ok the list of Datayours files (attached) for a complete configuration (Watcher, Cache, Graph Dash) on a Rpi with Openluup ?

tnks

donato

Ah, sorry, I never did respond to your earlier question about that.

No, this list is not quite right: is has some duplicated items from various posts, some things not needed, etc…

I’ll post a complete set separately.

Hi akbooer,

I’m doing some tests with Rpi/Openluup/Datayour but I’ve some questions for you .

  1. To activate a complete Datayour (Watcher, Cache, Graph, Dash) on Rpi, remote to a Edge Controller, do I have to install on Rpi at least Openluup, VeraBridge and DY ? In this case I see on DY Dash two controller (the remote one and a local controller with id 88800000) with the complete sets of device and variables replicated. In this configuration I can activate watched variables from the devices of local controller (88800000) NOT from the remote controller . Is it correct ?

  2. With a watched variable activated (i see the graph from the wispher DB) I’ve tried to define a graph but also if I don’t get error msg the graph is not created.

tnks

donato

Your don’t need VeraBridge, it’s nothing to do with DataYours per se and only there to provide a Zwave bridge through to openLuup - it gives the RPi control of devices on the remote Vera. This only works with machines on the same LAN (or VPN). As I understand you application, it’s not what you need - I thought you needed only the most tenuous of connections using DataWatcher to send variable changes to DataCache on the RPi.

The default id for an openLuup installation happens to be 88800000, although it is configurable.

If you DID want to select remote variables for watching using DataYours, then you would need to add the Vera IP to the VERAS configuration parameter.

2) With a watched variable activated (i see the graph from the wispher DB) I've tried to define a graph but also if I don't get error msg the graph is not created.

The graph configuration file is normally stored on Vera’s /www/ directory (the same is true for the DataWatcher configuration.) I really must make this configurable, but at the moment it’s fixed. My guess is that you have not created a /www/ directory on the RPi.

Attached you will find a new startup file for openLuup, which checks the installation for anomalies like missing files or directories before launching openLuup. It aborts if there’s a fatal flaw in the setup configuration, but otherwise issues warning messages to standard output. If you’re starting openLuup with the “nohup” command, then standard output is redirected to the file “nohup.out”.

Hope this helps.

Hi akbooer,

I’ve installed on Rpi Openluup, a complete DY with the VERAS parameter and NO Verabridge.

I can see the treemap (see the attachments ) but when I try to activate a watched variable I get the No Handler message.

I’ve attached a screenshots of configuration.

Have you any idea of my mistake ?

At startup I don’t have error messages.

tnks

donato

[ul][li]It looks like you don’t have DataWatcher running on the Vera?[/li]
[li]How have you configured DataYours on the RPi?[/li]
[li]What does your startup file on the RPi contain?[/li][/ul]

[quote=“akbooer, post:54, topic:186265”][ul][li]It looks like you don’t have DataWatcher running on the Vera?[/li]
[li]How have you configured DataYours on the RPi?[/li]
[li]What does your startup file on the RPi contain?[/li][/ul][/quote]

Datawatcher must run on Edge ? Can’t I have all on Rpi included DataWatcher ?

Attached mu startup.lua on rpi

tnks

donato

No, you have to have a DataWatcher on every machine from which you want to receive data. Sorry, thought this was clear from previous discussions.

It’s my little attention you’re always very clear.

So the minimal configuration of DY on Edge is Datawatcher and on Rpi I’ve to install datayours with watcher cache graph and dash ?

Tnks

Donato

No, the only thing you need running is DataWatcher. It uses the DataDaemon too. But you don’t need the rest of DataWatcher and you don’t even need to set it up as a device - it can just run in the background (started in Vera’s startup code) and you will not even see it.

There’s instructions on how to do this somewhere in the DataYours threads, but I am away for the rest of the day so unable to help further right now.

No, the only thing you need running is DataWatcher. It uses the DataDaemon too. But you don’t need the rest of DataWatcher and you don’t even need to set it up as a device - it can just run in the background (started in Vera’s startup code) and you will not even see it.

There’s instructions on how to do this somewhere in the DataYours threads, but I am away for the rest of the day so unable to help further right now.[/quote]

If I have the following configuration :

  1. Edge with Datawatcher;

  2. Rpi with Dash Graph, Cache

can I configure the watched variables from the Dash on Rpi setting the following startup.lua with NO WATCHER ?

do – DataYours
local dy7 = luup.create_device (‘’, ‘’, “DataYours”, “D_DataYours7.xml”,“I_DataYours7.xml”) – create the device
luup.variable_set (“urn:akbooer-com:serviceId:DataYours1”, “DAEMONS”, “Graph, Dash, Cache”, dy7)
luup.variable_set (“urn:akbooer-com:serviceId:DataYours1”, “LOCAL_DATA_DIR”, “/nas/whisper/”, dy7)
luup.variable_set (“urn:akbooer-com:serviceId:DataYours1”, “VERAS”, “192.168.xx.xxx”, dy7)
end

tnks

donato

Hi akbooer

attached a doc with some tests on Rpi-Openluup-Datayours configuration.
In bold char the configuration changes.
tnks

donato