use Wind from Buienradar plugin in DzVents
Posted: Wednesday 22 July 2020 15:44
In this topic buienradar lua script I've found this code for LUA.
How can I convert this to DzVents? as an 'elseif'
The Buienradar device 'BR Wind' (in my case) gives the folowing data: 296.00;WNW;40;88;18.8;18.8
I want to use the 40 value (sSpeed) in this data-example, as is 4,0 m/s. If this value is 88 (=8,8m/s, 5bft) then ....
How can I do this?
Code: Select all
commandArray = {}
-- only check windspeed when Wind info is updated
if devicechanged['Wind'] then
sDirectionDegrees, sDirection, sSpeed, sGust, sTemperature, sFeel = otherdevices_svalues['Wind']:match("([^;]+);([^;]+);([^;]+);([^;]+);([^;]+);([^;]+)")
-- check whether the sunscreen is "out"
if (otherdevices['Sunscreen'] == 'Open') then
-- send warning when speed is over 60km
if sSpeed < 60 then
print('Windsnelheid hoger dan 60 km en Sunscreen is open.')
end
end
end
return commandArrayThe Buienradar device 'BR Wind' (in my case) gives the folowing data: 296.00;WNW;40;88;18.8;18.8
I want to use the 40 value (sSpeed) in this data-example, as is 4,0 m/s. If this value is 88 (=8,8m/s, 5bft) then ....
How can I do this?