oparm / zoneminder-tapo-c200

ZoneMinder Tapo C200 camera control script
MIT License
37 stars 12 forks source link

Documentation fix - username not "admin" #10

Open gabrielke opened 1 year ago

gabrielke commented 1 year ago

Tapo C200 here, followed the documentation. This line: "Leave the username to "admin"" is not true in my case - maybe the firmware got updated - and the camera now expects the username to be the same as in the mobile app. It works then flawlessly.

Pajkastare commented 1 year ago

It's even worse than that, the password might be the Tapo/TP-Link account password, not the one defined in the "Device account" dialogs in the Tapo app.

See the comments under "Authentication" at https://pypi.org/project/pytapo/ which I assume (but has not double-checked) is the same as https://github.com/JurajNyiri/pytapo

KBarney99 commented 1 year ago

I have the C200 as well. I used a plethora of different usernames and passwords. I even tried the different username as user gabrielke stated above. That got me the log message "user must be admin". The stream is fine, but I keep getting the same error message from zmcontrol in the log saying "Invalid credentials for https://myipaddress:443, exiting I used the password for the Tapo/TP-Link account as well, but no go. There's gotta be something really simple I'm missing. Any ideas?

KBarney99 commented 1 year ago

Ok, so I finally got it to work. the password from the Tapo/TPLink Cloud account was what was needed after all which is different from the username and password you set up for each individual camera in the Tapo App. The password I used had a special character in there and that really doesn't work well when trying to type that in as the control address. I changed the password, retyped it into the control address and problem solved!

ezplanet commented 8 months ago

Tapo C200 firmware 1.1.6 build 231208 Rel. 66881n

I tried all combinations. It does not work. I used the password used to registered the app, both with admin and my email address as username, nothing. My password has only letters and numbers. I have also turned off two step verification in the app I always get: 02/15/24 21:09:36.061140 zmcontrol_1[2215].ERR [ZoneMinder::Control::TapoC200:217] [Could not send command to https://192.168.17.20:443 : HTTP::Response=HASH(0xaaab1e37b970)->status_line()] 02/15/24 21:09:36.095046 zmcontrol_1[2215].INF [ZoneMinder::Control::TapoC200:128] [Move Stop] 02/15/24 21:09:36.226536 zmcontrol_1[2215].ERR [ZoneMinder::Control::TapoC200:217] [Could not send command to https://192.168.17.20:443 : HTTP::Response=HASH(0xaaab1e5d22b8)->status_line()]

After many, many attempts with different username:password combinations I went back to the original admin:the_password_used_to_register_my_app

and now I get this:

02/15/24 21:35:16.175285 zmcontrol_1[3954].ERR [ZoneMinder::Control::TapoC200:169] [Invalid credentials for https://192.168.17.20:443, exiting] 02/15/24 21:35:17.356508 zmcontrol_1[3979].INF [main:116] [Starting control server 1/TapoC200] 02/15/24 21:35:17.368353 zmcontrol_1[3979].INF [main:127] [Control server 1/TapoC200 starting at 24/02/15 21:35:17] 02/15/24 21:35:17.678069 zmcontrol_1[3979].ERR [ZoneMinder::Control::TapoC200:169] [Invalid credentials for https://192.168.17.20:443, exiting] 02/15/24 21:35:22.885743 zmcontrol_1[4012].INF [main:116] [Starting control server 1/TapoC200] 02/15/24 21:35:22.909309 zmcontrol_1[4012].INF [main:127] [Control server 1/TapoC200 starting at 24/02/15 21:35:22] 02/15/24 21:35:23.160121 zmcontrol_1[4012].ERR [ZoneMinder::Control::TapoC200:169] [Invalid credentials for https://192.168.17.20:443, exiting]

After a camera reboot and the same credentials I get this again:

02/15/24 21:48:01.650040 zmcontrol_1[4208].INF [ZoneMinder::Control::TapoC200:128] [Move Right] 02/15/24 21:48:01.751108 zmcontrol_1[4208].ERR [ZoneMinder::Control::TapoC200:217] [Could not send command to https://sh-lounge-1.ezplanet.org:443 : HTTP::Response=HASH(0xaaab0c393a58)->status_line()] 02/15/24 21:48:01.764851 zmcontrol_1[4208].INF [ZoneMinder::Control::TapoC200:128] [Move Stop] 02/15/24 21:48:01.893885 zmcontrol_1[4208].ERR [ZoneMinder::Control::TapoC200:217] [Could not send command to https://sh-lounge-1.ezplanet.org:443 : HTTP::Response=HASH(0xaaab0c19b098)->status_line()]

Pajkastare commented 8 months ago

I tried all combinations. It does not work.

According to this: https://www.reddit.com/r/ZoneMinder/comments/19cgsbf/controlling_tapo_c200_with_fw_139_pantilt_from/

... It doesn't seem to work with camera firmware revisions later than 1.3.9. Someone (who knows Perl, i.e., not me) needs to update this repo with the new code (that works in the pytapo library). I don't know if it is possible to downgrade firmware revisions on the cameras...

Ramblin commented 7 months ago

... It doesn't seem to work with camera firmware revisions later than 1.3.9. Someone (who knows Perl well, i.e., not me) needs to update this repo with new code. I don't know if it is possible to downgrade firmware revisions on the cameras...

You are correct. The newer versions of Tapo firmware have invalidated this module. The pytapo module also failed with the new frimware but the developers of the pytapo module https://github.com/JurajNyiri/pytapo (wirtten in python) fixed it with new encryption protocols and it now works again with the new firmware

I am guessing that a similar code update (in perl for this module) is now required for new firmware to work, but I am not well enough versed in the details of a python->perl conversion to figure it out. If anyone can , help would be appreciated.

You can downgrade firmware but you better do it right or you will brick your camera.

I found instructions on downgrading the Tapo firmware at https://github.com/nervous-inhuman/tplink-tapo-c200-re/issues/4 and I found a list of firmware URLs at https://github.com/tapo-firmware/Directory