D-Link Forums
The Graveyard - Products No Longer Supported => Other D-Link Products => DSP-W215 => Topic started by: serge.regina@wanadoo.fr on November 28, 2015, 06:12:39 PM
-
I have been using DLINK wireless systems for years and have been very happy with them. So decided to start some home automation tasks using DSP-W215. What a disappointment. No support for any home standards, no way to read power consumption through a simple http request, etc etC.
This product, even if very good on the hardware side is a joke thanks to myDlink / cloud poor software. How can DLINK release such a thing and keep it so closed ???
When will DLINK support some basic queries which could make this thing useful ???
An previous exploit which made it usable has been killed by DLINK in its new firmware. What a pity. Pleas do something. Thanks.
S.R.
-
These devices are designed to be simple to use and with little user intervention. I presume any advanced features were not added as most average home users just want to connect and have it work. If you desire more advanced features then you should contact D-Link support and ask them about this.
-
I managed to read measured values using HNAP. If you are intrested I can provide more info.
-
I managed to read measured values using HNAP. If you are intrested I can provide more info.
I'd be interested in how to read these values too.
-
There is a simple way, from what I know, to just grab it via python. I grabbed a large project off of the internet and skimmed it down to something simple. Make sure you have python. Make a new file. Paste these contents:
import sys
import urllib.parse
import urllib.request
import random
command = sys.argv[1]
postData = {'request': 'create_chklst'}
postData = urllib.parse.urlencode(postData).encode("ascii")
req = urllib.request.Request("http://{ip}/common/info.cgi?{rand}".format(ip='10.0.0.20', rand=str(random.random())), data=postData)
response = urllib.request.urlopen(req)
ret = response.read().decode("utf-8")
ret = ret.strip()
lines = ret.split("\n")
retVal = None
for line in lines:
if line.startswith("Meter Watt:"):
power = line.split()[-1]
if retVal:
raise ValueError("Two power readings in one response?")
try:
retVal = float(power)
except ValueError:
print("Error on string '%s'" % line)
print("Watts: %s" % retVal);
then run it via python3.
-
That code doesn't work with firmware version V2.20
It seems that info.cgi isn't available anymore.
-
That code doesn't work with firmware version V2.20
It seems that info.cgi isn't available anymore.
I just updated my firmware and only got to 1.13, how did you get 2.20?
It works on 1.13.
model=DSP-W215
product=mydlink Wi-Fi Smart Plug
brand=D-Link
version=1.13
build=03
macaddr=xx:xx:xx:xx:xx:xx
ipaddr=192.168.0.38
netmask=255.255.255.0
gateway=192.168.0.1
wireless=Yes
-
Maybe it depends on hardware version. Mine is B1
-
You're correct.
http://wrpd.dlink.com.tw/router/firmware/query.asp?model=DSP-W215_Ax_Default
<DSP-W215_Ax>
<Default>
<FW_Version>
<Major>01</Major>
<Minor>11</Minor>
<Date>2014-06-19</Date>
<Recommend/>
</FW_Version>
<Download_Site>
<Global>
<Firmware>
http://dlinkpp-s3.s3.amazonaws.com/DSP-W215/Ax/Default/0111/DSPW215A1_FW111b05.bin
</Firmware>
<Release_Note>
http://wrpd.dlink.com/router/firmware/GetReleaseNote.aspx?model=DSP-W215_Ax_Default_FW_0111
</Release_Note>
</Global>
</Download_Site>
</Default>
</DSP-W215_Ax>
http://dlinkpp-s3.s3.amazonaws.com/DSP-W215/Ax/Default/0111/DSPW215A1_FW111b05.bin (http://dlinkpp-s3.s3.amazonaws.com/DSP-W215/Ax/Default/0111/DSPW215A1_FW111b05.bin)
vs
http://wrpd.dlink.com.tw/router/firmware/query.asp?model=DSP-W215_Bx_Default
<DSP-W215_Bx>
<Default>
<FW_Version>
<Major>02</Major>
<Minor>01</Minor>
<Date>2014-10-13</Date>
<Recommend/>
</FW_Version>
<Download_Site>
<Global>
<Firmware>
http://dlinkpp-s3.s3.amazonaws.com/DSP-W215/Bx/Default/0201/DSP-W215B1_FW_201B02.bin
</Firmware>
<Release_Note>
http://wrpd.dlink.com/router/firmware/GetReleaseNote.aspx?model=DSP-W215_Bx_Default_FW_0201
</Release_Note>
</Global>
</Download_Site>
</Default>
</DSP-W215_Bx>
http://dlinkpp-s3.s3.amazonaws.com/DSP-W215/Bx/Default/0201/DSP-W215B1_FW_201B02.bin (http://dlinkpp-s3.s3.amazonaws.com/DSP-W215/Bx/Default/0201/DSP-W215B1_FW_201B02.bin)
-
Hi,
I recently bought also a Dlink smartplug, DSP-W215.
It works fine with an app on the iPad.
I am interested to control the switch from my home automation system based on Beckhoff CX Controller. My goal is to control the switch with URL’s like:
http:///cgi-bin/relay.cgi?switchon
http:///cgi-bin/relay.cgi?switchoff
http:///cgi-bin/relay.cgi?toggle
The Beckhoff controller can execute these URL’s for example when a light switch is pushed. If this works, the smart plugs will be a cost-efficient extension of my existing hard-wired home automation system.
What do I have to do to achieve this functionality? Or even better: is this possibility already present in the device?
Any help, tips or advise are welcome!
Thanks!
-
There is a simple way, from what I know, to just grab it via python. I grabbed a large project off of the internet and skimmed it down to something simple. Make sure you have python. Make a new file. Paste these contents:
import sys
import urllib.parse
import urllib.request
import random
command = sys.argv[1]
postData = {'request': 'create_chklst'}
postData = urllib.parse.urlencode(postData).encode("ascii")
req = urllib.request.Request("http://{ip}/common/info.cgi?{rand}".format(ip='10.0.0.20', rand=str(random.random())), data=postData)
response = urllib.request.urlopen(req)
ret = response.read().decode("utf-8")
ret = ret.strip()
lines = ret.split("\n")
retVal = None
for line in lines:
if line.startswith("Meter Watt:"):
power = line.split()[-1]
if retVal:
raise ValueError("Two power readings in one response?")
try:
retVal = float(power)
except ValueError:
print("Error on string '%s'" % line)
print("Watts: %s" % retVal);
then run it via python3.
I wanted to mention that this script worked for me with DSP W215 HW ver A1 firmware 1.24. There is a new HW version B1, I am not sure if this would work with that HW version (I don't believe so since B1 requires a password on scripts to run). I can confirm that my A1 unit doesn't work with scripts for B1 HW version, so they dont see to be backward/forward compatible.
As far as making it run, I don't know python so I had to figure out a couple of things:
1. It needs a parameter when you invoke the script. I don't know whether the parameter is important but it won't run without it. So I run python.exe wattlog.py anytexthere
2. You need to update your smart plug ip address inside (rigth now there is an ip address like 10.x.x.x). I only changed it one place.
3. There is no need to enter the device pin code inside the script (kind of bad if you think about security)
4. (optional) You can call python script inside a DOS bat file if you want to cycle through it and maybe put the output inside a log.txt file. Alternatively, if you know python I am sure you can cycle inside the scrypt.