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

Not Resolved - ECONNRESET with Tapo C200 #105

Closed
psycoticninja opened this issue Dec 11, 2023 · 29 comments
Closed

Not Resolved - ECONNRESET with Tapo C200 #105

psycoticninja opened this issue Dec 11, 2023 · 29 comments
Assignees
Labels
bug Something isn't working

Comments

@psycoticninja
Copy link

psycoticninja commented Dec 11, 2023

The original bug case was closed and had no response after mentioning it was still an issue - this is still an issue, even on the latest version of the plugin.

Describe The Bug:

I have two Tapo C200's:
One is running Version 1.3.9 Build 231019 Rel.38052n(4555) - HW 2.0
The other is running Version 1.3.9 Build 231019 Rel.37378n(4555) - HW 1.0

Since upgrading both to 1.3.9 XXXX the one with HW 2.0 no longer connects to Homebridge, reporting the following error in the logs:
[22/11/2023, 08:14:42] [homebridge-tapo-camera] Error during setup of camera Rat Cam read ECONNRESET

The camera appears to be working fine via RTSP - it is also streaming to Shinobi and have no issues there.

I have tried to remove the single camera accessory from Homebridge settings, renamed the camera in the plugin configuration as well but still same error.

To Reproduce:

Not sure how to reproduce this.

Expected behavior:

Camera should just work.

Logs:

[22/11/2023, 08:14:42] [homebridge-tapo-camera] Error during setup of camera Rat Cam read ECONNRESET

Environment:

Plugin Version: 2.3.4
Homebridge Version: 1.7.0
Node.js Version: 20.10.0
NPM Version: 10.2.3
Operating System: Debian GNU/Linux Bullseye (11) - Raspbian Lite

@psycoticninja psycoticninja added the bug Something isn't working label Dec 11, 2023
@mynameisbrendan
Copy link

I have two of these C200 HW v1.0 and both have 1.3.9a and both are displaying this behaviour.

[tapo-camera] Error during setup of camera Garage read ECONNRESET

@x23piracy
Copy link

x23piracy commented Dec 12, 2023

I also have a C200 HW v3.0 i am still on 1.3.5 and glad i read this before i updated, i always disable auto updates so it didn't updated on its own, i also had the camera blocked from internet access which i removed (and then realized there is fw 1.3.9) because my alexa integration wasn't working until i allowed internet access to the camera (alexa and tapo doesn't seem to establish a direct lan connection).

I will wait with the fw update.

@energiumOn
Copy link

I did have the same issue when I upgraded to V3.0. My C200 is rendered unusable due to this update.
I had to downgrade to 1.3.5 to use the plugin. @kopiro, adding support for newer devices should not be on behalf of the older ones 😌

@mynameisbrendan
Copy link

I did have the same issue when I upgraded to V3.0. My C200 is rendered unusable due to this update. I had to downgrade to 1.3.5 to use the plugin. @kopiro, adding support for newer devices should not be on behalf of the older ones 😌

How did you downgrade your camera firmware?

@x23piracy
Copy link

x23piracy commented Dec 13, 2023

Hi,

i expect he used one found on the net or he contacted tapo, tapo has all it's old fw versions online also for the hw revision but you don't get the direct link without sniffing the packets.

DrmnSamoLiu/Tapo_Camera_Firmware#10
Seems to be a repository where they collect the fw in issues :D

nervous-inhuman/tplink-tapo-c200-re#4 (comment)

To grab specific fw watch in the list and add the url part:

http://download.tplinkcloud.com/[URLPART]

https://github.com/tapo-firmware/Directory/blob/main/all_keys.txt

grafik

Turn off auto updates, and forbit access to internet for the camera (no internet access forbids alexa functionality, hsv will still work) but you keep your cam away from accidentally fw updates.

Good luck

@mynameisbrendan
Copy link

Thanks, I might review some alternate HB plugins first to confirm this path is necessary

@x23piracy
Copy link

x23piracy commented Dec 20, 2023

I have mine currently under Scrypted (which works really fine) but i like this plugin and watch for it's progress.
I have a Qnap NAS where you can easily install Docker Container for tests.

@kopiro
Copy link
Owner

kopiro commented Jan 3, 2024

Hey folks, the plugin should still work with older firmware. What's the error you're getting specifically?

@psycoticninja
Copy link
Author

psycoticninja commented Jan 3, 2024

@kopiro I’d prefer to not downgrade my cameras and hope that this can be resolved with an update to the Homebridge plugin.

I’m still getting the same error, similar to the below when restarting the plugin/child bridge for one of my cameras:
[22/11/2023, 08:14:42] [homebridge-tapo-camera] Error during setup of camera Rat Cam read ECONNRESET

Any chance you could check this out?

@psycoticninja
Copy link
Author

Any update to this one @kopiro ?

@energiumOn
Copy link

Hey man @kopiro, we are still suffering from the same issue long since now. Should we move on to another plugin?
Our C200 is no longer working with the plugin. We know that you're busy and do not have spare time for the project, thus this is vital for users of C200. The plugin started first due to this camera C200.
Thank you :)

