Why is transformation service SCALE not available

Hello,

I try to use on OH1.8.2 the transformation SCALE but it does not work.
The transformation MAP works well but SCALE simply results in an error message

openhab1 why is transformation service SCALE not available

my items are specified like this

Number Weather_WindSpeed 		"Windgeschwindigkeit [%.0f km/h]"	<wind>			(gWeather_Chart_wind, gWeather) { http="<[openWeatherMap:60000:XSLT(OWM_weather_wind_speed.xsl)]" }
Number Weather_WindStaerke 		"Windstärke [SCALE(windBeaufort.scale):%.0f Beaufort]"	<wind>	(gWeather)	{ http="<[openWeatherMap:60000:XSLT(OWM_weather_wind_speed.xsl)]" }
Number Weather_WindStaerkeText	"Windstärke [SCALE(windBeaufortText.scale):%.0f]"	<wind>	(gWeather)	{ http="<[openWeatherMap:60000:XSLT(OWM_weather_wind_speed.xsl)]" }

The scale-file windBeaufort.scale looks like this

[0,1]=0
[1,6]=1
[6,12]=2
[12,20]=3
[20,29]=4
[29,39]=5
[39,50]=6
[50,62]=7
[62,75]=8
[75,89]=9
[89,103]=10
[103,118]=11
[118,400]=12

respectively windBeaufortText.scale

[0,1]=Windstille
[1,6]=leiser Zug
[6,12]=leichte Brise
[12,20]=schwache Brise
[20,29]=mäßige Brise
[29,39]=frische Brise
[39,50]=starker Wind
[50,62]=steifer Wind
[62,75]=stürmischer Wind
[75,89]=Sturm
[89,103]=schwerer Sturm
[103,118]=orkanartiger Sturm
[118,400]=Orkan

As Weather_WindSpeed shows reasonable values I know that I get values from OpenWeatherMap
and Weather_WindStraerke show the identical value as Weather_WindSpeed but is not translated to Beaufort.

Any I idea what I might change or how to debug further down.

Regards,
Axel

From the Migration tutorial

The SCALE transformation has evolved.

  • Old syntax that was [minbound,maxbound] has to be changed to [minbound…maxbound].
  • Note that you now have the ability to exclude bounds from the ranges (e.g. ]minbound…maxbound]) and also define open ranges[minbound…].

I don’t know if this means that the SCALE transform was changed for OH 1.x as well but I suspect that might be the case.

A bit off topic, however you shouldn’t use a transformation on that topic to get beaufort value. That’s one of the build in conversions of the binding!

Number Wind_Speed_Beaufort "Windspeed Beaufort [%d]" {weather="locationId=home, type=wind, property=speed, unit=beaufort"}

The old scale-files used a different range definition as OH2 does.
Therefore, as I run OH1.8.2 I use the [minbound,maxbound] style.

Regards,
Axel

I use the http variant to get the weather information as I was not able to get the weather binding working (for whatever reason, I do not know).
But as http works fine and is able to cache the request I decided to use it.

Regards,
Axel

My point is that the SCALE transform has continued to evolve and change. Perhaps the new 2.x style is needed for 1.x too.

I tried both styles for scale-files but none is working.
I have the impression that something more fundamental is wrong/missing.
Maybe I need to install further add ons or similar, I do not know.

I never used the SCALE transform and have been off of 1.x for quite some time so will be of no further help.