Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Interface for d-link W215 Smart Plugs.

Project Description


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.


Install using the PyPI index

pip install pyW215


from pyW215.pyW215 import SmartPlug, ON, OFF

sp = SmartPlug('', '******')
# Where ****** is the "code pin" printed on the setup card

# Get values if available otherwise return N/A

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

Release History

This version
History Node


History Node


History Node


History Node


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
(7.3 kB) Copy SHA256 Hash SHA256
Wheel py2.py3 Aug 31, 2017

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Kabu Creative Kabu Creative UX & Design Google Google Cloud Servers Fastly Fastly CDN StatusPage StatusPage Statuspage DigiCert DigiCert EV Certificate