Generating derived weather calculations with the Weather Calculations Binding

Ah, I think you are now using a binding version that operates with Quantity Types, Units of Measurement.(see the output)
But you’re feeding it undimensioned numbers.(see the inputs)

Interesting. I received the weather information from the standard OpenWeatherMap Binding. In Europe OpenWeatherMap deliveres the QuantitiTypes (%unit% values) °C for temperature and m/s for speed. They did not deliver the OH defaut metric unit for speed (km/h). Anyhow, I wonder where the correction should be made. In the openweathermap binding or the weathercalculation binding or should it be done on my site?

You should not need to make any corrections/conversions.
Within the openHAB framework it is legitimate to compare two Quantities like 20°C with 42°F and it magically sorts itself out.

That does assume the binding takes full advantage of Quantity Types, though.

However …

Whatever you think you are doing here, these are not Quantity Type Items and/or you are not loading them with Quantity values (with units)

I spent some time looking at the wind chill calculation, and there does seems to have been some conversion errors (though that probably doesn’t matter if you’re not sending the right units into the binding). I’ve rearranged some of the conversions and am happier with the results. Can you give this new version a try?

https://bitbucket.org/hww3/org.openhab.binding.weathercalculations/downloads/org.openhab.binding.weathercalculations-2.5.11-SNAPSHOT.jar

Hi Bill,
Good to hear from you. Defining the Quantity Types did not solve the problem. It looks like my Quantity Types are correct now. I installed your last .jar version. Be aware that the version number is not changed and I presume it is the new version. The Feel temperature and Windchill are still negative. According to your equations (the case hifinal<80F, T< 10C) the Wind_Chill should be +7,4C instead of -9C. The Feel_temperature is also not correct (should be approx +5C instead of -9C) but that is because you implemented an estimation based on Feelslike = WindChill in case of T<10C (line 156). Here you could consider implementing an other equation like: https://www.lenntech.nl/calculatoren/gevoelstemperatuur-berekenen.htm

The version number on the jar won’t change as it reflects the version of the openhab libraries it’s built against, but the internal version (visible with bundle:list) shows the timestamp of the build. I’ve uploaded a new version just to be sure. There was an error in the calculation that I fixed earlier this week (and added a few tests to confirm things are working properly).

The definition of Feels Like temperature /is/ the Wind Chill below 50F:

Hi Bill
Thanks. I understand your model starting points. Would it be possible for you to check your Windchill output in case the temperature = 49F and Windspeed = 8 mph. I would expect a Feels Like = Windchill = approx. 45F and not a negative number.

Hello how to configure this binding ?
Here is my thing file

Thing weathercalculations:weathercalculations:tempest "Weathercalculation Tempest" [altitude=6,	stationAltitude=324, temperatureItem="weatherflowsmartweather:tempest:HB-000xxx:ST-000xxxx:temperature", pressureItem="weatherflowsmartweather:tempest:HB-000xxx:ST-000xxxx:pressure", humidityItem="weatherflowsmartweather:tempest:HB-000xxx:ST-000xxxx:humidity", windSpeedItem="weatherflowsmartweather:tempest:HB-00026268:ST-00023138:wind_avg", rainFallItem="weatherflowsmartweather:tempest:HB-000xxx:ST-000xxxx:rain_accumulated"  ]

but no values are displayed

Hi @Gijsbert-

The current code calculates the wind chill for 49F/8mph=45.4F. I was able to replicate some of the odd numbers you were seeing with the previous version, which is how I discovered the problem. The version I uploaded earlier today should fix that problem.

One thing that may warrant discussion is the scale used by (all of) the conversions… the calculations are scaled to whole units, which might be undesirably coarse. I’d be willing to hear thoughts about that.

Hi @milo-

I configure everything using PaperUI, so I’m not sure what the item/thing file would need to look like. (Hopefully) there are some other folks here that can provide some guidance there.

Solved by using the items not the channel

Hi Bill,
It looks like being better. I have to wait for speeds > 3mph. The difference between the calculated windchill according to your equation listed before and the presented value (after OH scaling) is relative much (>10% ie 11,0C vs 9,8C).

Wind chill isn’t defined when wind speed is less than 3mph or temperature is above 50F. I think that changing the rounding scale to tenths rather than whole degrees will minimize these error, though I need to do some more investigation.

Hi Bill,
The windchill (and feel temperature) are still providing odd numbers (39,3F/5,3mph=14,0F or 4,07C/2,37m/s=-10C)

When I ran 4.07C and 0.45m/s through the calculation, I get 2.0C. Are you sure you’re using the newest version of the binding? The timestamp of the bundle in the bundle list should be 2.5.11.202011211559.

Hi Bill,

Try the initial state 4,07C and 2,37m/s.

The result is 1.9C.

I’ve updated the binding to expose one significant digit for these calculations. Please give that a try.

Bill

Hi Bill

Its working now.