Door/Window rule not triggering

I am currently trying to create a rule based on magnetic sensor triggering.

My issue is that my rule never triggers - I might have a little issue while writing my things and my items, but I can not find it (and I followed the examples in the documentation).

Here is my item:
Contact UsaBaie_Status { channel="mihome:sensor_magnet:<GatewayId>:<ItemId>:isOpen" }

Here are my xiaomi things:

Bridge mihome:bridge:<GatewayId> "Xiaomi Gateway" [ serialNumber="GatewayId", ipAddress="", port=9898, key="developerKey", pollingInterval=6000 ] {
    gateway GatewayId[itemId="GatewayId"]
    usa_baie ItemID[itemId="ItemID"]

And here is the rule

rule "Status usa baie"
    Item UsaBaie_Status changed
	logInfo("got here");

I tried at the rule Channel "mihome:sensor_magnet:<GatewayId>:<ItemId>:isOpen" triggered but it does not work too.

Also, was looking through the log and I can not find any status changed updates there. When the thing was found by PaperUI I could see status changing from OPEN to CLOSED

I’m not a user of this binding, but when looking into the Xiaomi-Doc I saw that the name of the thing is the link to the channel of the item. So in my understanding your item should mean:

Contact UsaBaie_Status { channel="mihome:usa_baie:<GatewayId>:<ItemId>:isOpen" }


logInfo() requires two strings; if your rule triggered, you should see an error in openhab.log. Keep an eye in there when testing rules.

logInfo("myrule", "my trigger " + UsaBaie_Status.state.toString)

no semicolon required

1 Like