Turn on / off the alarm

Hello! I have xiaomi gateway 2. Is it possible to turn on / off the alarm through openhab2 as in the application?


Hi
did you find how to do it ?

rule “Alarm ON/OFF”

when
Item Corridor_Right changed
then

{
if (Corridor_Right.state == ON)
{Gateway_SoundVolume.sendCommand(1) Gateway_Sound.sendCommand(10) Alarm_Timer.sendCommand(ON) sendTelegram(“bot1”, “Alarm on”) }
if (Corridor_Right.state == OFF)
{Gateway_SoundVolume.sendCommand(2) Gateway_Sound.sendCommand(11) sendTelegram(“bot1”, “Alarm off”)}
}
end

rule “Alarm”

when
Item Corridor_Right changed

then
var timer = createTimer(now.plusMinutes(1), [|
if (Corridor_Right.state == ON && Alarm_Timer.state == OFF )
{ Gateway_SoundVolume.sendCommand(2) Gateway_Sound.sendCommand(1) sendTelegram(“bot1”, “Alarm”)

      }
])

end