I have an odd problem getting the value for UV data.
local solar_value = domoticz.devices(3444)
domoticz.log('Solar Shade device' .. solar_value )
throws this error
Script #4 lua:22: attempt to concatenate a table value (local 'solar_value')
so probably have to use RawData and it's probably text
so let's try
local solar_value0 = tonumber((domoticz.devices(3444).rawData[0]))
domoticz.log('Solar Shade Trigger value 0' .. solar_value0)
throws this error
#4.lua:26: attempt to concatenate a nil value (local 'solar_value0')
so try the next part of the data
local solar_value1 = tonumber((domoticz.devices(3444).rawData[1]))
domoticz.log('Solar Shade Trigger value 1' .. solar_value1)
and this gives me this in the log
Status: dzVents: Info: Solar Shade: Solar Shade Trigger value 14.7
but the UV value in Weather is 4.7
If I multiply the solar_value1 by 2 I get this
Status: dzVents: Info: Solar Shade: Solar Shade Trigger value 19.4
========================
New maths 2 x 4.7 =19.4 !
========================
Anyhow I also tried tonumber((domoticz.devices(3444).rawData[2]))
which gave me 10.0
and tonumber((domoticz.devices(3444).rawData[3]))
#4.lua:32: attempt to concatenate a nil value (local 'solar_value1')
What have I missed?
UV Data from Meteorologisk institutt Norway (Weather Lookup)
Moderator: leecollings
- waltervl
- Posts: 5902
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: UV Data from Meteorologisk institutt Norway (Weather Lookup)
See wiki https://www.domoticz.com/wiki/DzVents:_ ... #UV_sensor
To get the solar uv value use
To get the solar uv value use
Code: Select all
local solar_value = domoticz.devices(3444).uv
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
-
- Posts: 96
- Joined: Monday 23 May 2016 23:07
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: UV Data from Meteorologisk institutt Norway (Weather Lookup)
Sooooo simple....
Thank you!
Thank you!
Who is online
Users browsing this forum: No registered users and 1 guest