Why is transformation service SCALE not available


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


respectively windBeaufortText.scale

[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
[89,103]=schwerer Sturm
[103,118]=orkanartiger Sturm

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.


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.


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.


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.