Page 1 of 1

reading environment variables

Posted: Tuesday 19 March 2024 19:34
by koensch
Does anyone know if (and how) system environment variables can be read in a dzVents script?

Re: reading environment variables

Posted: Tuesday 19 March 2024 20:19
by waltervl
You can use a shellcommand to list them with a standard Unix/windows command and parse the command output (.data) into Dzvents. See more info in
https://www.domoticz.com/wiki/DzVents:_ ... _execution

Re: reading environment variables

Posted: Wednesday 20 March 2024 10:04
by boum
https://www.lua.org/pil/22.2.html

Code: Select all

print(os.getenv("HOME"))