EDIMAX Smart Plug Switch SP-1101W from Python

I wrote a simple Python class to access the „EDIMAX Smart Plug Switch SP-1101W„. The whole code could be found here.

EDIMAX SP-W1101W

EDIMAX SP-W1101W

For more information on how the communication with the Smart Plug works, see this post on ELV (available in German only).

The code could be used as library or as command line utility:

Using as library

p = SmartPlug("http://172.16.100.75:10000/smartplug.cgi", ('admin', '1234'))

# turn plug off
p.state = "OFF"

# turn plug on
p.state = "ON"

# get plug state
print(p.state)

Using as command line utility

turn plug on:

python smartplug.py -u http://172.16.100.75:10000 -l admin -p 1234 -s ON

turn plug off:

python smartplug.py -u http://172.16.100.75:10000 -l admin -p 1234 -s OFF

get plug state:

python smartplug.py -u http://172.16.100.75:10000 -l admin -p 1234 -g

Leave a Reply

You must be logged in to post a comment.