DataYours on Raspberry Pi

Yes, in fact I’ll take a look at moving [tt]DataDash[/tt] there as well. I have just discovered that the BeagleBone Black comes with CIFS ready installed (not sure if this is so for the RPi) so it’s trivial to have the Whisper database sitting on a NAS.

Ps: i'll measure the cpu Usage of datacache running.

You might take a look at the memory usage too… it was a delight to see enormous amounts of free space available - quite a difference from Vera.[/quote]

I’ve verified : Rpi comes with CIFS ready installed too.

Just an update on progress: I now have both [tt]DataCache[/tt] and [tt]DataGraph[/tt] running unmodified on my BeagleBone Black, and now see no barrier (famous last words) in doing the same for [tt]DataDash[/tt].

This means that with only [tt]DataWatcher[/tt] running on Vera to pick up variable changes, the rest of the [tt]DataYours[/tt] daemons could be run remotely on RPi or BBB.

[quote=“akbooer, post:22, topic:186265”]Just an update on progress: I now have both [tt]DataCache[/tt] and [tt]DataGraph[/tt] running unmodified on my BeagleBone Black, and now see no barrier (famous last words) in doing the same for [tt]DataDash[/tt].

This means that with only [tt]DataWatcher[/tt] running on Vera to pick up variable changes, the rest of the [tt]DataYours[/tt] daemons could be run remotely on RPi or BBB.[/quote]

Wonderful !!

great job akbooer !!

[tt]DataDash[/tt] is now working on my BeagleBone Black, but I do want to make some changes because it was written (not unreasonably) with the assumption that it was actually running on a Vera, and that’s not now true. So I can get you up and going and would be grateful for a test on a RPi.

Ok akbooer,

Give me info for the installation in Rpi and I’ll test .

Tnks Donato

[quote=“d55m14, post:15, topic:186265”]The only error message is :

sh: 1: GetNetworkState.sh: not found

Have you any idea ?[/quote]

You can suppress this message by creating the file [tt]/usr/bin/GetNetworkState.sh[/tt] with the contents:

echo -n 172.16.42.88

replacing the IP address with that of your own (RPi) machine.

Then, all the [tt]DataYours[/tt] components will pick up the right address. I’m not Unix savvy enough to make this pick up the machine IP automatically (and it seems, in fact, to be far from straight-forward.)

[quote=“akbooer, post:26, topic:186265”][quote=“d55m14, post:15, topic:186265”]The only error message is :

sh: 1: GetNetworkState.sh: not found

Have you any idea ?[/quote]

You can suppress this message by creating the file [tt]/usr/bin/GetNetworkState.sh[/tt] with the contents:

echo -n 172.16.42.88

replacing the IP address with that of your own (RPi) machine.

Then, all the [tt]DataYours[/tt] components will pick up the right address. I’m not Unix savvy enough to make this pick up the machine IP automatically (and it seems, in fact, to be far from straight-forward.)[/quote]

Hi akbooer,

I’ve tested and the error message disappeared. Good !! Thanks

donato

OK. Here we go…

The standard Vera installation files you will need on your RPi are:

L_DataCache7.lua
L_DataDaemon7.lua
L_DataGraph7.lua
L_DataLibrary7.lua
L_DataWhisper7.lua

The attached files:

OpenLuup.lua
RPI_BBB_DataYours_Beta1.lua
L_DataDash7.lua   (very slightly modified from the App Store release)

Also

akb-json.lua

