Local Files in Rule 4.0

No, there is no means to do that. But, you could create a new file with the contents of another, and then remove the first one.

Not sure if that will work for GIFs?

Trying to dynamically change the background (.gif) of a dashboard with the weather forecast. 75 and sunny =beach scene, rain=rainy day scene, 90+ = desert scene, etc.. Looking for a way to have it replace the file, since I cannot alter the name (without editing the dashboard).

I know you some here think of dashboards as more "control" but I think of them as quick ways for the system to give me lots of information at once. With a simple glance I can know most of what is/has/will happen in my home in the near/recent future/past. I continually look for ways to improve my homes ability to "speak" to me while still remaining silent (wife does not want to hear Alexa all the time, or ask her stuff).

Thanks tons for all your efforts keep up the great work!

1 Like

@JustinL was working on something like this. Maybe he has an idea for how to accomplish it.

2 Likes

I believe he did it with a custom app and an endpoint, not using file manager.

1 Like

Yep, that was my recollection, too. I figured that it looked like local files wouldn't do it but maybe @JustinL's method could be made to work for what @TechMedX is hoping to achieve.

1 Like

I can look into if this can support GIF too. I suspect it can. Your use case is exactly the reason why I developed this.

3 Likes

There's already an app for that. Search is your friend.

1 Like

You mean the one right above your post? Good eyes :eyes: are your friend :rofl:

You should have waited 12 days to post that. You need a sense of. Timing. For humour :rofl:

With this addition please allow for uploading our own SSL certificates! I don't want to be using http!

@bravenel
FYI
maximum single file size is 52 mb (53 mb fail) aprox 42 minute audio file.
Any larger and you will get { } and the hub may lock up (depending on how big the file is)
Tried on a C3 and 2 C5 hubs not that it should matter.

Any further development that could allow for groovy access to the local file space?

I am porting over a Fully Kiosk Browser driver I had written on SmartThings and webCoRE. It allows for real time response from the tablet camera and grabs an image from the camera. With SmartThings I put the image in the carouselTile to display on the SmartApp. It would be great to store that image(s) on the Hubitat hub and allow local http access.

2 Likes

Hi @Bloodtick_Jones !

I've developed a very basic local file access "driver". Take a look at it and see if it somehow can help you:

As I said, it has very basic capabilities and I'm willing to enhance it if some new use cases arise.

Marco

3 Likes

@nowon,

I believe that this limitation has something to do with memory constraints.

As far I could "feel", a file is fully kept in memory before written to a file. Have you ever tried to "append" additional data to an existing file, just to see if this limit of 52 MB is overcome?

Marco

no I haven't will give it a try when I get home tomorrow.
But I think you are correct it is the same problem we were having with hubs locking up during nightly backups. Now backups are much smaller and no more issues with hubs locking up.

1 Like

Hello, how can I read a data file using groovy?

As in the local files? There is currently no api to read them. They can only be accessed by rule machine. You could of course do an httpGet on the url of the local file though

1 Like

Okay, thanks. Will there be an api eventually?

See above for the beginnings:

@maffpt I tried just appending a test file slowly increasing it's size 16 mb at a time and re-uploading over writing the same file over each time and it looks like it maxes out at 51 mb.
Looking at your DH and rule I don't see how I can add to the file size expect very very slowly.
We can not open the file from Hubitat and simply keep adding data and saving it directly.