Where save data

Hi everyone. Im new to plugin development and are trying to find out where best to save data. The thing is that i need to store ~500kb of data but cant find any information on where best to store it? Is it possible to store that much data in a variable in the plugin? If not, is there any recomendation on where to put it if i save it to disk (i do not want to use a external flash drive)? For information i will be using a vera 3.

Thanks in advance

How often does the data change? This may affect whether writing to the internal flash (“drive”) is a good idea or not.

How expensive is it to recompute the data? One common approach with embedded devices is to just recreate the data when you need. Naturally, this isn’t always possible.

The largest value I’ve ever stored in a plugin’s Lua variable is a table of about 200 strings, each string 5 bytes long and keyed by a three-character string. Allowing for overhead that is probably only a scant few kilobytes all up. And that had all kinds of problems on a Vera2. It became silently corrupted when the Vera2 ran out of RAM.

Ok, than i really shouldn’t store that much data in a plugin variable.

I’m not able to recompute the data but i could put it on an server. Unfortunately that would mean i cant access the data if i lost internet access.

The data will only be updated once a day which i guess shouldn’t put to much strain on the internal flash, so maybe the best thing would be to store it to file? I think I’ve read somewhere a recommendation on where in the file system to save “user files” but i cannot find it, any ideas on the were to put those files?

[tt]/etc/cmh-ludl[/tt] (default directory for user uploads)?

ok, thank you, i didn’t know that. I’ve really got a lot to learn…