@kopiro
Copy link
Owner

kopiro commented Feb 18, 2024

On January 3rd, I asked:

Hey folks, the plugin should still work with older firmware. What's the error you're getting specifically?

Without any more informations, I can't help. When working on the update to support for HW2, I made sure that old firmware was still compatible, but apparently it's not; but now I need all errors you can give me in order to debug the issue (because I have upgraded the firmware on mine).

Specifically, activate debugs logs and send me all the logs you can.

@psycoticninja
Copy link
Author

psycoticninja commented Feb 18, 2024

On January 3rd, I asked:

Hey folks, the plugin should still work with older firmware. What's the error you're getting specifically?

Without any more informations, I can't help. When working on the update to support for HW2, I made sure that old firmware was still compatible, but apparently it's not; but now I need all errors you can give me in order to debug the issue (because I have upgraded the firmware on mine).

Specifically, activate debugs logs and send me all the logs you can.

@kopiro, On January 3 I responded as well (and followed up on January 15).

I have activated debug in the Homebridge plugin for the camera that is not displayed. All I can see in the logs is as below:

[19/02/2024, 06:57:09] [homebridge-tapo-camera] Error during setup of camera Cat Cam Living read ECONNRESET

@kopiro
Copy link
Owner

kopiro commented Feb 22, 2024

I'm not sure I can do much with these logs though, can you try to switch the branch locally and try this? #121

Let me know if you need support on how to do this.

@psycoticninja
Copy link
Author

psycoticninja commented Feb 23, 2024

I'm not sure I can do much with these logs though, can you try to switch the branch locally and try this? #121

Let me know if you need support on how to do this.

@kopiro , happy to test but I will need some help with installing this. Can I just replace the changed file on its own?

If not, could you please share the steps.

@kopiro
Copy link
Owner

kopiro commented Mar 5, 2024

Sure; go to the Homebridge terminal (or via SSH and login with homebridge user)

cd /var/lib/homebridge/node_modules
rm -rf homebridge-tapo-camera
git clone https://github.com/kopiro/homebridge-tapo-camera.git
cd homebridge-tapo-camera
git checkout beta
npm install
npm run build

@psycoticninja
Copy link
Author

@kopiro I followed the steps but the child bridge will not start, it is boot looping with the below error:

