"Correct" value for open / closed shutters

Hi,

this is a general question. For background I have setup ZWave roller shutters (devices Fibaro FGR-222 / FGR-223 and one Aeotec Nano Shutter ZW141-C) and all of them are wired so that on the iOS App or Basic UI the down arrow closes them - up arrow opens them (none is set to invert output directions or similar, I switched the wires until they worked as expected). Now some of them (I believe I have FGR-223 with old Firmwares where the RollerShutter item does not report back the position) report a value between 0 and 100 for the position and all of them have 0 for fully closed and 100 for fully open.

Nevertheless - basic ui and the iOS App display the icon “inverted” - as in 0 means fully open and 100 means fully closed. The sitemap uses a plain switch + label - nothing else (Switch item=ShutterDiningBlindsControl label="Dining Room")

Is this expected? What (from an OpenHAB 3 PoV) is the “correct” value for fully open / fully closed? I know I can invert on channel level or on sitemap level or even some of the devices allow to invert on device config level, but I want to fix it in the “right” place. Unfortunately having read many threads here in the community as well as searching the docs I was unable to find what SHOULD be the value for open).

And second question, if 100 is indeed supposed to mean fully open is this then a bug in sitemap / iOS App / basicui? Where should I report this?

FYI: Reading here I was under the impression that the value should represent the percentage of “open” - so 100 would mean 100% open (fully open) and that Homekit expects it reversed (0 is open / 100 is closed). Is this correct?

Greetings
.sascha

There really is no “correct” value. Some bindings report fully open as 0 and others report fully open as 100. This is often driven by choices made by the device vendors themselves. OH icons had to choose one approach, it couldn’t implement both.

There might be an option in the binding to invert the value to swap the 0 and 100’s meaning. If not you’ll have to copy the icons and change the names so the correct one is used for open and closed. See the docs on custom icons for details.

:smiley: Well I’d appreciate if Openhab could “choose” the right way, then bindings can follow along and in case some vendor is known for doing it the other way the device config could reflect that right away. (at least on ZWave Aeotec and Fibaro seem to aggree and Shelly does so as well, so easy for me :slight_smile: as I don’t have to cope with “both” variants.

And as written in the original post, ZWave directly allows to adjust that in the channel (if I interpreted that right) and even if not I think in the sitemap you can also “map” to reverse the meaning - and if all fails I was under the impression that one can add a “transformer” to an item “transforming” the value to what is desired.

Thanks for confirmation, that “I can do whatever I want” here :wink:

I would not put it like that.

openHAB Items are idealized models, deliberately designed to hide any device specific fiddly stuff.
All Dimmer type Items have state 0-100, where 0 corresponds to OFF. It’s up to the binding configuration to “fit” or adapt or map devices with 0-100, 1-255, 0-10 etc. properties to the internal standard. That may require manual configuration by you.

Likewise, all Rollershutter Items have state 0-100, where state 0 corresponds to fully open, the consequence of an UP command.
Again it is up to the binding to match the arbitrary properties of some external device to the internal model, so that all Rollershutter Items look and behave the same.

Short story, where a device offers the option to invert, you should choose 100=closed or you will get into a mess of kludges trying to work around it.

2 Likes

Indeed. So in terms of the OP’s question, “the” correct OH value is 100 for closed.
This is what all (non-binding) logic is being built on such as what will happen if you send an UP command or push the UP button in any UI, or the default icon to depend on closure percentage.
There’s per-thing (i.e. per physical device) options in ZWave and Shelly bindings to adapt to reversed wiring. There’s per-item options in Alexa skill and possibly others.

2 Likes