I have a number of rooms where there is only one thermostat to control and one or more window/door contacts. These set up fine in OH3. When a window is open the state is “open”. All is good.
In another room I have two thermostats and three window contacts. I have set them up as a group in Homematic IP (CCU). I have added the group to OH3 via the semantic model. When I open one of the windows, the state string shows as “window status: open” and not “open” as expected. If the window is closed, it shows “window status: locked” and not “closed”.
If I add a state description metadata and enter anything in the Options field, the state displays “CLOSED” or resp. “OPEN”. But I want to be the same as the other window contact states so that when a window is open the badges show on the associated page.
Has anyone got any ideas what I’m doing wrong. I looked into the map files and adding key values, but that doesn’t seem to help. Or do I need to set this up differently in Homematic?
Have you searched the documentation? This forum is not a substitute for that. I can think of a couple of possibilities but if it is important to you, please show some effort.
I wrote that I had tried using a map file to transform the state string, but the explanations in the documentation are sometimes not that helpful or bewildering for a hobby programmer. I always use the documentation and only resort to asking the community when I have I spent considerable effort trying to resolve my problem. I have come quite a far way on my own so far.
What’s the point of a community if I can’t ask a question. I often only need a pointer in the right direction.
I eventually found somewhere where I can now link my map file to the channel link. I found this solution by reading various threads in the openhab community: Help MAP transformation with HTTP Binding OH3 - Add-ons / Bindings - openHAB Community. This shows a screenshot which showed me how to refer to a map file. I then added the state.map file to the item as shown below:
Hi everyone, I tried a lot of different things, but they didn’t work. I then removed the State channel from the thermostat and added the window contact as a separate item to the room. And hey it works. Sometimes the solution is a lot easier than one thinks. And went down the wrong track because I though i had to keep everything together as it was a group in Homematic.