03.10.2018, 13:17
I was thinking a script like this.
But this script is only working in an event.
-- Write data to a file in the local FTP
value = event.getvalue()
logdate = os.date('%Y.%m.%d %H:%M:%S', os.time())
csv = string.format('%q,%q,%q,%q\r\n', logdate, event.dst, grp.alias(event.dst), tostring(value))
log(csv)
file, error = io.open("home/ftp/outdoor_temp1.txt","a")
log(file,error)
file:write(csv)
file:close()
But this script is only working in an event.
-- Write data to a file in the local FTP
value = event.getvalue()
logdate = os.date('%Y.%m.%d %H:%M:%S', os.time())
csv = string.format('%q,%q,%q,%q\r\n', logdate, event.dst, grp.alias(event.dst), tostring(value))
log(csv)
file, error = io.open("home/ftp/outdoor_temp1.txt","a")
log(file,error)
file:write(csv)
file:close()