…available from here: [url=http://forum.micasaverde.com/index.php/topic,29989.msg213050.html#msg213050]http://forum.micasaverde.com/index.php/topic,29989.msg213050.html#msg213050[/url]

BEFORE YOU DO ANYTHING ELSE: you must modify the [tt]RPI_BBB_DataYours_Beta1.lua[/tt] file: the two parameters LOCAL_DATA_DIR and VERAS need to be changed to your particular needs.

Then you just need to run that file with the command:

lua5.1 RPI_BBB_DataYours_Beta1.lua

(or maybe just [tt]lua[/tt] instead of [tt]lua5.1[/tt])

This will (should) create a virtual Luup environment, creating three devices, and away you go.


[Edit: you also need to create a [tt]/www/[/tt] directory on the RPi for the [tt]DataGraph[/tt] configuration file.]

Great akbooer !!

I’ve followed your clear indications and all seem OK.
At the moment the data are stored on the Rpi SD .

I’ve left on VeraEdge only Datayours7 and the Watcher.

I’ve added a device to VeraEdge and it seems that in Dashboard I can see it only after a restart of your lua programs.

donato

Excellent!

Yes, the device configuration is only read at initialisation. Adding devices is not something which happens too often.

[quote=“akbooer, post:30, topic:186265”]Excellent!

Yes, the device configuration is only read at initialisation. Adding devices is not something which happens too often.[/quote]

Ok for device configuration.

I’ve defined some graphs but I can’t see them after a restart of lua. Repeated the process but the result is the same.

donato

Ah! Well spotted! I knew there was something else…

You need to create a [tt]/www/[/tt] directory on RPi, because this is where [tt]DataGraph[/tt] keeps its configuration file with graph definitions.

We are just at the edge of being able to fool the unmodified [tt]DataYours[/tt] daemons that they are still on Vera. My current difficulties lie around the way that these different platforms deal with web servers - the location of the [tt]/www/[/tt] directory is a case in point.

Fine !!

www dir created and now the graphs are ok after a restart. Excellent job !!

donato

…and so we see that it IS possible, on both Raspberry PI and BeagleBone Black.

…I’m delighted you asked the original question just under a month ago. I have had fun doing it, and the choice of Carbon/Graphite as the underlying architecture was definitely the right one. This also gives a new impetus to improving [tt]DataYours[/tt], in particular [tt]DataDash[/tt], but I’m now also very intrigued to see which other plugins can be ported: [tt]Netatmo[/tt] will be next, since that just creates virtual devices and doesn’t need Z-wave.

…and so we see that it IS possible, on both Raspberry PI and BeagleBone Black.

…I’m delighted you asked the original question just under a month ago. I have had fun doing it, and the choice of Carbon/Graphite as the underlying architecture was definitely the right one. This also gives a new impetus to improving [tt]DataYours[/tt], in particular [tt]DataDash[/tt], but I’m now also very intrigued to see which other plugins can be ported: [tt]Netatmo[/tt] will be next, since that just creates virtual devices and doesn’t need Z-wave.[/quote]

I completely agree with you . I think that this is a right approach : it will stabilize the zwave controller and will give more flexibility on plugins and applications and on the hw platform.

Just as a footnote: [tt]Netatmo[/tt] is now running on the BeagleBone Black, along with [tt]DataYours[/tt], and so is Rex’s excellent [tt]RBLuaTest[/tt].

…but that is a story for a different thread.

Just as a footnote: [tt]Netatmo[/tt] is now running on the BeagleBone Black, along with [tt]DataYours[/tt], and so is Rex’s excellent [tt]RBLuaTest[/tt].

…but that is a story for a different thread.[/quote]

fine akbooer !!

my Datayours installation on Rpi is running with no problems and with limited usage of computers resources.

donato

I just went through the setup and all seems to be working well.

I am launching this from the command line and it is running well.

How are you guys getting it to turn into a daemon?

Excellent news!

I am launching this from the command line and it is running well.
Yes, that's the way I use it mostly because I'm still developing the openLuup framework.
How are you guys getting it to turn into a daemon?

I’m running Debian on a BeagleBone Black, and for me, this works a treat…

nohup lua5.1 RPI_BBB_DataYours_Beta1.lua > luup.log &

…then you can even tail the log file if you need to see what’s going on.

The latest openLuup framework is much more capable than that posted here and runs many other plugins unmodified. In particular, the altUI plugin by @amg0 gives a complete UI (much better than UI7.) I’m not quite ready to start a separate thread on that, but I’m looking at it as an openHAB alternative.

Nice work.

Where can I download the plugin?

What do I have to install on the vera?