Historian
-
Ah yes, the .conf files are supported by the multiple, optional, CarbonCache instances now available in openLuup, although the Historian itself doesn’t need them since it has its own set of rules (and a console page which displays them.)
You should be absolutely fine sticking with what you have and I don’t plan to make it obsolete. The internals of openLuup are still evolving, but the classic Luup interface is frozen and will remain there for legacy plugins.
On my new Pi OpenLuup server I cannot get the on-disk archiving to work for some reason.
I have addedluup.attr_set ("openLuup.Historian.Directory","history/")
to the Lua Startup and reloaded luup but it still does not work.This is how it looks in the console:
In the cache tab nothing is checked either.
Any idea on what could be the problem? I may have missed something obvious. The server is a Pi 4 with a standard installation of Raspberry Pi OS.
I checked the rights and they are:
drwxrwxrwx 13 pi pi 4096 jun 11 13:57 cmh-ludl drwxrwxrwx 2 pi pi 4096 apr 13 07:48 history
What I did notice is that the ownership in the cmh-luld folder is mixed between "root" and "pi", should it be that?
-
I don't think given that all your files are rwxrwxrwx that will make any difference. (The owners I mean)
I know nothing about Historian, but do you need to create the directory, or is that attribute meant to indicate it's in the root of the openLuup folder?
C
-
I don't think given that all your files are rwxrwxrwx that will make any difference. (The owners I mean)
I know nothing about Historian, but do you need to create the directory, or is that attribute meant to indicate it's in the root of the openLuup folder?
C
-
Ahh right. So the question is 'Does the location of that history folder match the location that you're specifying in the attribute?' I have no idea if you are meant to specify a relative path (and if so, relative to what) or an absolute...
So snap googling gives me this:
The on-disk archive is enabled by the single LuaStartup line luup.attr_set (“openLuup.Historian.Directory”,“history/”), where ‘history/’ is the path (including trailing ‘/’) relative to cmh-ludl/ where you want the data to reside.
So assuming that your history folder is in cmh-ludl (which is appears to be) I'm pretty much out of ideas, other than to check to see if there's anything in the history folder?
C
-
Ahh right. So the question is 'Does the location of that history folder match the location that you're specifying in the attribute?' I have no idea if you are meant to specify a relative path (and if so, relative to what) or an absolute...
So snap googling gives me this:
The on-disk archive is enabled by the single LuaStartup line luup.attr_set (“openLuup.Historian.Directory”,“history/”), where ‘history/’ is the path (including trailing ‘/’) relative to cmh-ludl/ where you want the data to reside.
So assuming that your history folder is in cmh-ludl (which is appears to be) I'm pretty much out of ideas, other than to check to see if there's anything in the history folder?
C
@catmanv2 thanks for the ideas! Yes the path should be correct, it is as stated in the manual (and also what you found with google). I have the same path on my other OpenLuup server and there it works.
The folder is empty so nothing is written to it. At the moment I am out of ideas. -
- what version of openLuup?
- what does the Startup log show?
- what does the regular log show (just after reload)?
I’ve not seen this one before.
@akbooer I am on OpenLuup v21.5.23.
The startup log gives no errors, it says this for historian:
2021-06-11 20:46:26.338 openLuup.historian:: version 2021.05.22 @akbooer
The regular log shows this related to historian after a reload:
2021-06-12 10:15:05.253 openLuup.historian:: starting data historian 2021-06-12 10:15:05.253 openLuup.historian:: using on-disk archive: history/ 2021-06-12 10:15:05.253 openLuup.historian:: disk archive storage rule sets: 9 2021-06-12 10:15:05.253 openLuup.historian:: using memory cache size (per-variable): 1024
Also no errors in the regular log that could be related.
No idea what it could be, any ideas appreciated.
I thought it could be a rights/ownership issue for the OpenLuup folders, but this could be a false track.
The reason for this is that I had some problems copying some files into it when updating a plugin (the virtual http devices plugin if I remember correctly) a few months ago.
I am not that good at Linux but it looks ok in what I showed above (I think). What is a bit strange is that the ownership varies in the folder, some are owned by "pi" and some by "root", unclear if it should be so or not to be honest. -
@akbooer I am on OpenLuup v21.5.23.
The startup log gives no errors, it says this for historian:
2021-06-11 20:46:26.338 openLuup.historian:: version 2021.05.22 @akbooer
The regular log shows this related to historian after a reload:
2021-06-12 10:15:05.253 openLuup.historian:: starting data historian 2021-06-12 10:15:05.253 openLuup.historian:: using on-disk archive: history/ 2021-06-12 10:15:05.253 openLuup.historian:: disk archive storage rule sets: 9 2021-06-12 10:15:05.253 openLuup.historian:: using memory cache size (per-variable): 1024
Also no errors in the regular log that could be related.
No idea what it could be, any ideas appreciated.
I thought it could be a rights/ownership issue for the OpenLuup folders, but this could be a false track.
The reason for this is that I had some problems copying some files into it when updating a plugin (the virtual http devices plugin if I remember correctly) a few months ago.
I am not that good at Linux but it looks ok in what I showed above (I think). What is a bit strange is that the ownership varies in the folder, some are owned by "pi" and some by "root", unclear if it should be so or not to be honest.@archers it really shouldn't matter. The Owners are what they are, but the permissions are read write execute for everyone.
But let's be double clear and ask what the permissions and owner are for the history folder, as I can't see it in any of your screenshots
C
-
@archers it really shouldn't matter. The Owners are what they are, but the permissions are read write execute for everyone.
But let's be double clear and ask what the permissions and owner are for the history folder, as I can't see it in any of your screenshots
C
-
-
@archers Agreed, can't see any issues there.
If you wanted to be absolute sure you could su to pi and touch a file in that folder, but that would be very odd.
C
-
@catmanv2 I copied a file into the history (/home/pi/cmh-ludl/history) folder on the Pi with the file manager via remote desktop and that worked. So it seems ok.
-
@archers I mean technically unless you were logged in as the same user as Historian is operating as...
....but I'm very very sure permissions and ownership is not your problemC
@catmanv2 I have only defined one user on the Pi, not sure if OpenLuup is operating as another user. But yes it does not seem to be the problem.
I am quite sure I did have problems copying files into the cmh-ludl folder a few moths ago. Yesterday I think that I may have changed the rights so that they now are as they should. I tested and now I am allowed to copy files into cmd-ludl. But this could be totally unrelated to the Historian problem.
@akbooer that sounds promising.
-
@catmanv2 I have only defined one user on the Pi, not sure if OpenLuup is operating as another user. But yes it does not seem to be the problem.
I am quite sure I did have problems copying files into the cmh-ludl folder a few moths ago. Yesterday I think that I may have changed the rights so that they now are as they should. I tested and now I am allowed to copy files into cmd-ludl. But this could be totally unrelated to the Historian problem.
@akbooer that sounds promising.
-
-