Programming VeraAlerts with Lua

I am programming VeraAlerts for PLEG actions using Lua and have not been able to find much discussion of the “dofile” command in the forum.

Essentially, what I am trying to do is create a text file with code I have written containing different variables relating to statuses for my devices that I wish to call in my code and execute as a Lua Chunk.

Thus far, I created the code in text file format, renamed to .lua, and then uploaded to my VeraPlus. When I try to reference the filename via the “dofile” command, it is unable to find it (maybe I am just putting in the incorrect path?). When I try to call the file with the “require” command it accesses the file, but, I believe because it does not execute the code, only maintains the statuses of the variables as of the time that the system was rebooted or Lua was restarted.

Any advice would be greatly appreciated. Being able to reference and execute a .lua file with variables would be a much easier way to centralize my variables for the multiple actions and alerts I wish to run.

This is a screen scripting issues … there are plenty of discussions of that there.