Page 1 of 1

Baro constants

Posted: Thursday 26 April 2018 9:37
by Number8
Hello
Baro constants currently features: BARO_STABLE, BARO_SUNNY, BARO_CLOUDY, BARO_UNSTABLE, BARO_THUNDERSTORM. Wunderground API returns a comprehensive set of forecast conditions that is: Chance of Flurries, Chance of Rain, Chance of Freezing Rain, Chance of Sleet, Chance of Snow, Chance of Thunderstorms, Clear, Cloudy, Flurries, Fog, Haze, Mostly Cloudy, Mostly Sunny, Partly Cloudy, Partly Sunny, Freezing Rain, Rain, Sleet, Snow, Sunny, Thunderstorms, Unknown, Overcast, Scattered Clouds.

I'm wondering whether the number of dzvents constants is a current limitation of dzvents or a Domoticz limitation.
Thank you

Re: Baro constants  [Solved]

Posted: Friday 27 April 2018 14:45
by waaren
Short answer: the number of BARO constants are limited in domoticz

if you look in the source file main/RFXtrx.h you'll find:

#define baroForecastNoInfo 0x00
#define baroForecastSunny 0x01
#define baroForecastPartlyCloudy 0x02
#define baroForecastCloudy 0x03
#define baroForecastRain 0x04

and in dzVents/runtime/device-adapters/barometer_device.lua
local constMapping = {
['stable'] = 0,
['sunny'] = 1,
['cloudy'] = 2,
['unstable'] = 3,
['thunderstorm'] = 4
}

The Baro forecast from domoticz are based on the current atmospheric air-pressure and therewith the forecast quality is limited. Given this limited forecast quality it would not add a lot of value to distinguish more weather characteristics.
I know that the buienradar forecast is also based on a lot of other information and I would be surprised if the Wunderground API returns a forecast based only on the same barometer value.

Re: Baro constants

Posted: Saturday 28 April 2018 9:41
by Number8
Thanks waaren for the detailed answer

Re: Baro constants

Posted: Friday 28 September 2018 23:14
by hestia
Hello waaren
BARO_PARTLY_CLOUDY seems to be a nill value (from https://www.domoticz.com/wiki/DzVents:_ ... _scripting)
The others are ok
The result of a print test: nothing for BARO_PARTLY_CLOUDY =>

BARO_NOINFO
noinfo
BARO_SUNNY
sunny
BARO_PARTLY_CLOUDY
BARO_CLOUDY
cloudy
BARO_RAIN
rain

Could you advise with the right value?

Thanks in advance

Re: Baro constants

Posted: Saturday 29 September 2018 0:57
by waaren
hestia wrote: Friday 28 September 2018 23:14 ...BARO_PARTLY_CLOUDY seems to be a nill value (from https://www.domoticz.com/wiki/DzVents:_ ... _scripting)
...
This is a typing error in the wiki. The right "constant" name is BARO_PARTLYCLOUDY whch has the value 'partlycloudy'

Re: Baro constants

Posted: Saturday 29 September 2018 11:46
by hestia
Thanks waaren for this quick answer