D-Link W215智能插头接口。
pyW215的Python项目详细描述
安装
使用pypi索引安装
pip install pyW215
用法
#!python3frompyW215.pyW215importSmartPlug,ON,OFFsp=SmartPlug('192.168.1.110','******')# Where ****** is the "code pin" printed on the setup card# Get values if available otherwise return N/Aprint(sp.current_consumption)print(sp.temperature)print(sp.total_consumption)# Turn switch on and offsp.state=ONsp.state=OFF
注意:您需要知道您的设备的IP和密码。密码写在侧面。
工作固件版本
- 2.02版
- 2.03版
- 2.22版
注意:如果您在通过D-Link应用程序升级到支持的最新固件时遇到问题。如果问题仍然存在,请随意打开有关该问题的问题。
部分支持
- v1.24和v1.25(状态变化和电流消耗正常,但不支持读数温度)
- D-Link W110智能交换机D-Link W110智能交换机(仅支持状态查看和更改)
如果你有其他固件或硬件版本的工作,请让我知道。