Dlink Smart Plug Wi‑Fi DSP‑W115

Does anyone know if this still works? I created an IFTTT account but when trying to connect to a web hook with Dlink I get an error message.

I have a W115 too, connection work with (not in HA, in web browser)
username : Admin
password : PIN CODE (see it on device)

Maybe this can help…

2 Likes

I don’t know if still someone is interested, but i got it work with a python script with the appdaemon add-on.

Here is the script and the manual how to trigger on and off the plug with a python script:


For me it worked without the token just with the pin. Just abort the installation as its written in the manual.

Next you setup the Appdaemon 4 add-on in Home Assistant an integrate the script.

1 Like

So i´ve come this far that when running “python3.8 dspW245.py” i get the response : Sending HTTP upgrade request, sending sign_in to get salt, sending get device status, Turning LED #1 ONm Turning LED #2 off, Sending keep alive"

But here it stopsl How do i get this to work by the Appdeamon.
Everything now is in /config/custom_components/dspW245/

When reading the dspW245 guide and “The device can then be interfaced with using the code below.” where is this going?

Running Rpi4 and hassio all updated.

I´m not a good developer but for me it works fine like this:

  1. I copied the content of the dspw245.py up to column 358 in one config. The last part (360 - 371) isn’t nesessary.

  1. For each Dlink Plug I created a seperat config with the following code:

  2. You have to create the modules and classes in the apps.yaml
    appsyaml

You can test your script right on your PC e.g. with MS visual studio

let me now If you need further informations. Hope it helps you :slight_smile:
Merry X-Mas and greetings from Germany

2 Likes

Final Edit : W115 works good in HA, not connected to MyDlink app, but also works by Google Home.
W118 works with Google TTS and Google Assistant. (Needs to be in MyDlink app)

Not gonna buy anymore Dlink wall-switches.

Hi there.
I’ve been trying to integrate the DSP-W245 power strip but i’ve never used appdaemon.
Can you write a tutorial a bit more detailed pls?
thank you!

This was working fine for me but when Home Assistant updated it’s Python version that implemented higher security cypher as default, it broke and I have been unable to find a solution. I always get “sslv3 alert handshake failure (_ssl.c:997)”.

1 Like

To bypass the ssl exception caused by the new version of python, the following code change must be made:

195a196,200
>         ctx = ssl.create_default_context()
>         ctx.check_hostname = False
>         ctx.set_ciphers('DEFAULT')
>         ctx.verify_mode = ssl.CERT_NONE
196a202
>
198c204
<         self.socket = ssl.wrap_socket(sock)
---
>         self.socket = ctx.wrap_socket(sock, server_hostname="<host-name-of-your-power-strip>")
1 Like

Has anyone managed to read the power consumption?

DSP-W115 hardware does not support power metering.

Not even for drink w245?