TP-Link Tapo C200 control script

Post here to indicate any hardware you have used and which is known to work with ZoneMinder. Not for questions.
Post Reply
oparm
Posts: 1
Joined: Sun May 09, 2021 8:01 pm

TP-Link Tapo C200 control script

Post by oparm »

Hello everyone,

I created a control script for the Tapo C200. It works quite well :)

https://github.com/oparm/zoneminder-tapo-c200

The script is simple to use I think but if you have issues, questions or remarks, feel free to post here or create an issue directly on github.

Enjoy
zackfuchtel
Posts: 1
Joined: Mon Jul 19, 2021 9:48 am

Re: TP-Link Tapo C200 control script

Post by zackfuchtel »

Hello,

tried to use, but not working for me. Got this error:

Code: Select all

zmcontrol_1[1034123].ERR [ZoneMinder::Control::TapoC200:169] [Invalid credentials for https://172.31.100.250:443, exiting]
zmcontrol_1[960770].FAT [ZoneMinder::Control:68] [0 not object from ZoneMinder::Control::TapoC200:170]
Double checked multiple times, the password is correct. Perl modules are loaded. Zoneminder is v1.36.3 on AlmaLinux 8.4. As I asume, Zoneminder cannot load/read the TapoC200.pm or its values correct?

Thanks for help.
pat2
Posts: 156
Joined: Fri Sep 16, 2016 6:35 pm

Re: TP-Link Tapo C200 control script

Post by pat2 »

thanks a lot for the script. It works!

I use it on Ubuntu 16.04. On 16.04 it is not possible to install the seccond library you suggested

sudo apt install libjson-pp-perl libjson-parse-perl

I commented in your script

#use JSON::Parse 'parse_json';

it worked!
thanks
---------------------------------------------------------------------------
ZM 1.36.34 - 14 cameras on Orange Pi 5 (arm64) - Ubuntu Jammy 22.04
Shadow
Posts: 1
Joined: Sat Feb 04, 2023 9:42 pm

Re: TP-Link Tapo C200 control script

Post by Shadow »

Hello, I have 3 cameras, and like 6 devices in zoneminder because they keep changing between 2 ip . All camera seem to change between 2 ip numbers, is it possible to turn on all privacy in one click and turn priivacy on in one click?

Thanks,
Shadow
dougmccrary
Posts: 1172
Joined: Sat Aug 31, 2019 7:35 am
Location: San Diego

Re: TP-Link Tapo C200 control script

Post by dougmccrary »

Shadow, you should start a new thread. Even if your cameras are Tapos. Mention what network equipment you have.
gabrielhopkins
Posts: 1
Joined: Sat Jun 24, 2023 9:54 pm

Re: TP-Link Tapo C200 control script

Post by gabrielhopkins »

Thank you very much - this works great!!
Ramblin
Posts: 15
Joined: Sat Oct 14, 2023 10:49 am

Re: TP-Link Tapo C200 control script

Post by Ramblin »

Thank you!

I can confirm that this works with TapoC520WS

It requires the addition of the libraries you mentioned for JSON and JSON::Parse but once that was done, it worked.

As for @pat2 who said they could not install the second library using "apt install libjson-parse-perl" , there is always the option of installing via cpan

Code: Select all

cpan JSON
cpan JSON::Parse
Using cpan requires make so if you do not already have it,

Code: Select all

apt install build-essential
I cannot Zoom the Tapo C520WS but I can use the Wake, Sleep (Privacy Mode), Pan and Tilt and that is all I need.

Thanks again for sharing.

For anyone interested, there is a stand-alone, python-based module called pytapo
https://github.com/JurajNyiri/pytapo
that also allows you to download the files from a camera's MicroSD card WITHOUT first storing them on the cloud (ie keeping it secure on your premises only). See the sample script in the "Experiments" folder.
Ramblin
Posts: 15
Joined: Sat Oct 14, 2023 10:49 am

Re: TP-Link Tapo C200 control script

Post by Ramblin »

This used to also work on Tapo cameras
- C320WS Hardware V1
- C320WS Hardware V2
- C520WS Hardware V1

Until the last firmware update for Tapo cameras and this module now no longer works.

The pytapo (python) module mentioned above had the same issue but they solved it with a code update adding in another encryption protocol.

I cannot convert the pytapo / python changes into this / perl module but if anyone is good enough at both languages, maybe they could?

You can use the ONVIF solution in Zonminder to control the Tapo pan/tilt cameras but are limited to the ONVIF-supported options.
Post Reply