Doudy wrote: Friday 18 October 2019 8:25
I have not yet understood the philosophy of the different variables :
E.g. local wind = dz.devices('AWindDir') and windir='windDirection'
wind = dz.devices('AWindDir')
this declares the variable 'wind' and assign the device object (which is a Lua table) dz.devices('AWindDir') to it
windir='windDirection'
the reply from your weatherstation give names to the various fields. For wind Direction it use the string windir. I want more descriptive names in the result table so if the script finds a name windir in the response, it will store a record in the result table using the string 'windDirection' as key and the found value as content.
I still have a problem with gustSpeed and Average wind.
These values are already send to the 'AWindDir' device.
This device combines the windDirection, windDirectionName, windSpeed, WindGust, outdoorTemperature and windChill.
If you want them also in a separate device, you will have to define them as custom sensor types with an X-as of m/sec
I updated the script in my post of Friday 06 September 2019 15:40 in this topic to include the option to have these values also in a separate device
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>>
dzVents wiki