core: HS300 reporting wrong number of plugs
Operating environment (Hass.io/Docker/Windows/etc.):
Hassio.io on a Pi4 4GB manually configured TPLink as a strip pointing to the device (HS300) Integration:
https://www.home-assistant.io/integrations/tplink/
Description of problem: TPLink does not auto discovery so I setup manually as a script. On startup / discovery sometimes the plug is reported as 5 sometimes as 6. it is a HS300 power strip.
Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):
Traceback (if applicable):
Additional information:
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 111 (46 by maintainers)
Thank you so much @TheGardenMonkey ! This has helped and my HS300 is working much better, all of the outlets show up now and the on/off functionality is working consistent enough to be used for my intended purposes. Thanks again.
I have 2 H300’s experiencing issues with plugs going unavailable. Just tried your latest changes. First time I have ever seen all my plugs online. All seem to be reporting properly and updating. Amazing work!
I’ll play around with it this weekend. It makes sense to me that this could happen though. I want to compare with some of the other changes proposed as well…I think there is a collection of changes that will make this integration more robust.
under
custom_componentsyou would add a directory namedtplink. You should download all of the files from the repo so that the contents look like:You do not have to delete your existing devices or disable anything else. HA will just ignore the out of the box one.
For my existing PR, all of the checks are passing so I am hopeful that means it will be merged soon.
@TheGardenMonkey - All my tplink devices have been working flawlessly over here with your fork of the tplink component. It sounds like adjusting the SLEEP_TIME = 2 works better with the strips, so that is the only change I would recommend. That is also the original setting I was using over here. Would be great to have this merged so I don’t have to keep re-copying it after each upgrade. I know the long term plan is to go with the new back-end library, but we really need this merged prior - as this has been an issue for almost a year.
Cool, I guess I was being too aggressive 😃. I did also get the same error you did btw on turning on my strip this morning (mine only has 5 of the ports, 1 port I always have on). I think the 1 second is hammering it too much and is likely the cause of the other issue since I haven’t seen it before when doing 2 seconds. I am going to keep it at 2 for now.
Thank you @MarkHofmann11 !
@mikesalz and @aLTeReGo-SWI was curious if either or both of you wouldn’t also mind validating. I am not seeing issues with controlling multiple switches at once and the hs300 seems to respond a little better than with my previous change.
I think I merged those changes in a few weeks ago as well…they are part of my pull request.
I’d be happy to help with testing.
I have 3 of the HS300’s (I’m in the USA) and am having issues getting them connected to Hass. 3 x 6 sockets means I have 18 sockets to come online after a Hass/Hass.io reboot, and I’ve never seen it successfully bring all 18 online.
I’m running .107.5 with Hass.io Supervisor 209 on Ubuntu 18.04.4. I am having no issues with either my Alexa integration nor my Sense integration.
Awesome, thanks!!! Just updated mine over here and it loaded fine this time. Will report back tomorrow after I give it time to run for awhile. I have a good number of TP-Link switches, and a bulb, so should be a good test.
Attaching the full file instead…i should have done that in the first place
switch.py.txt