cloudcontrol

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Utoken     string
	DeviceGUID string
	Server     string
}

Client is a Panasonic Comfort Cloud client.

func NewClient

func NewClient() Client

NewClient creates a new Panasonic Comfort Cloud client.

func NewClientWithUrl

func NewClientWithUrl(url string) Client

NewClientWithUrl creates a new client with given base URL.

func (*Client) CreateSession

func (c *Client) CreateSession(username string, password string) ([]byte, error)

CreateSession initialises a client session to Panasonic Comfort Cloud.

func (*Client) GetDeviceHistory

func (c *Client) GetDeviceHistory(timeFrame int64) (types.History, error)

GetDeviceHistory will fetch historical device data from Panasonic.

func (*Client) GetDeviceStatus

func (c *Client) GetDeviceStatus() (types.Device, error)

GetDeviceStatus gets all details for a specific device.

func (*Client) GetGroups

func (c *Client) GetGroups() (types.Groups, error)

GetGroups gets all Panasonic Comfort Cloud groups associated to this account.

func (*Client) ListDevices

func (c *Client) ListDevices() ([]string, error)

ListDevices lists all available devices.

func (*Client) SetDevice

func (c *Client) SetDevice(deviceGUID string)

SetDevice sets the device GUID on the client.

func (*Client) SetEcoMode

func (c *Client) SetEcoMode(mode int64) ([]byte, error)

SetEcoMode will set the device to the requested eco mode.

func (*Client) SetFanSpeed added in v1.0.3

func (c *Client) SetFanSpeed(fanSpeed int64) ([]byte, error)

SetFanSpeed will set the fan speed for a device.

func (*Client) SetMode

func (c *Client) SetMode(mode int64) ([]byte, error)

SetMode will set the device to the requested AC mode.

func (*Client) SetTemperature

func (c *Client) SetTemperature(temperature float64) ([]byte, error)

SetTemperature will set the temperature for a device.

func (*Client) TurnOff

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

TurnOff will switch the device off.

func (*Client) TurnOn

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

TurnOn will switch the device on.

func (*Client) ValidateSession

func (c *Client) ValidateSession(token string) ([]byte, error)

ValidateSession checks if the session token is still valid.

Jump to

Keyboard shortcuts

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