How to save logs and trends to a CSV file in groov server?

There is a link or button to save the trends and another one to save the event logs to a csv file. Why is there no means to operate this function on a scheduled basis, say once a month or once a year?

For trends, there’s an easy way to do that. Take the download link that you get from the trend (e.g. right-click and copy link), and then use whatever scheduling service you like to download that link at whatever interval you like.

For example, here’s my trend with the download menu open:

52 AM

And here’s the link I get from it:

https://groov.jonathanfischer.net/api/v0/data-logging/23_0_1440_60_false/scanned-data.csv?api_key=API_KEY_GOES_HERE

Your real link will have a real API key associated with it: be somewhat careful with that, because it gives access to groov View’s data with the same permissions as the user you’re currently logged in as.

You can then just toss that link in a cron job or sometime similar and download the data however often you like. If you ever change your user’s API key you’ll need to update your download link, but other than that it should remain stable indefinitely.

We don’t have a stable way to download Event logs at the moment, I’ll add that as a feature request.

1 Like

Thanks Johnathan, that’s a big help. I’ll be waiting for the event logs too. I assume you mean something like windows scheduler to initiate the down loads?

I don’t use Windows personally, so I’m not sure there. You’ll probably need an extra program to down the downloading: last I used it Scheduler didn’t have HTTP support baked in. But yes, that sort of program.

Well it turns out it’s pretty messy. First of all, in windows I was able to paste the link to Edge and then manually save the link as a file to a folder, however, since the file name in the link is always the same, it needs windows scripting to change the file name based on time stamp and also to facilitate the save.
The major problem in addition to this is that this means I would have to create a script to separately name each pen of each plot for each of 20 fans…then all you would have is a gazillion separate single data files that would all need to be put together into some sort of meaningful spreadsheet.
In addition, you are right in that windows doesn’t have a scheduler that has http baked in, so I would have to find a scheduler that would provide that.
Starting to look like Pac Display is needed to fix the trend problem, that still leaves the events.
What is needed is a means to pick all the pens to be saved, and then provide a timestamp added to a customer string value (with a browser to pick the folder) so that the client can create one csv file instead of say 10 files.

If you’re using an AR1, Node-RED might be a good option too. You can keep all the scripting/scheduling necessary in one place and it should be straightforward.

I don’t personally know Node-RED though, so I’m not much help there. D:

I want to improve on this sort of thing in later releases, just haven’t had the time to get to it yet.

ne way of getting around this to some degree by making it relatively unnecessary to save the files is by setting the value to 5 years, however in previous versions I found it did not have the capability to do so, so based on what I have to display, I had set it to 6 months (26 weeks) rollover with a 1 minute polling. Did the latest release provide the capability to poll let say at 5 minutes and rollover at 5 years? I have 7 pens total in 3 plots times 20 fans.

Ok I see that you had fixed that previous issue with memory or storage. I now have all 140 pens set for 5 years and 1 minute.

I would not be using the trend as a way to log data.
I would use Node-RED and the PAC Node to read the PAC Control tags and write it to a data base.
Or, I would use OptoDataLink.

Ok ok ok…I am finally getting around to node red.
Got it loaded on pc now and going through tuts.