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.
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ā.
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?
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.
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.
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.
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.