[APP][Pro] TP-Link Smart Devices KASA - central topic

Hi Laurens,

Mmm, that’s a shame. I see two issues:

  1. something in your network is causing connectivity issues
  2. the app/Homey can’t deal with this.

The error is thrown in dgram.js, which is not part of the code of the app, but part of Homey core if I am not mistaken. I will check this with the developers on Slack.

Now about your network, do you have issues with other devices and/or apps? What’s strange is that it is not a general issue. And it is not just a matter of the (TP-Link) device not being reachable, the app can deal with that. I have a plug lying around which is not connected but still in Homey. The app can’t reach the device, but this does not cause any issues.

Do you use fixed IP addresses, by using DHCP reservations or static assignments, or dynamic?

What I find interesting is that both your devices get a timeout at the same time. It seems that Homey can’t reach either of them? Do you have any issues with wifi?

I’ll see if any of the developers have any idea about the dgram.js error.

Update: do you have anything filtering ARP on your wifi by any chance? Or a pihole (adblocker that filters stuff) perhaps?

Another question: does it help to restart just the app?

Hi Anne,

I will change my network and make a special SSID where the tp link’s are connected to. It could be a case that they are hopping between AP’s continuously. But all worked fine, until the homey was updated to v3.1. That’s the reason why i made the link between the problem and the update should be the reason.

Also the hs110’s are connected to the tp link Kasa app, where they are always connected and never gave any problems with disconnection or something similar. Let’s hope the dram.js will bring some results.

Ps. Enjoy your fresh donated starbucks coffee😜

Hi Laurens,

I have discussed the issue with a developer who knows a lot more about node.js then I do. The probem is that a socket is created but closed (for unknown reasons) before the client can use it.

Unfortunately, the error is thrown in an async event handler, which means it cannot be caught in the app.

It is possible that Athom changed something in 3.1.0 that causes or makes the issue worse, but that’s something we’ll never know, there’s no logging or debugging that can be done (except by Athom, but they are busy redesigning the appstore :grimacing:).

That leaves trying to troubleshoot what is going on in your network.

You do not have other wifi issues with Homey or other Homey apps? Do you have separate 2,4 and 5GHz SSIDs? In the past Homey had issues connecting to SSIDs which used both, although I believe this has been worked out in the meantime… 2,4 GHz is the safe bet.

Do you have the ‘dynamic ip’ option enabled in the app (for use in case the ip addresses for the plugs are assigned dynamically)? If can use fixed ip addresses (by reserving them for the plugs in your dhcp server) you don’t need that option which rules it out that as a possible contributing factor.

The library I use in the app can be run from a pc… You could test with that, but I expect that will work without problems, there seems to be a weird Homey interaction going on I am afraid.

It also seems that you are the only one having these issues at the moment, I have not received any other crashreports for a while… While this doesn’t help you much it means that it must be possible to get it to work for you too :+1:

Aan za, nov. 16, 2019 om 03:58, Laurens de Vos via Homey Community Forum athom@discoursemail.com schreef:

Hi Anne,

Again for your support! I changed my network so the plugs have a static IP address now. The dynamic ip option was not working as i expected. From now on with the static ip’s on the plugs the app is not crashing anymore. I will keep you in touch when it is happening again, but for now it looks good😃

Hi Anne,
Thank a lot for your apps, just start to use it today.
Good link and integration in my homey pro, but I’m not able to monitor consumption data.
Do I miss something?
Thanks,

@Dumacos, if you have a HS110 plug, you will see the power usage in the mobile interface, in https://insights.homey.app, and you will have flowcards which allow flows to be made based on the power consumption.

The HS100 plug does not include power metering capabilities, and neither does the Homey driver for the device, so no power metering output will be logged or displayed, and there will be no power related flowcards.

So the question is, do you have the HS110, or the HS100?

Hi Anne,

Thanks for your reply, it is HS110, the one which is able to monitor.
I gonna check again but my worry is about the visibility on the apps, no data.
Thanks

Anna,
I checked on the insights…even there no data.
Sorry to bother you but I need you help.
Thanks again

@Dumacos if there’s no data in the app, I wouldn’t expect any in the insights either.

This raises the following questions: can you turn the plug on and off through the Homey app? Do you see the ‘energy’, ‘current’, ‘power’ and ‘voltage’ symbols like in the screenshot (but then with empty values I guess…)? If the view is not present, it would seem that you are using the HS100 driver.

Did you use the auto-discovery feature when adding the plug to Homey? Can you check the type, version and firmware details in the Kasa app?

Screenshot_20191122-122947_Homey|249x500

Hi Anne,

I confirm it’s HS110, i share a screen copy about the homey app (empty) and data from Kasa (I have data on their app)

Auto discovery didn’t work, I filled IP address manually.
Strange situation?
Thanks

@Dumacos the most logical explanation seems to be that you selected the HS100 driver instead of the HS110 driver. Try to add another TP-Link device, select the HS110 driver, and then it should auto-discover the plug (the HS100 driver cannot auto-detect an HS110 plug).

Setup has been made in a proper way for HS110.
Do you other advises ?
Thank you so much

@Dumacos in that case I have no idea. I have several HS110 Hardware version 2.0 / Firmware version 1.5.4 myself, that shouldn’t be a problem. I have just taken a brand new HS110 and included it without issues, it immediately showed power usage data.

Running the app from the cli (see [HOW TO] CLI install method) will give more output that might help pinpointing the issue. You can also try to use one of the many other tools/scripts to connect to the plug to see if you can figure out what’s going wrong.

Good morning and thank you Anne,

Setup in Homey for TP link items and specially the HS110 doesn’t recognise my plugs when I launch automatic start discovery.

As I’m not familiar with the CLI processes and I don’t dare to do it.

I don’t understand why me compare other users where it seems to be a classic automatic setup. I never met difficulties to install several things, more or less 20, in my homey except that one ?

Thanks a lot and have a great weekend

-------- Message d’origine --------

I think we need to take a step back and look at network connectivity.

Can you turn the plug on and off through Homey? If not, are you sure the IP address is correct? Are the plugs and Homey in the same wireless network?

I’m able to turn it on/off from homey.
Both are using the same network

-------- Message d’origine --------

Any chance of supporting the KP303 smart power board? I notice the API is supported in tplink-smarthome-api on github, along with the KP400. Edit: corrected model numbers

Hi @David_Horth you mean the KP303 (outdoor version of HS300 it seems)/ KP400 right?

These devices are not on the market here, or not yet anyway. I can have a look, the main thing to figure out is how to deal with multi-port devices in Homey, something I can probably look up in apps for similar devices. The rest is a matter of duplication for different variants (HS300/KP303/KP400).

Do you have any of these devices yourself, and are you willing to test a beta driver?

Hi @anne

The KP303 is a three way power strip with individual controls for each socket: https://www.tp-link.com/au/home-networking/smart-plug/kp303/. I have one and more than happy to be a beta tester.

1 Like

Hi, the App stopped working. What happend?
In the Homey App is written that the App stopped working and the Developper was informed.
Has noone else this problem?