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.

Source Distribution

deconzpy-0.9.16.tar.gz (10.9 kB view details)

Uploaded Source

File details

Details for the file deconzpy-0.9.16.tar.gz.

File metadata

  • Download URL: deconzpy-0.9.16.tar.gz
  • Upload date:
  • Size: 10.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.6.7

File hashes

Hashes for deconzpy-0.9.16.tar.gz
Algorithm Hash digest
SHA256 b1e0a7533941ef40a2f7dba96a1a2c3541ff561dbd743f2c91ab86f33d5736c4
MD5 806f884ed751539fd0d12a38e90d5689
BLAKE2b-256 7d3b5795da4cee1cfb0991ea31f5602af8acef74bcfdfa56a142689231e718bd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page