Skip to main content

devolo PLC devices in Python

Project description

devolo PLC API

GitHub Workflow Status PyPI - Downloads Code Climate maintainability Coverage Status

This project implements parts of the devolo PLC devices API in Python. Communication to the devices is formatted in protobuf and the IDLs were kindly provided by devolo. Nevertheless, we might miss updates to the IDLs. If you discover a breakage, please feel free to report an issue.

System requirements

Defining the system requirements with exact versions typically is difficult. But there is a tested environment:

  • Linux
  • Python 3.8.12
  • pip 20.2.4
  • httpx 0.21.0
  • protobuf 3.17.3
  • zeroconf 0.36.8

Other versions and even other operating systems might work. Feel free to tell us about your experience. If you want to run our unit tests, you also need:

  • pytest 6.2.5
  • pytest-asyncio 0.15.1
  • pytest-httpx 0.18

Versioning

In our versioning we follow Semantic Versioning.

Installing for usage

The Python Package Index takes care for you. Just use pip.

pip install devolo-plc-api

Installing for development

First, you need to get the sources.

git clone git@github.com:2Fake/devolo_plc_api.git

Then you need to take care of the requirements.

cd devolo_plc_api
python setup.py install

If you want to run out tests, install the extra requirements and start pytest.

pip install -e .[test]
pytest

Usage

All features we currently support on device basis are shown in our examples. If you want to use the package asynchronously, please check example_async.py. If you want to use it synchronously, please check example_sync.py.

If you don't know the IP addresses of your devices, you can discover them. You will get a dictionary with the device's serial number as key. The connections to the devices will be already established, but you will have to take about disconnecting.

from devolo_plc_api.network import async_discover_network

devices = await async_discover_network()
await asyncio.gather(*[device.async_connect() for device in _devices.values()])
# Do your magic
await asyncio.gather(*[device.async_disconnect() for device in devices.values()])

Or in a synchronous setup:

from devolo_plc_api.network import discover_network

devices = discover_network()
for device in _devices.values():
        device.connect()
# Do your magic
[device.disconnect() for device in devices.values()]

Supported device

The following devolo devices were queried with at least one call to verify functionality:

  • Magic 2 WiFi next
  • Magic 2 WiFi 2-1
  • Magic 2 LAN triple
  • Magic 2 DinRail
  • Magic 2 LAN 1-1
  • Magic 1 WiFi mini
  • Magic 1 WiFi 2-1
  • Magic 1 LAN 1-1
  • Repeater 5400
  • Repeater 3000
  • Repeater 1200
  • Repeater ac+
  • Repeater ac
  • dLAN 1200+ WiFi ac
  • dLAN 550+ Wifi
  • dLAN 550 WiFi

However, other devices might work, some might have a limited functionality. Also firmware version will matter. If you discover something weird, we want to know.

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

devolo_plc_api-1.1.0.tar.gz (85.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

devolo_plc_api-1.1.0-py3-none-any.whl (67.2 kB view details)

Uploaded Python 3

File details

Details for the file devolo_plc_api-1.1.0.tar.gz.

File metadata

  • Download URL: devolo_plc_api-1.1.0.tar.gz
  • Upload date:
  • Size: 85.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.16

File hashes

Hashes for devolo_plc_api-1.1.0.tar.gz
Algorithm Hash digest
SHA256 19031c3adbf6e61cc25abcb20182b851fa041dffe0ab8ca2b7ab2fb5e8951792
MD5 4dd747b6830a7a3a8b78df0ff67b4484
BLAKE2b-256 7905ffa64f58e54a701bb34e8073cd966b29374dc6df4614dcac2d4f839acc6f

See more details on using hashes here.

File details

Details for the file devolo_plc_api-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: devolo_plc_api-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 67.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.16

File hashes

Hashes for devolo_plc_api-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cedb9ce9e039ac5bea5542694021df9157488615e1b2bb563ab27a48a57a0cf2
MD5 0631316ea88157bf0fe2c61113dca690
BLAKE2b-256 74181490e657925ad2f2e86aadfa0efee4dae0810483ee35fcec104c8445acf5

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