Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Ring.com integration with openHAB via IFTTT and my.openHAB
curl -X POST -H "Content-Type: text/plain" -d ON http://localhost:8080/rest/items/ring_front_door_motion
curl -X POST -H "Content-Type: text/plain" -d ON http://localhost:8080/rest/items/ring_front_door_ring
Group MyOpenHAB
Strategies {
default = everyUpdate
}
Items {
// persist all items every hour and on every change
MyOpenHAB* : strategy = everyUpdate
}
Switch ring_front_door_motion "Ring Front Door Motion" (MyOpenHAB) {}
Switch ring_front_door_ring "Ring Front Door Ring" (MyOpenHAB) {}
rule ring_startup
when
System started
then
sendCommand(ring_front_door_motion, OFF)
sendCommand(ring_front_door_ring, OFF)
end
rule ring_front_door_motion
when
Item ring_front_door_motion changed to ON
then
createTimer(now.plusSeconds(30)) [|
sendCommand(ring_front_door_motion, OFF)
]
end
rule ring_front_door_ring
when
Item ring_front_door_ring changed to ON
then
createTimer(now.plusSeconds(30)) [|
sendCommand(ring_front_door_ring, OFF)
]
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.