TP-Link multiple networks (slightly different)

After the latest update, my TP-Link switches are unavailable. I’ve removed the original platform configuration and done it via the TP-Link component documentation (introduce 0.89 and not 0.24). All IoT devices are on an isolated network, with my Home Assistant installation running two NICs: one on the privileged network, and one on the isolated network. I see “No route to host” errors in the HA log. I have connectivity to the device from the host, and I can see the device using pyHS100 directly.

Anyone have a similar configuration?

2 Likes

Replying to my own post…

The issue was one of my configured switches not being available (unplugged and unreachable). The rest are fine, and commenting out that device restored the rest.

RECOMMENDATION: To improve error handling, report an individual device as unavailable, rather than bombing out the entire component.

1 Like

I’m seeing exactly the same…

Previously used:

 switch tplink-hs110-01:
     platform: tplink
     name: tplink-hs110-01
     host: tplink-hs110-01

 switch tplink-hs110-02:
     platform: tplink
     name: tplink-hs110-02
     host: tplink-hs110-02

 switch tplink-hs110-03:
     platform: tplink
     name: tplink-hs110-03
     host: tplink-hs110-03

Now using:

tplink:
    discovery: false
    switch:
        - host: tplink-hs110-01
        - host: tplink-hs110-02
        - host: tplink-hs110-03

As -02 and -03 are not in use right now, unless those lines are commented out, not even -01 is available. Logs seem to show the whole tplink: is u/s.

Thanks!

" RECOMMENDATION: To improve error handling, report an individual device as unavailable, rather than bombing out the entire component."

I second this recommendation. I have four TPLink plugs that I don’t have plugged in all the time. Now I have to edit the config file each time I use one or don’t use one. Can’t use discovery because they are on different network.

1 Like

Same here. Same issue. I have my tplink sensors on another vlan. I booted up a fresh docker on the 10.0.1.x network and am seeing the following errors with this config.

tplink:
  discovery: false
  light:
    - host: 10.0.8.252

error:
2019-03-10 21:55:27 ERROR (MainThread) [homeassistant.core] Error doing job:
Task exception was never retrieved
Traceback (most recent call last):
File “/usr/src/app/homeassistant/helpers/entity_platform.py”, line 257, in _async_add_entity
if entity.unique_id is not None:
File “/usr/src/app/homeassistant/components/tplink/light.py”, line 82, in unique_id
return self._sysinfo[“mac”]
TypeError: ‘NoneType’ object is not subscriptable

I can only get one of my bulbs to work.

The component just crashes when I try and add a switch to it.

I had to use IPs:

tplink:
    discovery: false
    switch:
        - host: 172.26.6.5
        - host: 172.26.6.6
        - host: 172.26.6.7
        - host: 172.26.6.8