Persist Data in Lua / LS300


I’m attempting to persist data over reboots using this type of command when triggered via an AirVantage data download:

local persist = require ‘persist’‘ip’,‘’)

At start up my Lua app loads the value that may have been stored using:

local ip = persist.load(‘ip’)

Unfortunately the ip value is always nil. What am I doing wrong?

I was following these docs:

ALEOS Software Version: 4.4.4 ALEOS Build number: 004
Device Model: LS300

Thanks in advance.


Hi stEngDev,

In what ‘context’ are you executing your application? Are installing your app, or running it using the "run as " button in the Dev Studio? (i.e. not installed)
When you do not install the app (i.e. “run as”) it does not create the persist store on the device for this app. The data is only written to RAM so it does not survive reboot.

The persist API only works when you install your application.
Can you confirm your context use case ?

Ah, I am debugging… I will install and test.

Yup, that was the problem. Thanks for that.