kopiro/homebridge-tapo-camera

C100 stopped working, Error at 'getStatusAndUpdateCharacteristics'. Error: Invalid device confirm

Leonick opened this issue · 14 comments

Describe The Bug:
Plugin stopped working with C100 camera. Doesn't respond to commands from homebridge or home app.
Outputs errors in log.

Logs:

[5/8/2024, 7:00:24 PM] [tapo-camera] Error at 'getStatusAndUpdateCharacteristics'. Error: Invalid device confirm
    at TAPOCamera.refreshStok (/var/lib/homebridge/node_modules/homebridge-tapo-camera/src/tapoCamera.ts:205:15)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at TAPOCamera.getAuthenticatedAPIURL (/var/lib/homebridge/node_modules/homebridge-tapo-camera/src/tapoCamera.ts:335:19)
    at /var/lib/homebridge/node_modules/homebridge-tapo-camera/src/tapoCamera.ts:415:23
    at TAPOCamera.getStatus (/var/lib/homebridge/node_modules/homebridge-tapo-camera/src/tapoCamera.ts:555:18)
    at CameraAccessory.getStatusAndUpdateCharacteristics (/var/lib/homebridge/node_modules/homebridge-tapo-camera/src/cameraAccessory.ts:234:27)
    at CameraAccessory.setup (/var/lib/homebridge/node_modules/homebridge-tapo-camera/src/cameraAccessory.ts:265:7)
    at /var/lib/homebridge/node_modules/homebridge-tapo-camera/src/cameraPlatform.ts:30:9

Plugin Config:

{
    "bridge": {
        "name": "Homebridge",
        "username": "0E:67:F2:8B:4A:7E",
        "port": 51423,
        "pin": "150-86-555",
        "advertiser": "avahi",
        "bind": [
            "enp2s0"
        ]
    },
    "accessories": [],
    "platforms": [
        {
            "name": "Config",
            "port": 8581,
            "platform": "config"
        },
        {
            "cameras": [
                {
                    "name": "Tapo C100",
                    "ipAddress": "10.10.1.10",
                    "password": "....",
                    "streamUser": "....",
                    "streamPassword": "....",
                    "disableAlarmAccessory": true,
                    "privacyAccessoryName": "Camera"
                }
            ],
            "platform": "tapo-camera"
        }
    ],
}

Environment:

  • Plugin Version:
  • Homebridge Version: 1.8.1
  • Node.js Version: 20.12.2
  • NPM Version: Don't know
  • Operating System: Ubuntu Mantic (23.10)

I have a same issue. and getting exactly same error.

2 things are not working for me and that is Alarm feature and there talk to button, which disappeared.

Error at 'getStatusAndUpdateCharacteristics'. Error: Invalid device confirm
at TAPOCamera.refreshStok (/homebridge/node_modules/homebridge-tapo-camera/src/tapoCamera.ts:205:15)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at TAPOCamera.getAuthenticatedAPIURL (/homebridge/node_modules/homebridge-tapo camera/src/tapoCamera.ts:335:19)
at /homebridge/node_modules/homebridge-tapo-camera/src/tapoCamera.ts:415:23
at TAPOCamera.getStatus (/homebridge/node_modules/homebridge-tapo-camera/src/tapoCamera.ts:555:18)
at CameraAccessory.getStatusAndUpdateCharacteristics (/homebridge/node_modules/homebridge-tapo-camera/src/cameraAccessory.ts:234:27)
at CameraAccessory.setup (/homebridge/node_modules/homebridge-tapo-camera/src/cameraAccessory.ts:265:7)
at /homebridge/node_modules/homebridge-tapo-camera/src/cameraPlatform.ts:30:9

if it helps any my plugin config:

{
"cameras": [
{
"name": "Living CM",
"ipAddress": "",
"password": "",
"streamUser": "",
"streamPassword": "",
"pullInterval": 300000,
"debug": false,
"disablePrivacyAccessory": true,
"alarmAccessoryName": "Camera Alarm"
}
],
"_bridge": {
"username": "0E:A6:F9:7A:53:4C",
"port": 40873
},
"platform": "tapo-camera"
}

Homebridge Version: v1.8.2
Plugin Version: v2.3.4
OS: Ubuntu Jammy (22.04.3 LTS)
Node.js Version: v20.13.1
NPM Version: v10.5.2

Camera (C210 / Fixed IP) stopped working on Home App, still works on Tapo app.
Already tried to remove and and add it again, still not working.
I got the same error in my terminal:

[5/21/2024, 12:29:16 PM] [homebridge-tapo-camera] Error at 'getStatusAndUpdateCharacteristics'. Error: Invalid device confirm
    at TAPOCamera.refreshStok (/volume1/homebridge/node_modules/homebridge-tapo-camera/src/tapoCamera.ts:205:15)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at TAPOCamera.getAuthenticatedAPIURL (/volume1/homebridge/node_modules/homebridge-tapo-camera/src/tapoCamera.ts:335:19)
    at /volume1/homebridge/node_modules/homebridge-tapo-camera/src/tapoCamera.ts:415:23
    at TAPOCamera.getStatus (/volume1/homebridge/node_modules/homebridge-tapo-camera/src/tapoCamera.ts:555:18)
    at CameraAccessory.getStatusAndUpdateCharacteristics (/volume1/homebridge/node_modules/homebridge-tapo-camera/src/cameraAccessory.ts:234:27)
    at Timeout._onTimeout (/volume1/homebridge/node_modules/homebridge-tapo-camera/src/cameraAccessory.ts:212:7)

Here's my config :

{
    "cameras": [
        {
            "name": "Cage",
            "ipAddress": "192.168.1.230",
            "password": "",
            "streamUser": "",
            "streamPassword": "",
            "disableAlarmAccessory": true,
            "privacyAccessoryName": "Cage - Etat",
            "alarmAccessoryName": "Cage - Alarme"
        }
    ],
    "_bridge": {
        "username": "0E:2E:E9:31:7C:81",
        "port": 32217
    },
    "platform": "tapo-camera"
}

Environment:

Plugin Version: v2.3.4
Homebridge Version: v1.8.2
Node.js Version: v20.9.0
Operating System: Synology DSM (DS218)

xus2 commented

Hello, having the same problem with C325WB. It was working fine, but suddenly stopped working. No changes were made to plugin or updated firmware of the camera.

Having same issue is there any solution or workaround identified?

Same here

Same for me with tapo C520WS... nothing changed on camera side...

I noticed the same issue with Tapo c125. It usually happens when camera got suddenly powered off.

I reproduce the incident every time I do reboot the camera. homebridge seems to have « lost » the link to the camera.

Everything works OK in Tapo App

Maybe an issue with IP or linking ?

TP-Link has changed the way the authentication works and apparently they're working on a new API. If your camera is still working, do NOT update the firmware

Here's a discussion on a similar project: JurajNyiri/HomeAssistant-Tapo-Control#551

Same here I updated the plugin to the lastest version and I get a very similar error in my terminal : [26/08/2024, 12:45:08] [Càmera PDA] Error getting status: Error: Invalid device confirm
at TAPOCamera.refreshStok (/var/lib/homebridge/node_modules/homebridge-tapo-camera/src/tapoCamera.ts:215:15)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at TAPOCamera.getStok (/var/lib/homebridge/node_modules/homebridge-tapo-camera/src/tapoCamera.ts:342:7)
at TAPOCamera.getAuthenticatedAPIURL (/var/lib/homebridge/node_modules/homebridge-tapo-camera/src/tapoCamera.ts:350:19)
at /var/lib/homebridge/node_modules/homebridge-tapo-camera/src/tapoCamera.ts:431:23
at TAPOCamera.getStatus (/var/lib/homebridge/node_modules/homebridge-tapo-camera/src/tapoCamera.ts:614:26)
at CameraAccessory.getStatusAndNotify (/var/lib/homebridge/node_modules/homebridge-tapo-camera/src/cameraAccessory.ts:214:28)

I just updated the whole HB software and node as well to the latest update:

Node.js Version v20.17.0
Homebridge Tapo plugin v2.4.4
Camera: Tapo C200

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.

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.

Logs won't help much because it isn't a bug, TP-Link changed the deviceconfirm string in the camera firmware. The camera receives an admin password from the TP-Link cloud and uses that to generate the deviceconfirm, the plugin still uses the cloud password so they don't match anymore. Nonce and cnonce are correct and the hashing method is still SHA256.

The developer of the Home Assistant Tapo plugin has the same issue: JurajNyiri/HomeAssistant-Tapo-Control#551

Update: you may be affected by this issue. Please follow this guide on how to fix it.

Error: Invalid device confirm
at TAPOCamera.refreshStok (/homebridge/node_modules/homebridge-tapo-camera/src/tapoCamera.ts:333:15)
at processTicksAndRejections (node:internal/process/task_queues:95:5)