get release package from release page or build from source
git clone https://github.com/Luocy7/tplink-camera-control; cd tplink-camera-control
go build -o tpcc
$ tpcc -h
Usage:
tpcc [OPTIONS] [set | turn]
Help Options:
-h, --help Show this help message
Available commands:
set Set the user name and password.
turn Turn on or off the camera.
Note that tpcc will create config file tpcc.toml
in your User Config Directory with XDG_CONFIG_HOME
or HOME
environment variable. detail see go xdg
# set username, password and ip address of camera
tpcc set -a 192.168.9.214 -u admin -p my_passwd
# turn on camera and move to preset 1
tpcc turn --on
# turn off camera
tpcc turn --off