Skip to main content

python api client for digitalSTROM

Project description

PyPI version Travis CI build status Coverage Status MIT Licence


Run bundled docker

$ docker-compose build

$ docker-compose up -d

$ docker-compose exec python bash


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
import os

from pydigitalstrom.client import DSClient

# disable certificate warnings - dss uses self signed
async def test():
    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')
    await client.initialize()
    lights = client.get_lights()
    for light in lights.values():
        await light.turn_on()


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.


[0.3.2] - 2018-09-16


  • Allow passing an asyncio loop to the DSListener

[0.3.1] - 2018-09-16


  • Support update callbacks on AreaLight

[0.3.0] - 2018-09-16


  • Support for AreaLight, basically converted scenes 0-9 to proper light devices for the area
  • Event listener that can update the AreaLight status


  • BREAKING - devices etc are now initialized by DSClient.initialize() and DSClient getter functions are not async anymore

[0.2.0] - 2018-09-11


  • Test coverage increased


  • BREAKING - All things async
  • Use aiohttp to make calls and provide api-using functions as async
  • Comply with PEP8 formatting rules
  • BREAKING merged DSTerminal and DSDevice into DSDevice
  • BREAKING minimum required Python version is now 3.5.3
  • Multi version Docker environment to run full tox suite

[0.1.2] - 2018-09-10


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


  • Added more gitignores for docker env and app config

[0.1.1] - 2018-09-10


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


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

[0.1.0] - 2018-09-09


  • Complete rewrite


  • (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


  • 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.

Filename, size & hash SHA256 hash help File type Python version Upload date
pydigitalstrom-0.3.2.tar.gz (17.9 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page