Hi,
When I print the "Wind" values from DZvents to the log the gust value is lower then the speed value. This seems not oké.
local windsnelheid = domoticz.devices('Wind').speed
local windstoten = domoticz.devices('Wind').gust
The values in the dashboard are correct, the gust is higher than the speed. Is this a bug?
Kind regards, Rob
Values 'speed' and 'gust' from DZvents not correct?
Moderator: leecollings
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Values 'speed' and 'gust' from DZvents not correct?
I don't see this.
domoticz V3.9049
dzVents 2.41
2018-03-19 23:38:14.246 dzVents: Gust: 3.6
2018-03-19 23:38:14.246 dzVents: Speed: 2.5999999046326
domoticz V3.9049
dzVents 2.41
2018-03-19 23:38:14.246 dzVents: Gust: 3.6
2018-03-19 23:38:14.246 dzVents: Speed: 2.5999999046326
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
-
schulpr
- Posts: 137
- Joined: Thursday 01 January 2015 9:10
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Contact:
Re: Values 'speed' and 'gust' from DZvents not correct?
@waaren: can you try it with the settings on km/h in stead of m/s?
When I switch to meters per seconds it works as expected.
BR, Rob
When I switch to meters per seconds it works as expected.
BR, Rob
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Values 'speed' and 'gust' from DZvents not correct?
@schulpr, You are right; I see the same behaviour when switching to km/h.schulpr wrote: Tuesday 20 March 2018 7:31 @waaren: can you try it with the settings on km/h in stead of m/s?
When I switch to meters per seconds it works as expected.
BR, Rob
Looked a bit into it and the explanation is that the speed value comes directly via the dataset from domoticz to dzVents. The conversion to km/h is already done when it arrives at dzvents. The gust value is obtained from the rawdata part which is an integer (10 times the value in m/s). No further conversion is done in the device-adapter wind_device.lua so gust will allways be shown in m/s no matter what you set in your display settings for windmeters.
Last edited by waaren on Tuesday 20 March 2018 10:12, edited 1 time in total.
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
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Values 'speed' and 'gust' from DZvents not correct?
dzVents script to get the display setting for windmeter so you can do your own conversion if/when needed.
Code: Select all
--[[
get WindmeterDisplay setting using the (async) json call
on my (PI3) system it takes on average 0.5 seconds until script comes back with settings
So after script was triggered twice (once by device or timer and 2nd time by httpResponse)
]] --
return {
on = {
devices = { 'Your triggerdevice name'} ,
timer = { 'every 30 minutes' }, -- timer or device to trigger the script. Can be both or one of them
httpResponses = { 'windmeterSetting' } -- When json call is answered it will trigger this
},
execute = function(domoticz, item)
local debug = true
function debug_print(myLine)
if debug then print("***** getWindmetersetting ****** " .. myLine) end
end
local myIP="nnn.nnn.nnn.nnn" -- your domoticz system IP
local myPort="nnnn" -- your domoticz port
local windmeterDisplaylist = {"m/s" ,"kn/h" , "mph" , "Knots" , "Beaufort" }
if item.isHTTPResponse then
debug_print("Triggered by HTTPResponse")
if (item.ok) then -- statusCode == 2xx
local setting = item.json.WindUnit
debug_print("Setting value: " .. setting .. " ==>> Wind meter display: " .. windmeterDisplaylist[setting + 1] )
end
else
debug_print("Triggered by device or timer")
domoticz.openURL({
url = "http://" .. myIP .. ":" .. myPort .. "/json.htm?type=settings",
method = "GET",
callback = "windmeterSetting"
})
end
end
}
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
-
schulpr
- Posts: 137
- Joined: Thursday 01 January 2015 9:10
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Contact:
Re: Values 'speed' and 'gust' from DZvents not correct?
@waaren,
For use in my script I just calculate the value 'm/s' with *36/10 to get the right km/h for now.
local windsnelheid = round((domoticz.devices('Wind').speed),1)
local windstoten = round((domoticz.devices('Wind').gust)*36/10,1)
Thanks anyway for your investigation.
Kind regards, Rob
For use in my script I just calculate the value 'm/s' with *36/10 to get the right km/h for now.
local windsnelheid = round((domoticz.devices('Wind').speed),1)
local windstoten = round((domoticz.devices('Wind').gust)*36/10,1)
Thanks anyway for your investigation.
Kind regards, Rob
Who is online
Users browsing this forum: No registered users and 1 guest