I am new to Lua scripting for the Exosite portal and the Lua language.
Is there a way I can declare a variable in a portal script so that it is accessible from other device scripts and other portal scripts? Anything I have tried just results in a “global namespace is reserved” error message. I would also like to be able to display a script variable value in a big number widget on a dashboard. I am not interested in the variable history so don’t need to waste a device dataport. I am also interested in using the portal timer but I don’t know how it works. timer.value always seems to ==1 and timer.wait() seems to wait forever. Any code examples or references to documentation that explains these things would be much appreciated.