Björn's world
November 30, 2021

HM-SEC-RHS feat. openHAB

Posted on November 30, 2021  •  2 minutes  • 241 words  • Other languages:  Deutsch
Table of contents

HomeMatic radio-controlled window rotary handle sensor HM-SEC-RHS

For my window contacts, I rely on a low-budget solution with magnetic contacts , which gives me the state open (open or tilted) or closed. WWhat the sensors cannot do, however, is the state “locked”. For the shutter control of the patio doors this can be problematic when the sun goes down, which means that the shutters are lowered, but I’m fetching firewood. Nobody then wants to have to wait until dawn on the terrace (if possible in winter) for the shutters to allow access again.

So I need a sensor on the patio doors that tells me the locking status. Here I rely on the HomeMatic HM-SEC-RHS, which is simply inserted under the rotary handle of the window.

In openHAB, this contact can be integrated as usual via UI or text file:

// conf/things/homematic.things
Bridge homematic:bridge:XXX1234567 [ gatewayAddress="?",gatewayType="ccu",callbackHost="?" ]
{
  Thing HM-Sec-RHS YYY1234567 "door"
}
// conf/items/myitems.items
String Door_State "Door [%s]" {channel="homematic:HM-Sec-RHS:XXX1234567:YYY1234567:1#STATE"}

The HomeMatic binding only returns the state for this device as a string. In a provisional arrangement, I had a rule that reacted to changes to the string item and then updated the status of the actual contact item. A bit of a hassle, I think. My current solution does the mapping directly on the item configuration by the “map” transformation extension:

// conf/items/myitems.items
Contact Door_State "Door [MAP(window.map):%s]" {channel="homematic:HM-Sec-RHS:XXX1234567:YYY1234567:1#STATE" [profile="transform:MAP", function="homematic2contact.map"] }
// conf/transform/homematic2contact.map
CLOSED=CLOSED
OPEN=OPEN
TILTED=OPEN
=UNDEF

Photo credit Banner

Follow me