Transform:scale not working in OpenHAB 3.3.0 for Windspeed from OpenWeatherMap

  • Platform information:
    • Hardware: Raspberry Pi 3B+
    • OS: _ Raspbian GNU/Linux 11 (bullseye) - Linux 5.15.32-v7+
    • Java Runtime Environment: which java platform is used and what version
    • openHAB version: 3.3.0
  • Issue of the topic:
    After upgrading from OH version 3.2.0 to 3.3.0 the transform:SCALE which is stated in the items file is no longer processed. The windspeed is read from Openweathermap (as logged) but the item is not changed.

the lines in the item file:

Number	Weer_Amst_buitentemp	"Buitentemp [%.1f °C]"	<temperature>	(Weer)                  { channel="openweathermap:weather-and-forecast:api:amst:current#temperature" }
Number	Weer_Amst_wind		"Wind [%d Bft]"         <wind>          (Weer)		            { channel="openweathermap:weather-and-forecast:api:amst:current#wind-speed" [profile="transform:SCALE", function="beaufort.scale"] }

Log file shows:
2022-09-01 12:43:16.380 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘Weer_Amst_buitentemp’ changed from 23.22 to 23.4
2022-09-01 12:43:16.411 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘WeatherandForecast_OutdoorTemperature’ changed from 23.22 °C to 23.4 °C
2022-09-01 12:43:16.424 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘WeatherandForecast_WindSpeed’ changed from 18.504 km/h to 24.084 km/h

The temperature value is assigned to the item, the windspeed, including transform:scale is not. The windspeed item remains value 1, even though the windspeed varies between 3 and 4 today.

This non-functioning was -I think- introduced after upgrading to version 3.3.0

Anyone any suggestions on what could be the problem and how to resolve?

Thanks !

The file beaufort.scale:

[..1.85[=0
[1.85..7.41[=1
[7.41..12.96[=2
[12.96..20.37[=3
[20.37..29.63[=4
[29.63..40.74[=5
[40.74..51.86[=6
[51.86..62.97[=7
[62.97..75.93[=8
[75.93..88.90[=9
[88.90..103.71[=10
[103.71..118.53[=11
[118.53..]=12

I think the handling of the windspeed was changed. Somehow the value is transformed from km/h into m/s and used for the scale function. That’s why it’s mapping to 1 Bft instead of 3 or 4.
This behaviour is different since OH 3.2.0.

1 Like

Solved it by recalculating the beaufort.scale values to m/s, beaufort.scale:

[..0.513[ = 0
[0.513..2.03[ = 1
[2.03..3.6[ = 2
[3.6..5.658[ = 3
[5.658..8.23[ = 4
[8.23..11.317[ = 5
[11.317..14.406[ = 6
[14.406..17.492[ = 7
[17.492..21.092[ = 8
[21.092..24.694[ = 9
[24.694..28.808[ = 10
[28.808..32.925[ = 11
[32.925..] = 12

Comment: I think it’s the other way round; the binding channel supplies the raw value in m/S units or whatever else it wishes, and the OH framework then does its best to establish a default unit for the target Item, auto-converting before the Item update.

What you see as an Item state result does not necessarily reflect the actual linked channel data.