Hi there,
im using openHAB 2.5 and having problems with the displaystate of my sunblinds/awning.
When the sunblind is fully extendet, the percentage from the knx actor is at 100%
My Home App on iPhone does show the Icon of a closed blind.
If i set the blind to 20% -> The Home App shows 80% opend, but its only 20% open.
I want to get this in sync.
Im using the KNX Binding.
Thing Definition
Type rollershutter : Markise "Markise" [ upDown="3/1/20+3/1/22", stopMove="3/1/21", position="3/1/26+<3/1/23" ]
Item Definition
Rollershutter Markise "Markise [%d %%]" <rollershutter> [ "WindowCovering" ] { channel="knx:device:bridge:jalosieaktor:Markise"[profile="transform:JS", function="InvertPercent.js"]}
I found a possible solution with the JS Transform Plugin but i cannot get it to work: Reverse the percentage for the rollershutter
I tried to implement it in the thing and item definition:
Item Definition
Rollershutter Markise "Markise [%d %%]" <rollershutter> [ "WindowCovering" ] { channel="knx:device:bridge:jalosieaktor:Markise"[profile="transform:JS", function="InvertPercent.js"]}
Thing Definition
Type rollershutter : Markise "Markise" [ upDown="3/1/20+3/1/22", stopMove="3/1/21", position="3/1/26+<3/1/23", transformationPattern="JS:InvertPercent.js", transformationPatternOut="JS:InvertPercent.js" ]
InvertPercent.js
(function(i) {
if (isNaN(i)) {
return (i);
}
return(100-i);
}) (input)
Thanks for helping out