gotapo

package module
v1.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 20, 2023 License: MIT Imports: 17 Imported by: 1

README

godoc Go Report Card

Source package for remoting TAPO Cameras (C200, C310)

Tested on model cameras TP Link Tapo C200/C310

!!! Caution with update your cameras to new drivers. May be problems with using unofficial apps.

!!! Unofficial method of using cameras TP Link Tapo C200/C310

Functionality
  • Move camera (C200)
  • Turn next preset (C200)
  • Switch night mode
  • Switch detect mode
  • Switch alarm mode (flash, sound)
  • Switch auto-tracking
  • Switch led
  • Edit OSD
  • Flip camera
Add to use
go get github.com/KusoKaihatsuSha/gotapo.git
Sample
git clone https://github.com/KusoKaihatsuSha/appgotapo.git

Documentation

Overview

Package gotapo working with camera tapo like c200, c310 by http

Index

Constants

View Source
const (
	// MethodGet as link to methods
	MethodGet = "get"

	// MethodSet as link to methods
	MethodSet = "set"

	// MethodMR as link to methods
	MethodMR = "multipleRequest"

	// MethodDo as link to methods
	MethodDo = "do"

	// MethodLogin as link to methods
	MethodLogin = "login"

	EncryptType = "3"
)

Variables

View Source
var (

	// DefXBool need for Postfix xBool
	DefXBool = "Def"
)

Functions

This section is empty.

Types

type Action

type Action interface {
	On()
	Off()
}

Action is general Action cam

type Stages added in v1.0.2

type Stages struct {
	Next    string `🟢:"🔴" 🔴:"🟢" +:"-" -:"+" on:"off" off:"on"`
	Binary  string `-:"true" +:"true" 🟢:"true" 🔴:"true" on:"true" off:"true"`
	True    string `+:"true" 🟢:"true" on:"true"`
	False   string `-:"true" 🔴:"true" off:"true"`
	Command string `!:"true" @:"true" 🟢:"true" 🔴:"true" 🔵:"true" -:"true" +:"true" /:"true"`
	Special string `!:"json" @:"exec"`
	// contains filtered or unexported fields
}

Stages type of unnormal get bool value. (with vals)

type Tapo

type Tapo struct {
	Parameters map[string]string
	Host       string
	Port       string
	UserDef    string
	User       string
	Password   string
	UserID     string
	Rotate     bool
	FishEye    bool
	Flip       bool

	TimeStr string

	LastFile     string
	Elements     *elements
	Settings     *settings
	NextPreset   func()
	Reboot       func()
	InsecureAuth bool
	Iv           []byte
	Key          []byte
	Seq          string
	Encrypt      bool
	// contains filtered or unexported fields
}

Tapo is general type with Vals

func Connect

func Connect(host string, user string, password string) *Tapo

Connect is general function for connecting to Camera

func (*Tapo) MoveDown

func (o *Tapo) MoveDown(val int)

MoveDown is moving cam to down

func (*Tapo) MoveLeft

func (o *Tapo) MoveLeft(val int)

MoveLeft is moving cam to left

func (*Tapo) MoveRight

func (o *Tapo) MoveRight(val int)

MoveRight is moving cam to right

func (*Tapo) MoveTest

func (o *Tapo) MoveTest()

MoveTest is moving cam to all presets

func (*Tapo) MoveUp

func (o *Tapo) MoveUp(val int)

MoveUp is moving cam to up

func (*Tapo) Off

func (o *Tapo) Off(s Action)

Off is turn settings

func (*Tapo) On

func (o *Tapo) On(s Action)

On is turn settings

type Types added in v1.0.2

type Types struct {
	Default string
	Head    string
	Next    string
	// contains filtered or unexported fields
}

Types type of unnormal get bool value

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL