kopiro / homebridge-tapo-camera

Homebridge plugin for TP-Link TAPO security cameras
ISC License
120 stars 10 forks source link

Plugin tries to make request to `/ds` with 443 and fails #72

Closed cagdassalur closed 1 year ago

cagdassalur commented 1 year ago

Describe The Bug: Initial connection is fine, but when i try to open the stream in home i get the error and Camera is not responding message shows.

I have ffmpeg installed and i can watch the rtsp stream from my local vlc.

Logs:

[3/20/2023, 2:27:40 PM] [homebridge-tapo-camera] Error at 'getStatusAndUpdateCharacteristics'. FetchError: request to https://192.168.3.32/stok=57775219d74bf9a818fc2a6dacbe4ea9/ds failed, reason: connect ECONNREFUSED 192.168.3.32:443
    at ClientRequest.<anonymous> (/opt/homebrew/lib/node_modules/homebridge-tapo-camera/node_modules/node-fetch/lib/index.js:1505:11)
    at ClientRequest.emit (node:events:512:28)
    at TLSSocket.socketErrorListener (node:_http_client:495:9)
    at TLSSocket.emit (node:events:512:28)
    at emitErrorNT (node:internal/streams/destroy:151:8)
    at emitErrorCloseNT (node:internal/streams/destroy:116:3)
    at processTicksAndRejections (node:internal/process/task_queues:82:21) {
  type: 'system',
  errno: 'ECONNREFUSED',
  code: 'ECONNREFUSED'
}
[3/20/2023, 2:28:03 PM] [homebridge-tapo-camera] [Balkon giris] FFmpeg exited with code: 1 and signal: null (Error)
[3/20/2023, 2:28:03 PM] [homebridge-tapo-camera] [Balkon giris] Stopped video stream.
[3/20/2023, 2:28:34 PM] [homebridge-tapo-camera] Reset token. error_code:  -40401
[3/20/2023, 2:28:34 PM] [homebridge-tapo-camera] Error at 'getStatusAndUpdateCharacteristics'. Error: Camera replied with error
    at TAPOCamera.getStatus (/opt/homebrew/lib/node_modules/homebridge-tapo-camera/src/tapoCamera.ts:253:13)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at CameraAccessory.getStatusAndUpdateCharacteristics (/opt/homebrew/lib/node_modules/homebridge-tapo-camera/src/cameraAccessory.ts:228:27)
    at Timeout._onTimeout (/opt/homebrew/lib/node_modules/homebridge-tapo-camera/src/cameraAccessory.ts:206:7)
[3/20/2023, 2:30:48 PM] [homebridge-tapo-camera] Error at 'getStatusAndUpdateCharacteristics'. FetchError: request to https://192.168.3.32/ failed, reason: connect ETIMEDOUT 192.168.3.32:443
    at ClientRequest.<anonymous> (/opt/homebrew/lib/node_modules/homebridge-tapo-camera/node_modules/node-fetch/lib/index.js:1505:11)
    at ClientRequest.emit (node:events:512:28)
    at TLSSocket.socketErrorListener (node:_http_client:495:9)
    at TLSSocket.emit (node:events:512:28)
    at emitErrorNT (node:internal/streams/destroy:151:8)
    at emitErrorCloseNT (node:internal/streams/destroy:116:3)
    at processTicksAndRejections (node:internal/process/task_queues:82:21) {
  type: 'system',
  errno: 'ETIMEDOUT',
  code: 'ETIMEDOUT'
}

Plugin Config:

{
    "cameras": [
        {
            "name": "Balkon giris",
            "ipAddress": "192.168.3.32",
            "password": "redacted",
            "streamUser": "redacted",
            "streamPassword": "redacted",
            "debug": true
        }
    ],
    "_bridge": {
        "username": "redacted",
        "port": 45571
    },
    "platform": "tapo-camera"
}

Environment:

I can provide further logs and try out changes if needed

kopiro commented 1 year ago

Hello; I think there is something wrong with either your network connection to the camera or the credentials used; can you double check everything again?

That connection is to obtain other accessories informations like the alarm and the siren;

cagdassalur commented 1 year ago

Hey, turns out it was something completely different messing with my network, but thanks for the reply :)

Fun fact: With some type-c hubs, if you use it both to power your laptop and get ethernet connection, when you unplug it from the laptop the hub starts flooding the network with a pause signal, for some reason