roborock

package
v1.9.7 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBaseURL

func GetBaseURL(username string) (string, error)

func GetHomeID

func GetHomeID(baseURL, token string) (int, error)

Types

type Client deprecated

type Client struct {
	core.Listener
	// contains filtered or unexported fields
}

Deprecated: should be rewritten to core.Connection

func Dial added in v1.9.4

func Dial(rawURL string) (*Client, error)

func (*Client) AddTrack

func (c *Client) AddTrack(media *core.Media, codec *core.Codec, track *core.Receiver) error

func (*Client) CheckHomesecPassword

func (c *Client) CheckHomesecPassword() (err error)

func (*Client) Connect

func (c *Client) Connect() error

func (*Client) Dial

func (c *Client) Dial() error

func (*Client) EnableHomesecVoice

func (c *Client) EnableHomesecVoice(enable bool) error

func (*Client) GetDeviceICE

func (c *Client) GetDeviceICE() (ice []string, err error)

func (*Client) GetDeviceSDP

func (c *Client) GetDeviceSDP() (sd *pion.SessionDescription, err error)

func (*Client) GetHomesecConnectStatus

func (c *Client) GetHomesecConnectStatus() (clientID string, err error)

func (*Client) GetMedias

func (c *Client) GetMedias() []*core.Media

func (*Client) GetTrack

func (c *Client) GetTrack(media *core.Media, codec *core.Codec) (*core.Receiver, error)

func (*Client) GetTurnServer

func (c *Client) GetTurnServer() (turn *pion.ICEServer, err error)

func (*Client) MarshalJSON

func (c *Client) MarshalJSON() ([]byte, error)

func (*Client) Request

func (c *Client) Request(method string, args any) (err error)

func (*Client) SendICEtoRobot

func (c *Client) SendICEtoRobot(candidate string, mid string) (err error)

func (*Client) SendSDPtoRobot

func (c *Client) SendSDPtoRobot(offer *pion.SessionDescription) (err error)

func (*Client) SetVoiceChatVolume

func (c *Client) SetVoiceChatVolume(volume int) error

func (*Client) Start

func (c *Client) Start() error

func (*Client) StartCameraPreview

func (c *Client) StartCameraPreview() error

func (*Client) StartVoiceChat

func (c *Client) StartVoiceChat() error

func (*Client) Stop

func (c *Client) Stop() error

func (*Client) StopCameraPreview

func (c *Client) StopCameraPreview(clientID string) error

func (*Client) SwitchVideoQuality

func (c *Client) SwitchVideoQuality(hd bool) error

type DeviceInfo

type DeviceInfo struct {
	DID  string `json:"duid"`
	Name string `json:"name"`
	Key  string `json:"localKey"`
}

func GetDevices

func GetDevices(ui *UserInfo, homeID int) ([]DeviceInfo, error)

type UserInfo

type UserInfo struct {
	Token string `json:"token"`
	IoT   struct {
		User   string `json:"u"`
		Pass   string `json:"s"`
		Hash   string `json:"h"`
		Domain string `json:"k"`
		URL    struct {
			API  string `json:"a"`
			MQTT string `json:"m"`
		} `json:"r"`
	} `json:"rriot"`
}

func Login

func Login(baseURL, username, password string) (*UserInfo, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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