Error: Cannot find module '/var/lib/homebridge/node_modules/homebridge-tapo-camera/dist/index.js'
Require stack:
- /var/lib/homebridge/node_modules/homebridge/lib/plugin.js
- /var/lib/homebridge/node_modules/homebridge/lib/pluginManager.js
- /var/lib/homebridge/node_modules/homebridge/lib/api.js
- /var/lib/homebridge/node_modules/homebridge/lib/childBridgeFork.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1144:15)
    at Function.Module._load (node:internal/modules/cjs/loader:985:27)
    at Module.require (node:internal/modules/cjs/loader:1235:19)
    at require (node:internal/modules/helpers:176:18)
    at Plugin.load (/var/lib/homebridge/node_modules/homebridge/src/plugin.ts:227:93)
    at ChildBridgeFork.loadPlugin (/var/lib/homebridge/node_modules/homebridge/src/childBridgeFork.ts:105:23)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)

I've rolled back.

@kopiro
Copy link
Owner

kopiro commented Mar 16, 2024

You're right. Try npm run build

@psycoticninja
Copy link
Author

psycoticninja commented Mar 27, 2024

@kopiro apologies, only got around to this now. I've tried this now as above, restarted the child bridge but still see the below:

[28/03/2024, 08:33:01] [homebridge-tapo-camera] Error during setup of camera Cat Cam Living read ECONNRESET

Anything else worth trying?

@kopiro kopiro self-assigned this Mar 29, 2024
@mynameisbrendan
Copy link

Any update on this? I have two C200 cameras which are now dead in HB so I am keen to assist if I can. I could not find any method for FW downgrade, unfortunately.

@psycoticninja
Copy link
Author

@kopiro Hi, any update with this? I have updated to 2.4.0 and the issue is still present.

[03/08/2024, 11:34:30] [Cat Cam Living] Error during setup of camera Cat Cam Living read ECONNRESET

@psycoticninja
Copy link
Author

psycoticninja commented Aug 12, 2024

@kopiro I see that v2.4.4 of the plugin has added more debug, if this helps.

I worry that this bug report may become stale and I would rather not have to open a new one.

[12/08/2024, 13:57:56] [Cat Cam Living] Error during setup of camera Cat Cam Living Error: read ECONNRESET
    at TCP.onStreamRead (node:internal/stream_base_commons:218:20) {
  errno: -104,
  code: 'ECONNRESET',
  syscall: 'read'
}

@kopiro
Copy link
Owner

kopiro commented Aug 27, 2024

Hey, please update to https://github.com/kopiro/homebridge-tapo-camera/releases/tag/v2.4.5 where I added more debug logs and post your logs again.

@psycoticninja
Copy link
Author

@kopiro I've updated to 2.4.5 now, this is what I see in the debugs (redacted username, passwords and IP addresses):

[27/08/2024, 19:49:37] [Cat Cam Living] Error during setup of camera {
  name: 'Cat Cam Living',
  ipAddress: 'XXX.XXX.XXX.XXX',
  password: 'XXXXXXX',
  streamUser: 'XXXXXX',
  streamPassword: 'XXXXXXX',
  debug: true
} Error: read ECONNRESET
    at TCP.onStreamRead (node:internal/stream_base_commons:218:20) {
  errno: -104,
  code: 'ECONNRESET',
  syscall: 'read'
}

Hope this helps!

@kopiro
Copy link
Owner

kopiro commented Aug 27, 2024

Hey @psycoticninja , do you have Discord or Telegram so we can debug this issue together? I have 1h free now I can help and maybe we'll find the root of the issues

@kopiro
Copy link
Owner

kopiro commented Aug 27, 2024

You can maybe find me on Discord as @kopiro

@psycoticninja
Copy link
Author

psycoticninja commented Aug 27, 2024

Done - discord friend invite sent.

@kopiro
Copy link
Owner

kopiro commented Aug 27, 2024

I'm sorry, apparently is kopiro91

@kopiro
Copy link
Owner

kopiro commented Aug 27, 2024

Alright, we have identified @psycoticninja issue, but I think this may not cover other issues.

But, for now, this was the solution #160 and I've released a new version https://github.com/kopiro/homebridge-tapo-camera/releases/tag/v2.4.7

@kopiro kopiro closed this as completed Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants