device

package
v0.9.5 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2020 License: MIT Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActivityZone

type ActivityZone struct {
	Name string `json:"name,omitempty"`
	ID   int    `json:"id,omitempty"`
}

ActivityZone represents an Activity Zone.

type Camera

type Camera struct {
	DeviceID              string          `json:"device_id,omitempty"`
	SoftwareVersion       string          `json:"software_version,omitempty"`
	StructureID           string          `json:"structure_id,omitempty"`
	WhereID               string          `json:"where_id,omitempty"`
	WhereName             string          `json:"where_name,omitempty"`
	Name                  string          `json:"name,omitempty"`
	NameLong              string          `json:"name_long,omitempty"`
	IsOnline              bool            `json:"is_online,omitempty"`
	IsStreaming           bool            `json:"is_streaming,omitempty"`
	IsAudioInputEnabled   bool            `json:"is_audio_input_enabled,omitempty"`
	LastIsOnlineChange    time.Time       `json:"last_is_online_change,omitempty"`
	IsVideoHistoryEnabled bool            `json:"is_video_history_enabled,omitempty"`
	WebURL                string          `json:"web_url,omitempty"`
	AppURL                string          `json:"app_url,omitempty"`
	IsPublicShareEnabled  bool            `json:"is_public_share_enabled,omitempty"`
	ActivityZones         []*ActivityZone `json:"activity_zones,omitempty"`
	PublicShareURL        string          `json:"public_share_url,omitempty"`
	SnapshotURL           string          `json:"snapshot_url,omitempty"`
}

Camera is a Nest Camera object. This is intended to work with all Nest Cam models and shows all Nest Cam data https://developers.nest.com/documentation/cloud/camera-guide https://developers.nest.com/documentation/cloud/api-camera

type Devices

type Devices struct {
	Thermostats   map[string]*Thermostat `json:"thermostats,omitempty"`
	SmokeCoAlarms map[string]*SmokeAlarm `json:"smoke_co_alarms,omitempty"`
	Cameras       map[string]*Camera     `json:"cameras,omitempty"`
}

Devices represent a collection of Nest devices https://developers.nest.com/documentation/cloud/api-overview

func (Devices) Len

func (d Devices) Len() int

Len returns a count of the number of devices from the Nest API.

type SmokeAlarm

type SmokeAlarm struct {
	Locale             string    `json:"locale,omitempty"`
	StructureID        string    `json:"structure_id,omitempty"`
	SoftwareVersion    string    `json:"software_version,omitempty"`
	WhereID            string    `json:"where_id,omitempty"`
	DeviceID           string    `json:"device_id,omitempty"`
	WhereName          string    `json:"where_name,omitempty"`
	Name               string    `json:"name,omitempty"`
	NameLong           string    `json:"name_long,omitempty"`
	IsOnline           bool      `json:"is_online,omitempty"`
	LastConnection     time.Time `json:"last_connection,omitempty"`
	BatteryHealth      string    `json:"battery_health,omitempty"`
	CoAlarmState       string    `json:"co_alarm_state,omitempty"`
	SmokeAlarmState    string    `json:"smoke_alarm_state,omitempty"`
	UIColorState       string    `json:"ui_color_state,omitempty"`
	IsManualTestActive bool      `json:"is_manual_test_active,omitempty"`
}

SmokeAlarm is a Nest SmokeAlarm designed to detect smoke and carbon monoxide See https://developers.nest.com/documentation/cloud/smoke-co-guide

type Thermostat

type Thermostat struct {
	Humidity                  int       `json:"humidity,omitempty"`
	Locale                    string    `json:"locale,omitempty"`
	TemperatureScale          string    `json:"temperature_scale,omitempty"`
	IsUsingEmergencyHeat      bool      `json:"is_using_emergency_heat,omitempty"`
	HasFan                    bool      `json:"has_fan,omitempty,omitempty"`
	SoftwareVersion           string    `json:"software_version,omitempty"`
	HasLeaf                   bool      `json:"has_leaf,omitempty"`
	WhereID                   string    `json:"where_id,omitempty"`
	DeviceID                  string    `json:"device_id,omitempty"`
	Name                      string    `json:"name,omitempty"`
	CanHeat                   bool      `json:"can_heat,omitempty"`
	CanCool                   bool      `json:"can_cool,omitempty"`
	TargetTemperatureC        float64   `json:"target_temperature_c,omitempty"`
	TargetTemperatureF        int       `json:"target_temperature_f,omitempty"`
	TargetTemperatureHighC    float64   `json:"target_temperature_high_c,omitempty"`
	TargetTemperatureHighF    int       `json:"target_temperature_high_f,omitempty"`
	TargetTemperatureLowC     float64   `json:"target_temperature_low_c,omitempty"`
	TargetTemperatureLowF     int       `json:"target_temperature_low_f,omitempty"`
	AmbientTemperatureC       float64   `json:"ambient_temperature_c,omitempty"`
	AmbientTemperatureF       int       `json:"ambient_temperature_f,omitempty"`
	AwayTemperatureHighC      float64   `json:"away_temperature_high_c,omitempty"`
	AwayTemperatureHighF      int       `json:"away_temperature_high_f,omitempty"`
	AwayTemperatureLowC       float64   `json:"away_temperature_low_c,omitempty"`
	AwayTemperatureLowF       int       `json:"away_temperature_low_f,omitempty"`
	EcoTemperatureHighC       float64   `json:"eco_temperature_high_c,omitempty"`
	EcoTemperatureHighF       int       `json:"eco_temperature_high_f,omitempty"`
	EcoTemperatureLowC        float64   `json:"eco_temperature_low_c,omitempty"`
	EcoTemperatureLowF        int       `json:"eco_temperature_low_f,omitempty"`
	IsLocked                  bool      `json:"is_locked,omitempty"`
	LockedTempMinC            float64   `json:"locked_temp_min_c,omitempty"`
	LockedTempMinF            int       `json:"locked_temp_min_f,omitempty"`
	LockedTempMaxC            float64   `json:"locked_temp_max_cv,omitempty"`
	LockedTempMaxF            int       `json:"locked_temp_max_f,omitempty"`
	SunlightCorrectionActive  bool      `json:"sunlight_correction_active,omitempty"`
	SunlightCorrectionEnabled bool      `json:"sunlight_correction_enabled,omitempty"`
	StructureID               string    `json:"structure_id,omitempty"`
	FanTimerActive            bool      `json:"fan_timer_active,omitempty"`
	FanTimerTimeout           time.Time `json:"fan_timer_timeout,omitempty"`
	FanTimerDuration          int       `json:"fan_timer_duration,omitempty"`
	PreviousHvacMode          string    `json:"previous_hvac_mode,omitempty"`
	HvacMode                  string    `json:"hvac_mode,omitempty"`
	TimeToTarget              string    `json:"time_to_target,omitempty"`
	TimeToTargetTraining      string    `json:"time_to_target_training,omitempty"`
	WhereName                 string    `json:"where_name,omitempty"`
	Label                     string    `json:"label,omitempty"`
	NameLong                  string    `json:"name_long,omitempty"`
	IsOnline                  bool      `json:"is_online,omitempty"`
	LastConnection            time.Time `json:"last_connection,omitempty"`
	HvacState                 string    `json:"hvac_state,omitempty"`
}

Thermostat represents a Nest Thermostat that is internet-connected and accessible through the Nest API

Jump to

Keyboard shortcuts

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