Interface for d-link W215 Smart Plugs.
Project description
pyW215
pyW215 is a python3 library for interfacing with the d-link W215 Smart Plug.
The library is largely inspired by the javascript implementation by @bikerp dsp-w215-hnap.
Installing
Install using the PyPI index
pip install pyW215
Usage
#!python3
from pyW215.pyW215 import SmartPlug, ON, OFF
sp = SmartPlug('192.168.1.110', '******')
# Where ****** is the "code pin" printed on the setup card
# Get values if available otherwise return N/A
print(sp.current_consumption)
print(sp.temperature)
print(sp.total_consumption)
# Turn switch on and off
sp.state = ON
sp.state = OFF
Note: You need to know the IP and password of your device. The password is written on the side.
Working firmware versions
v2.02
v2.03
v2.22
Note: If you experience problems with the switch upgrade to the latest supported firmware through the D-Link app. If the problem persists feel free to open an issue about the problem.
Partial support
v1.24 and v1.25 (State changing and current consumption working, but no support for reading temperature)
D-Link W110 smart switch D-Link W110 smart switch (only state viewing and changing is supported)
If you have it working on other firmware or hardware versions please let me 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
Built Distribution
File details
Details for the file pyW215-0.7.0.tar.gz
.
File metadata
- Download URL: pyW215-0.7.0.tar.gz
- Upload date:
- Size: 5.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 375d1336d24c033cb00961069ad530df5e8760ca8bd7f77c8bd968fff6b0748b |
|
MD5 | f15b915e1f9e57b3b5a601a5065cd326 |
|
BLAKE2b-256 | 6f4ac8cff44540c36235193a923b34df1d83c5be134dda9f08f3c5cce46046df |
File details
Details for the file pyW215-0.7.0-py3-none-any.whl
.
File metadata
- Download URL: pyW215-0.7.0-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a7764bf911bf7cd6b1a5cc557d1d24289c788f5b1d54050cff8e1809ebbd318 |
|
MD5 | a78dcfc2d82f01b7c2b151711daf7a7d |
|
BLAKE2b-256 | d29840bb622abad2e791dd7a01e087b5bb81c5315e7e186af4b24592e9e40bb2 |