[SOLVED] Homematic: HM-MOD-EM-8 state "open" "closed" is reversed

Good morning everyone,

i have an issue with my HM-MOD-EM-8 - 8 - channel sender.
It is configured in “window contacts” mode and is working well - except that the status values are reversed. When i look at the values in Homematic they are correct - but in openhab classic UI (and in the logfiles as well) they are reversed.

Any clue how to solve this problem?

PS: I know that i can configure the values for open and close in Homemmatic device config. But as said the device is working well in homematic and other apps that are using the homematic RPC - like tinymatic.


This (inverting Contact status) can be done with a Transformation on each Item - IF your binding supports transforms.

Many thanks for your swift reply.

it seems that homematic binding only supports the following transformaton syntax

Contact KontaktFensterKuechesuedenLinks "Fenster Küche Süden Links [MAP(swap.map):%s]" (gFensterkontakte) {channel="homematic:HM-MOD-EM-8:NEQ1XXXXX:OEQXXXXXXX:1#STATE"}

the transformation unfortunately only changes the display value :frowning: Any idea how i can change / map the value permanently?


You need a proxy item and change the state accordigly:

Contact KontaktFensterKuechesuedenLinks_proxy
rule "Invert contact"
    Item KontaktFensterKuechesuedenLinks changed
    if (triggeringItem.state == OPEN) KontaktFensterKuechesuedenLinks_Proxy.postUpdate(CLOSED)
    if (triggeringItem.state == CLOSED) KontaktFensterKuechesuedenLinks_Proxy.postUpdate(OPEN)

Perhaps worth logging an enhancement request against Homematic binding for transformation support. It is a useful feature to match external exceptions to OpenHABs idealized workings.

Sounds good - thanks.

Hey Vincent,

thanks a lot for the workaround. works great and helps me also to solve another issue with homematic thing that sends the wrong status. (String instead of OPEN CLOSE)


Thanks, please tick the solution.