Skip to main content

python api client for digitalSTROM

Project description

PyPI version Travis CI build status Coverage Status MIT Licence

pydigitalstrom

Run bundled docker

$ docker-compose build

$ docker-compose up -d

$ docker-compose exec python bash

Status

Tested devices

Device name Color group / device type Features
GE-KL200 Yellow (light) get status, turn on, turn off, toggle, identify, update status
GE-KM200 Yellow (light) get status, get brightness, turn on, turn off, toggle, identify, set brightness (if output mode permits), update status/brightness
GR-KL200 Grey (blinds) set position, get position, update position
SW-ZW200-F Black (joker) (adaptor plug) get status, turn on, turn off, toggle, update status
SW-TKM200 Black (joker) (push button) get status, update status
dSM12 Meter get metadata, get current power consumption, get overall power consumption, update metadata/power consumption
dSS IP Server get metadata, update metadata
Scene Meta turn on, turn off

Example usage

# -*- coding: UTF-8 -*-
import urllib3

from pydigitalstrom.client import DSClient

# disable certificate warnings - dss uses self signed
urllib3.disable_warnings()
config_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'config', 'auth.json')
client = DSClient(host='https://dss.local:8080', username='dssadmin', password='mySuperSecretPassword',
                  config_path=config_path, apartment_name='Apartment')
lights = client.get_lights()
for light in lights.values():
    print(light.name)
    print(light.unique_id)
    light.turn_on()

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

[Unreleased]

[0.1.2] - 2018-09-10

Fixed

  • Some API calls should not expect a result node in response

Changed

  • Added more gitignores for docker env and app config

[0.1.1] - 2018-09-10

Added

  • Tests for blind, light, meter and scene
  • Add move_up, move_down and stop to blind

Changed

  • DSDevice and DSTerminal signature of request now allows for responses without result node

[0.1.0] - 2018-09-09

Changed

  • Complete rewrite

Added

  • (yellow) Support for GE-KL200, GE-KM200
  • (grey) Support for GR-KL200
  • (black) Support for SW-ZW200-F, SW-TKM200
  • (meter) Support for dSM12
  • (server) Support for dSS IP
  • Support for scenes

[0.0.1] - 2016-11-23

Added

  • Initial release

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

pydigitalstrom-0.1.2.tar.gz (11.5 kB view details)

Uploaded Source

File details

Details for the file pydigitalstrom-0.1.2.tar.gz.

File metadata

  • Download URL: pydigitalstrom-0.1.2.tar.gz
  • Upload date:
  • Size: 11.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.5.6

File hashes

Hashes for pydigitalstrom-0.1.2.tar.gz
Algorithm Hash digest
SHA256 65485615343bdda056ec4e716269068ceef24627aa5fc453ab99d818a2811765
MD5 4357923903670a1a32a397fd4de55027
BLAKE2b-256 19c0be26795d9cb05c3fda9cf4b3b3876910ae46d9b177e9967b8ed0e9855857

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