Possible to log data to a file in "file manager" space

Is it possible / could it be possible to log data to an on hub file to later be downloaded and analyzed?

I understand data can be captured by Hubigraph and read by Node-Red. However it would be really convenient if for trouble shooting (of the Hubitat + device system OR an individual device data).

Perhaps it might be in the driver code. Or maybe an RM rule reading an attribute and sending it to some not yet developed location.



It's possible using the "Append to file" action in Rule Machine. First you have to create a blank file, upload it, and create the rule to write to it. There is no way i know of to create a new file within HE or to purge data from an existing file.

In my example, whichever device/event triggers the rule gets logged.


You can create a new file in Hubitat with Write to File in rule machine, and later use append to that file.

You can also do it in a driver if you ever need to. @thebearmay posted some code which I have used / modified in a few of my recent drivers.

1 Like

It's not that complicated though. This is a legacy rule but it's still working

The only thing is you need to have created the file before trying to create the rule, or the file won't be available to pick. After that the hub is happy to delete and remake the file.

I can deal with having to create a file on the Hub. Thinking of this only as I type this line, I think I will create a number of files with sequential names and not worry about it for a while.

1 Like

Download the Hubitat app