The methods have been sitting in my repository for some time now, and have been implemented successfully in several places, but until now weren't very useful unless you wanted to write code. While the best way to fully utilize this code is still as a child device for an app or another device, this device driver provides some standalone capabilities and allows an application, RM, webCoRE, or anything else that can utilize a device interface, to write, append, and retrieve textual and image data from Hubitat's Local File Manager.
Write and Append take two parameters:
- Hub Local File Name
- Data String to add to the file
For both the file will be created if it doesn' t exist. Write will overwrite any existing data in the file, while append will add it to the end.
Read takes one parameter
- Hub Local File Name
and returns the file contents
xFer File allows for the import of a text file from the net and needs two parameters
- URL for the source file
- Hub Local File Name to store the data
Like the write command, the file will be created if it doesn't exist or overwritten if it does exist.
Driver is available through HPM or may be directly imported from:
https://raw.githubusercontent.com/thebearmay/hubitat/main/fileMgr.groovy