home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.23k stars 30.58k forks source link

tp-link devices not found on full system restart #31769

Closed trentjw closed 4 years ago

trentjw commented 4 years ago

The problem

TP-link is lost when doing full system restart only after a couple of server restarts they are found and some of them come back as switch.unnamed_device_x

Environment

Problem-relevant configuration.yaml

discovery: False
switch:
- host: 192.168.1.82
- host: 192.168.1.2
strip:
- host: 192.168.1.251 
- host: 192.168.1.217

Traceback/Error logs

Additional information

devices include hs200, kp200, hs110, hs300

tried both discovery: false and true does not affect issues it also appears to struggle if a device is in the on position when Home assistant is restarted straight up will not find any tp-link devices if IP address are not manually added for each device switch.unnamed_device_x seems only to show up randomly on the hs300 switches

probot-home-assistant[bot] commented 4 years ago

Hey there @rytilahti, mind taking a look at this issue as its been labeled with a integration (tplink) you are listed as a codeowner for? Thanks!

mhutton81 commented 4 years ago

I am having the same issue as you are. I get random dope outs on a restart I might get half of the devices to show up one time and the other half the next but never all of them at the same time. I have my devices broken out in a tplink.yaml file and haven't used the integration at all.

trentjw commented 4 years ago

mhutton81 is there a way to force a name on the device switches so it doesn't randomly change, hard to automate when the name changes I know about the friendly name but when it goes from switch.coffeemaker to switch.unnamed_device_2 breaks alot of stuff

I also have a separate tplink.yaml file but the intergration seems to automatically load up

mhutton81 commented 4 years ago

I am not sure about the name change because mine all stay the same. I think that maybe the integration is causing the problem when you have a sperate tplink.yaml file. Just my 2 cents

rytilahti commented 4 years ago

This is duplicate of #28912.