litterrobot

package module
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2019 License: MIT Imports: 6 Imported by: 1

README

litterrobot

    client := litterrobot.NewClient(litterrobot.Opts{
        Local:             "false",
        Email:             "youremailaddress@aol.com",
        Password:          "yourpassword",
        APIKey:            "Gmdfw5Cq3F3Mk6xvvO0inHATJeoDv6C3KfwfOuh0",
    }, nil)

    states := client.States()

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Opts
	// contains filtered or unexported fields
}

Client - The Client for accessing data

func NewClient

func NewClient(opts Opts, stateChan chan State) *Client

NewClient - Create a new Client for a given address

func (*Client) Cycle

func (c *Client) Cycle(identifier string, nameOrIP string)

Cycle - Cycle Command

func (*Client) NightLightOff

func (c *Client) NightLightOff(identifier string, nameOrIP string)

NightLightOff - NightLight Command

func (*Client) NightLightOn

func (c *Client) NightLightOn(identifier string, nameOrIP string)

NightLightOn - NightLight Command

func (*Client) PanelLockOff

func (c *Client) PanelLockOff(identifier string, nameOrIP string)

PanelLockOff - PanelLock Command

func (*Client) PanelLockOn

func (c *Client) PanelLockOn(identifier string, nameOrIP string)

PanelLockOn - PanelLock Command

func (*Client) PowerOff

func (c *Client) PowerOff(identifier string, nameOrIP string)

PowerOff - Power Command

func (*Client) PowerOn

func (c *Client) PowerOn(identifier string, nameOrIP string)

PowerOn - Power Command

func (*Client) PublishStates

func (c *Client) PublishStates()

PublishStates - Fetch & sendState states from the Litter Robot API

func (*Client) Run

func (c *Client) Run()

Run - Publish states via the API or incoming UDP (depending on configuration)

func (*Client) States

func (c *Client) States() ([]State, error)

States - Fetch states from the Litter Robot API

func (*Client) Wait

func (c *Client) Wait(identifier string, nameOrIP string, val string)

Wait - Wait Command

type Opts added in v0.3.0

type Opts struct {
	Local             bool
	Email             string
	Password          string
	APIKey            string
	APILookupInterval time.Duration
	// contains filtered or unexported fields
}

Opts - Options for the litter robot lib

type State

type State struct {
	LitterRobotID             string
	LitterRobotSerial         string
	PowerStatus               string
	UnitStatus                string
	CycleCount                string
	CycleCapacity             string
	CyclesAfterDrawerFull     string
	DFICycleCount             string
	CleanCycleWaitTimeMinutes string
	NameOrIP                  string
	PanelLockActive           bool
	NightLightActive          bool
	DidNotifyOffline          bool
	DFITriggered              bool
	SleepModeActive           bool
}

State - The state of the litter robot

Jump to

Keyboard shortcuts

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