Xiaomi Smart Home Gateway - Enable/Disable Arming Mode from OH

Hi guys,
I am new in the community and I hope I can fully participate with you.

I have recently installed OH2 and I am trying to build something interesting with it, especially to improve the limited functionality offered to me by the Xiaomi Mi Home system in my possession.

As many of you will know, the xiaomi gateaway allows, via the app, to enable and disable the alarm mode.

If you have a button that belongs to the Xiaomi ecosystem, you can also enable or disable this mode using a physical button.

By installing OH2 I was hoping to enable the alarm mode via other SW and HW interfaces.
For example via Habpanel or via third-party switch buttons.

To do this, I should find a way to send the command to the gateway to enable the alarm mode. How can I do?

I installed the “Xiaomi Mi Smart Home Binding” add-ons and added the Xiaomi Gateway (the light control works perfectly) but I can not find the channel to enable the alarm mode.

WARNING: I do not intend to trigger the alarm, but the alarm mode.

In addition I would like the gateaway to light up red when the alarm mode is enabled.

Thank you all if you can help me :sweat_smile:

Post a feature request on GitHub

i am looking for the same feature. i don’t really understand why after all this time, no-one is interested in this feature.

bump? Any suggestion on how to do this. Just an arming/disarming switch.

I’m interested in arming/disarming from OH as well, anyone figured this out yet ?

Hi
did you find how to do it ?
can you share ?

Not on how to arm disarm in Openhab. It should be possible though as in Home Assistant people have created a module to do exactly what you’re asking:

I’m still interested in this and found the direct commands somewhere

Query the status:
{“id”:65005,“method”:“get_arming”,“params”:[]}
{“result”:[“off”],“id”:65005}

Query the wait time:
{“id”:65006,“method”:“get_arm_wait_time”,“params”:[]}
{“result”:[5],“id”:65006}

set arming:
{“id”:65013,“method”:“set_arming”,“params”:[“on”]}
{“result”:[“ok”],“id”:65013}

set arming off:
{“id”:65014,“method”:“set_arming”,“params”:[“off”]}
{“result”:[“ok”],“id”:65014}

I guess this should work wth the ```
Gateway_Write.sendCommand

function ?

I created a basic thing for the gateway, a switch item and I see all these heartbeat messages comming in, so the basic things seems to work.

However the arming command is not working. This is the rule I tried

rule “Enable alarm beneden”

when

Item Gateway_beneden_alarm changed to ON

then

Gateway_beneden_Write.sendCommand("\"method\":\"set_arming\",\"params\":[\"on\"]")

end

any ideas why it’s not working ?

Anyone get this working? :slight_smile:

Still noone? It works in HomeAssistant, should work in OH too!

I’m still interested in this so if anyone is arming Xiaomi gateways through openhab ?