However the UV value from Weather seems to be different.
On the devices page the UVI value shows 4.0.
If use the code below
Code: Select all
local outside_solar=domoticz.devices(2219)
domoticz.log('get value for solar device 2219 ')
local outside_solar=outside_solar
local file = io.open('/home/pi/Documents/SandeSolar.txt','w')
file:write(outside_solar, "\n")
file:close()
os.execute("chmod a+rw /home/pi/Documents/SandeSolar.txt")If I use the following line
"local outside_solar=tostring(outside_solar)"
the file created contains "table: 0x696f6a28" rather than the 4 I see on the Domoticz page.
I'm obviously missing something. Can anyone help out please.