Any script for "from wind speed to wind gust"
Moderator: leecollings
-
- Posts: 153
- Joined: Monday 17 February 2014 9:12
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Any script for "from wind speed to wind gust"
My weather station has no wind gust. Domoticz uses wind speed for wind gust. Any script made by any one to calculate over time from wind speed to wind gust?
-
- Posts: 153
- Joined: Monday 17 February 2014 9:12
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Any script for "from wind speed to wind gust"
Well I sorted it out for meself thx.
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Any script for "from wind speed to wind gust"
@tonbor, can you please share your solution ? It might help others on this forum.
Thx.
Thx.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
- Posts: 153
- Joined: Monday 17 February 2014 9:12
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Any script for "from wind speed to wind gust"
Wind Speed and calculeted Wind Gust.
-
- Posts: 153
- Joined: Monday 17 February 2014 9:12
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Any script for "from wind speed to wind gust"
return {
active = true,
on = {
devices = {'Wind ws2357'} -- global windsensor & update trigger
},
data = {
windGust = { history = true, maxItems = 10, maxMinutes = 10 } -- declare list
},
execute = function(domoticz)
local windDev = domoticz.devices('Wind ws2357') --declares your wind device
local windUpdate = domoticz.devices('Windsnelheid') -- local = global Windspeed
local windGustUpdate = domoticz.devices('Wind vlaag') -- local = global Wind Gust
local windSpeed = windDev.speed --read only windspeed value from wind device
windUpdate.updateCustomSensor(windSpeed) -- update global windsnelheid
domoticz.data.windGust.add(windSpeed) -- add windspeed to list
windGustUpdate.updateCustomSensor(domoticz.data.windGust.maxSince('00:10:00')) -- update wind vlaag with max of list of latest 10 minutes
active = true,
on = {
devices = {'Wind ws2357'} -- global windsensor & update trigger
},
data = {
windGust = { history = true, maxItems = 10, maxMinutes = 10 } -- declare list
},
execute = function(domoticz)
local windDev = domoticz.devices('Wind ws2357') --declares your wind device
local windUpdate = domoticz.devices('Windsnelheid') -- local = global Windspeed
local windGustUpdate = domoticz.devices('Wind vlaag') -- local = global Wind Gust
local windSpeed = windDev.speed --read only windspeed value from wind device
windUpdate.updateCustomSensor(windSpeed) -- update global windsnelheid
domoticz.data.windGust.add(windSpeed) -- add windspeed to list
windGustUpdate.updateCustomSensor(domoticz.data.windGust.maxSince('00:10:00')) -- update wind vlaag with max of list of latest 10 minutes
Last edited by tonbor on Tuesday 24 July 2018 10:21, edited 3 times in total.
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Any script for "from wind speed to wind gust"
Thanx. Good example and use of the historical function in dzVents data
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Who is online
Users browsing this forum: No registered users and 1 guest