Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/home-assistant-ecosystem/python-dingz
Python API for interacting with Dingz devices
https://github.com/home-assistant-ecosystem/python-dingz
dingz home-assistant iot python3 smart-home
Last synced: 26 days ago
JSON representation
Python API for interacting with Dingz devices
- Host: GitHub
- URL: https://github.com/home-assistant-ecosystem/python-dingz
- Owner: home-assistant-ecosystem
- License: apache-2.0
- Created: 2019-12-24T22:44:48.000Z (almost 5 years ago)
- Default Branch: dev
- Last Pushed: 2023-02-16T21:59:33.000Z (over 1 year ago)
- Last Synced: 2024-05-21T19:27:21.950Z (6 months ago)
- Topics: dingz, home-assistant, iot, python3, smart-home
- Language: Python
- Homepage:
- Size: 71.3 KB
- Stars: 2
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGELOG.rst
- License: LICENSE
Awesome Lists containing this project
README
python-dingz
============Python API for interacting with `Dingz `_ devices.
This module is not official, developed, supported or endorsed by iolo AG or
myStrom AG. For questions and other inquiries, use the issue tracker in this
repository please.Without the support of iolo AG and myStrom AG it would have taken much longer
to create this module which is the base for the integration into
`Home Assistant `_. Both companies have provided
and are still providing hardware, valuable feedback and advice. Their
continuous support make further development of this module possible.See `api.dingz.ch `_ for the API details.
Limitations
-----------This module is at the moment limited to consuming sensor data, device details,
device configurations and states.
The front LED can be controlled but buttons requires you to programm them by
yourself.No support for setting timers and schedules.
Requirements
------------You need to have `Python 3 `_ installed.
- `dingz `_ device
- Network connection
- Devices connected to your networkYou need to know the IP address of the devices. Please consult your router
documentation to get this information or use the `dingz` CLI tool.Installation
------------The package is available in the `Python Package Index `_ .
.. code:: bash
$ pip install dingz
On a Fedora-based system or on a CentOS/RHEL machine which has EPEL enabled.
.. code:: bash
$ sudo dnf -y install python3-dingz
For Nix or NixOS users is a package available. Keep in mind that the lastest releases might only
be present in the ``unstable`` channel... code:: bash
$ nix-env -iA nixos.python3Packages.dingz
Module usage
------------Every unit has its own web interface: `http://IP_ADDRESS `_ .
See `example.py` for detail about module.
How to operate shades / dimmers
-------------------------------.. code:: python
d = Dingz("ip_address_or_host")
# Fetch config, this has to be done once to fetch all details about the shades/dimmers
await d.get_devices_config()# Fetch the current state of the lights/vers
await d.get_state()# Get details about shade
shade_0 = d.shades.get(0)
print("Blinds: %s Lamella: %s" % (shade_0.current_blind_level(), shade_0.current_lamella_level()))# Operate shade
shade_0.shade_down()# Turn on light
d.dimmers.get(2).turn_on(brightness_pct=70)CLI usage
---------The package contains a command-line tool which support some basic tasks.
.. code:: bash
$ dingz discover
License
-------``python-dingz`` is licensed under ASL 2.0, for more details check LICENSE.