Server.permanent table

Does anyone knows how to use this?

I’ve used it in the past but found it to be a bit cumbersome have resorted to using nv. table and plan to use agents


if(_state==0 && “fridge” in server.permanent) {
_lastOpen = server.permanent.fridge;

server.setpermanentvalues works fine for me, but I thought you can do something else with server.permanent table, because it has a separate mentioning in the server object documentation

Here’s a simple two-part test program. Use save_data, comment it out, then toggle the power and run it again using only get_data. Thus verifying that the data was stored remotely. Other than this, I’m not sure what else you expect it to do?

`// Testing non-volatile, server-side storage

mytable <- {A=“ABC”,

function save_data()

function get_data()
if ((“A”) in server.permanent) // if index doesn’t exist, program fails, best to check before reading

foreach(idx,val in server.permanent)
    server.log("index="+idx+" value="+val);


imp.configure(“Storage test”, [], []);

I don’t know either, that’s why I don’t know why it has a mentioning in the documentation.
But your documentation helps me to make things a bit more efficient, thanks.
I’ll try that as well, maybe I get rid of that ping-pong communication… isn’t there yet, is it?

not officially will be part of Release 23. We’re in the final stages of testing the release, and are hoping to have it out sometime next week (or shortly after).