Skip to main content

No project description provided

Project description

deconzpy

Build Status Coverage Status

Homeautomation Library for the tech savvy (depending on zigbee/deconz-rest)

This should be a library to easily build home automation scripts on top of the deconz-rest api It can be used to easily issue comands to devices connected to deconz, subscribe to events and mix the two. For example: on motion -> switch light on

Sample Code

from deconzpy import Router
router = Router() # Router is a singelton, can be called in multiple places and will return the same Router Object
##
# print some objects
##
sensors = router.getAllSensors()
for s in sensors:
    s.println()
print("---")
lights = router.getAllLights()
for l in lights:
    l.println()

# subscribe to websocket (for updates)
router.startAndRunThread()

#get motion sensors
bewegungsmelder = router.getSensorsByIcon("🏃‍♂️")

def onMotion(sensor, key_that_changed, oldval, newval):
	print("somebody moved - or stoped moving")

bewegungsmelder[0].subscribeToAttribute("state_presence", onMotion)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for deconzpy, version 0.9.6
Filename, size File type Python version Upload date Hashes
Filename, size deconzpy-0.9.6.tar.gz (9.7 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page