D-link Smart Plug W215 Reliability

I have two of these smart plugs which I have been using in my Hass.IO configuration. The major issue has been the reliability of the smart plugs. They will work for 5 -7 days and then suddenly I will get an error similar to this

WARNING (SyncWorker_9) [pyW215.pyW215] Unable to open a connection to dlink switch 192.168.1.68

Thereafter I am not able to access the switch and all the automations that are using the switch fail.

Current configuration

switch:
  - platform: dlink
    host: 192.168.1.67
    name: Grow Tent
    username: !secret Grow Tent_username
    password: !secret Grow Tent_password
  - platform: dlink
    host: 192.168.1.68
    name: Kitchen
    username: !secret Kitchen_username
    password: !secret Kitchen_password

The D-link smart plugs are up to date with firmware 2.22b

Any thoughts on why this is happening?

Are they on a reserved/fixed ip?

When HA says they unavailable can they be pinged or accessed via other means?

They have fixed IP addresses and they can still be accessed via the Dlink app or pinged on the local network. However if I go to HA the status and readings such as energy consumption are shown as ā€˜unknownā€™.

Just bumping this question. Problems still occurring. Any ideas? Are the units inherently unreliable? Any alternatives?

I have exactly the same problem. The switch still works in the app. The only thing that helps is to restart the switch by removing it and plugging it in again. Does anyone know if the T-Link switch (with consumption meter) is more reliable?

Same issue here.

installed 10 days ago, tested and worked in HA (Hassbian, 0.69.1) then suddenly this problem.
Not sure when this happen but was close to (canā€™t say if across) update from 0.69 to 0.69.1

tried a bit of everything so far but i canā€™t understand how to fix it.

I deactivated IGMP snooping in my router and it seems like this helped.

what is it?

check: it is already disabled on my router but still experiencing issues.

my RPI can ping the smart plug but canā€™t connect now, while it was able before :frowning:

I still experience problems as well :frowning: Considering using a Sonoff POW or a T-Link switch.

Any news about this?

Just bumping this question. Problems still occurring. Any ideas?

I got tired and bought a tp-link hs100 instead, no problems yet.

I did almost the same but went for a sonoff plug with esphomeyaml custom firmware and MQTT
Zero issue so far, very reliable.

1 Like

Not sure if this is the right place to post this, but in previous project i used homebridge to connect to W215s and it killed the ability to use the Dlink app (i seriously donā€™t want that). Does the Home assistant plug in effect the dlink app or does it work with?

I have one W215 plug which I added to HA a while ago. Didnā€™t take long to see it wasnā€™t very stable and fell into ā€œunknownā€ state after some time. Didnā€™t want to get rid of the plug, so decided to do some debugging.

It turned out that the used pyW215 module has a bug. Due to the bug, once thereā€™s a some error like socket going offline, the module fails to reauthenticate again. I did a one-liner patch directly to my installation, and it seems to work. However, the error handling and recursion logic in the module seemed to be the real source of the problem, so I forked the module on github and made some refactoring. Some logging added as well (if enabled) and optimized authentication to happen only once every 30 secs.

You can find the commit in github fork. Havenā€™t done much testing and donā€™t have any other D-Link devices to test with.

Happy to test with my two W215 plugs, but no idea how I would do so.

Thatā€™s actually a good question. Iā€™m yet to take the deep dive into HA and python development, so I donā€™t know what would be the best way to do it. The HA integration refers to a package in public python package repository. So maybe thereā€™s a way to set up a custom/development package repository and/or have a development clone of the D-Link integration to refer to that. Donā€™t know yet.

Myself, I dug into the homeassistant docker container and just replaced the pyW215.py there. Seems to require console access (Iā€™m running HA as linux qemu virtual host). This of course isnā€™t quite proper way and wonā€™t survive updates etc, but allowed me to test it.

1 Like

I am also running Home Assistant in a Docker container, but I have no idea how I would be able to edit the and replace the pyW215.py file.

any news on this?
I am using two of these plugs with HA (docker)
problems:
-after a few days it looses the connection with even the d-link app, (and HA)
-HA displays only the switch option. I cant display the power consuption, however it should be available, since the d-link app has this data.

thanks!