Created
May 5, 2016 22:45
-
-
Save jcollie/f46de277e9339880cd6ec47cad4ec4e2 to your computer and use it in GitHub Desktop.
Ring.com integration with openHAB via IFTTT and my.openHAB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Group MyOpenHAB |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Strategies { | |
default = everyUpdate | |
} | |
Items { | |
// persist all items every hour and on every change | |
MyOpenHAB* : strategy = everyUpdate | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Switch ring_front_door_motion "Ring Front Door Motion" (MyOpenHAB) {} | |
Switch ring_front_door_ring "Ring Front Door Ring" (MyOpenHAB) {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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