Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ECONNREFUSED errors #113

Open
probins opened this issue Nov 18, 2020 · 12 comments
Open

ECONNREFUSED errors #113

probins opened this issue Nov 18, 2020 · 12 comments

Comments

@probins
Copy link

probins commented Nov 18, 2020

I'm new to this stuff, so may well be missing something obvious.

I bought a HS110 a month ago, set it up with the Kasa app, and then used this api with it. This worked well, so I bought 2 more, and they also work well. A couple of days ago, my original one stopped working with this api, generating ECONNREFUSED errors, for example when running client.getDevice() for that host. The Kasa app however continues to work fine with all 3 plugs. I ran nmap -F for the IP address, and it tells me that the only port open is port 80. The others have 9999 open but not 80.

AIUI, both the Kasa app and this api use 9999, so I'm puzzled as to how the Kasa app continues to work without it. I tried deleting the plug in the Kasa app, and then recreating, but the same happens.

Can anyone tell me what is causing this, and/or whether I can manually configure the plug so the expected port is available for the api to use.

@plasticrake
Copy link
Owner

Are you in the UK?

@probins
Copy link
Author

probins commented Nov 19, 2020

yes

@plasticrake
Copy link
Owner

@probins
Copy link
Author

probins commented Nov 19, 2020

yeah, thanks, that seems to be the problem. The one that no longer works is on 1.1.0; the other 2 are on 1.0.4. Very irritating. Suppose I have to wait for some clever person to work out a fix.

Don't know if it's relevant, but the one that no longer works was shipped from Switzerland; the other 2 I bought from Amazon UK

@plasticrake
Copy link
Owner

It appears that tplink is downgrading firmware for users who ask. I hope to have support for the new firmware soon, as it appears some people have been able to figure it out already. Hard to do since I'm not in the UK so I have no devices to test with.

Check this issue thread for some details on how to potentially downgrade firmware:
home-assistant/core#43088

@probins
Copy link
Author

probins commented Nov 19, 2020

From that link and the link there to a thread on tplink's support site, it seems they've said they can downgrade, but haven't actually said how to do that. If there's a fix, then that would be a better solution, I think. Do you know why this issue only affects UK users? It's a Chinese company, right?

I'm interested in energy monitoring, and I'm on a Time of Use tariff, where the price changes every half hour to match wholesale prices. The Kasa app is useless for that, but I can use your api to read/log the cumulative kW every 30 mins.

@dragon2611
Copy link

@probins HW 4.1 is only available in the UK I think, so far it's only the Hardware revision 4.1 plugs (that I know of) that have gotten this particular firmware version.

I have some older V1 and V2.1 plugs, which did not get this update, they look identical but I guess the insides have changed.

@probins
Copy link
Author

probins commented Nov 22, 2020

yes, the plugs I have are all hardware version 4.1

@Justanotherhomosapien
Copy link

Appears you need to send you MAC address and hardware version to TPLink. Not sure whether to do this, as support for the new protocol does appear close.

@dragon2611
Copy link

They have mine although as of yet they haven't done anything with it, they also asked for a screenshot of Kasa showing the wrong timezone following a reset, which I was less than amused with given they already have a screenshot of that screen

@jamesbuckley
Copy link

From that link and the link there to a thread on tplink's support site, it seems they've said they can downgrade, but haven't actually said how to do that. If there's a fix, then that would be a better solution, I think. Do you know why this issue only affects UK users? It's a Chinese company, right?

I'm interested in energy monitoring, and I'm on a Time of Use tariff, where the price changes every half hour to match wholesale prices. The Kasa app is useless for that, but I can use your api to read/log the cumulative kW every 30 mins.

Thanks for raising this, I am in Ireland and I have the same issue, all my three plugs stopped working a couple of weeks ago, I only got around to investigating now. All have gotten a firmware upgrade to 1.1.0.
As a side note the upgrade nearly gave me a heart attack, I use them for lamps and my bedroom lamped turned itself on and off again at 3am one night. At least I'm guessing that was the upgrade and not some poltergeist

@probins
Copy link
Author

probins commented Feb 5, 2021

update, anyone? There seems to have been mixed success getting TPLink to downgrade the firmware, but on the positive side they don't seem to have upgraded either of my working plugs. python-kasa seems to be at least partly working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants