Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Automation script for KDhome (Home automation system) - http://krystiand.net/projekt/12/kdhome
- import kdhome
- class MotionDetector(kdhome.KDHome):
- def __init__(self):
- super().__init__()
- def onInputChangedEvent(self, id, name, newValue):
- if name == "DOOR" and newValue == True:
- self.setOutput("LIGHT", True)
- home = MotionDetector()
- home.connect("localhost", 9999)
- home.run()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement