types

package
v0.0.0-...-8b54c08 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2019 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OCCUPANCY_UNKNOWN = iota
	OCCUPANCY_OCCUPIED
	OCCUPANCY_UNOCCUPIED
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ADREvent

type ADREvent struct {
	EventEnd   int64           `msgpack:"event_end"`
	EventStart int64           `msgpack:"event_start"`
	EventType  DR_EVENT_TYPE   `msgpack:"event_type"`
	DRStatus   DR_EVENT_STATUS `msgpack:"dr_status"`
	Time       int64           `msgpack:"time"`
}

type ADREventAPI

type ADREventAPI struct {
	End    string `xml:"OpenADREventEnd"`
	Start  string `xml:"OpenADREventStart"`
	Status string `xml:"OpenADRStatus"`
	Type   string `xml:"OpenADREventType"`
}

type ADREventWrapperAPI

type ADREventWrapperAPI struct {
	Success int         `xml:"success"`
	Message string      `xml:"message"`
	Event   ADREventAPI `xml:"attribute"`
}

type DR_EVENT_STATUS

type DR_EVENT_STATUS int
const (
	DR_EVENT_STATUS_NOT_CONFIGURED DR_EVENT_STATUS = iota
	DR_EVENT_STATUS_UNUSABLE
	DR_EVENT_STATUS_INACTIVE
	DR_EVENT_STATUS_ACTIVE
)

type DR_EVENT_TYPE

type DR_EVENT_TYPE int
const (
	DR_EVENT_TYPE_NO_EVENT DR_EVENT_TYPE = iota
	DR_EVENT_TYPE_NORMAL
	DR_EVENT_TYPE_MODERATE
	DR_EVENT_TYPE_HIGH
	DR_EVENT_TYPE_SPECIAL
)

type NewPelicanParams

type NewPelicanParams struct {
	Username      string
	Password      string
	Sitename      string
	Name          string
	HeatingStages int32
	CoolingStages int32
	Timezone      string
}

type Pelican

type Pelican struct {
	Name          string
	HeatingStages int32
	CoolingStages int32
	TimezoneName  string
	// contains filtered or unexported fields
}

func DiscoverPelicans

func DiscoverPelicans(username, password, sitename string) ([]*Pelican, error)

func NewPelican

func NewPelican(params *NewPelicanParams) (*Pelican, error)

func (*Pelican) GetOccupancy

func (pel *Pelican) GetOccupancy() (int, error)

func (*Pelican) GetSchedule

func (pel *Pelican) GetSchedule() (*ThermostatSchedule, error)

func (*Pelican) GetStatus

func (pel *Pelican) GetStatus() (*PelicanStatus, error)

func (*Pelican) ModifySetpoints

func (pel *Pelican) ModifySetpoints(params *PelicanSetpointParams) error

func (*Pelican) ModifyStages

func (pel *Pelican) ModifyStages(params *PelicanStageParams) error

func (*Pelican) ModifyState

func (pel *Pelican) ModifyState(params *PelicanStateParams) error

func (*Pelican) SetSchedule

func (pel *Pelican) SetSchedule(newSchedule *ThermostatSchedule) error

func (*Pelican) TrackDREvent

func (pel *Pelican) TrackDREvent() (*ADREvent, error)

type PelicanSetpointParams

type PelicanSetpointParams struct {
	HeatingSetpoint *float64
	CoolingSetpoint *float64
}

type PelicanStageParams

type PelicanStageParams struct {
	HeatingStages *int32
	CoolingStages *int32
}

type PelicanStateParams

type PelicanStateParams struct {
	HeatingSetpoint *float64
	CoolingSetpoint *float64
	Override        *float64
	Mode            *float64
	Fan             *float64
}

type PelicanStatus

type PelicanStatus struct {
	Temperature       float64 `msgpack:"temperature"`
	RelHumidity       float64 `msgpack:"relative_humidity"`
	HeatingSetpoint   float64 `msgpack:"heating_setpoint"`
	CoolingSetpoint   float64 `msgpack:"cooling_setpoint"`
	Override          bool    `msgpack:"override"`
	Fan               bool    `msgpack:"fan"`
	Mode              int32   `msgpack:"mode"`
	State             int32   `msgpack:"state"`
	EnabledHeatStages int32   `msgpack:"enabled_heat_stages"`
	EnabledCoolStages int32   `msgpack:"enabled_cool_stages"`
	Time              int64   `msgpack:"time"`
}

type ThermostatBlockSchedule

type ThermostatBlockSchedule struct {
	CoolSetting float64 `msgpack:"cool_setting"`
	HeatSetting float64 `msgpack:"heat_setting"`
	System      string  `msgpack:"system"`
	Time        string  `msgpack:"time"`
}

Struct containing data defining the settings of each schedule block

type ThermostatSchedule

type ThermostatSchedule struct {
	DaySchedules map[string]([]ThermostatBlockSchedule) `msgpack:"day_schedules"`
}

Struct mapping each day of the week to its daily schedule

Jump to

Keyboard shortcuts

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