i've been using a script for a long time, but after updating Domoticz it throws an error:
Script part:
Code: Select all
tempfilename = "UnifiController.tmp" -- Temp JSON output file
local f = io.popen("stat -c %Y " .. tempfilename)
local last_modified = f:read()
if (os.difftime (os.time(), last_modified) > 30)
then
-- All kind of actions are executed here.
-- Execute url
-- Execute url
read_login = os.execute(url_login)
read_open = os.execute(url_open)
read_logout = os.execute(url_logout)
end
Error: [string " ..."]:14: bad argument #2 to 'difftime' (number expected, got nil)
Any ideas? I know it's probably because of a change in LUA, but i cant find it.
Tnx in advance!