[BETA] Device Attribute Iterative Storage (RRD)

This code grew out of a discussion at Local graphs library (vs Hubigraph and WebCore) around the need for a Round Robin Database (RRD).

Code is availalble in HPM soon but also can be imported directly from
https://raw.githubusercontent.com/thebearmay/hubitat/main/apps/devAttIterStoUI.groovy.
https://raw.githubusercontent.com/thebearmay/hubitat/main/apps/devAttIterSto.groovy.

One device per Acquistion instance - multiple attributes permitted, number of points retained and reporting interval are configurable. Also has computed values for Max/Min/Avg of an attribute over the reporting interval. App allows for multiple instances and renaming of those instances, produces a CSV file stored in the hub local file system per Acquistion instance.

20 Likes

Well, this looks interesting. Graphing has always been on the to do-list. I really don't want to add a raspi into the mix.

Waiting with patience. Cheers!

3 Likes

v0.0.3 adds the computed min/max/avg capability for numeric attributes.
v0.0.4 Fix for sporadic error in reporting computed values.

5 Likes

Changing the version numbering for the package (v24.06.27.01 is current) in HPM as there are now 2 apps involved -
the parent app is the Device Attribute Iterative Storage - UI (v0.0.1), and the child app / instance editor is Device Attribute Iterative Storage - Acquistion (v0.0.5).

Hi @thebearmay
I thought I'd have a look at your latest app and tried to install it through HPM.
Unfortunately I'm seeing error.

Error Occurred During Installation

An error occurred while installing the package: Failed to install app https://raw.githubusercontent.com/thebearmay/hubitat/main/apps/devAttIterSto.groovy. Please notify the package developer..

I probably fudged something in the manifest.....

1 Like

Issue appears to be that it was attempting to install the child app before the parent. I changed the order of the entries in manifest and now it seems to work as intended - may need to exit your browser and come back in to clear it out of cache.

2 Likes

I just installed from HPM, no problems.

2 Likes

Excellent news! Thanks.

1 Like

Good work as always.

Do you plan to add the ability of pausing the collection of data with the use of a boolean or switch? I am currently using value change and I would like to prevent invalid collection during a power out or during reboot.

Do you plan to make the header optional in the csv file?

Thanks

Forgot 1 thing. Can the device name be included in the csv file?

Thanks. Should have the disable function working early next week, hadn’t considered a non-header option, but easy enough to implement.

Device name not a problem, would it be a column constant or ??

thanks again. i am sure I am not using this for what you intended. you can make it optional for your intended design use. I am going to try to point multiple devices to the same csv file like I currently am doing with RM. But not possible if not there. I intend to bring into your notification tile device to monitor on dashboard. I am assuming your app can't write to notification tile directly and will use RM for that. I can cut a lot of rm rules if this works.

is there a code change i can make to output 24hr time no date, instead of timestamp? I am displaying in your notification tile, its for viewing only. the date format option in notification tile works per line and i am importing multiple rows from the csv file in one shot. thx

I noticed this error for all child apps after reboot in logs. I've not noticed any problems with it running.


Looks like the restart logic has an issue. Was planning on changing that anyway, but I'll push up a temporary fix today with some of the other changes I have ready.

Edit: Just saw the issue. DOH! Easy fix.

Sounds great. Everything is working well and I have replaced my RM rules that did similar.

My attempt to point multiple child apps to same output file had inconsistent results. Sometimes it dropped some items. No problem. It was worth a shot. Maybe if you add selection of multiple devices I will try again.

Hoping you can add a pause feature triggered by Boolean or switch.

I am currently deleting header, option to select include or not to include would be great

Addition of device field, icing on the cake.

Many thanks for your time and sharing your brain power.

Just pushed up some "Advanced Options" for you, doesn't include the pause yet but testing a method that could show up soon.

The issue with multiple instances targeting the same output file is one of collision, i.e. if two instances grab the contents at the same time the last one to write wins which results in record loss. In theory if you had multiple instances that were scheduled in such a way that they would never collide it would work.

Yeah, I was aware of the collision possibilities. Worth the time testing to see. The more I can use your app, the less RM to deal with. Priceless

Just tried your new changes. FANTASTIC!. Just what I was looking for!

Obviously, I been asking for too easy of things to add.

This wish list item I don't think is possible. I use many of your Notification Tile devices.
Is it possible to output csv file AND write to your Notification Tile? I am only outputting 1 row for Capture/Restore purposes. With RM, I update the Notification Tile. Helps me monitor for problems.

Appreciate all your effort.

I should be able to add a notification device as an alternate output. I'll look at it.

Edit: v24.07.02.02 Uv0.0.5 Av0.0.6 Adds the notification device and the Disable/Enable function