module Ecobee
Constants
- API_HOST
- API_PORT
- API_URI_BASE
- AUTH_ERRORS
- AUTH_PAD
- CONTENT_TYPE
- DEFAULT_FILES
- DEFAULT_POLL_INTERVAL
- DEFAULT_SCOPE
- FAN_MODES
- HVAC_MODES
- MAX_LOG_LENGTH
- REFRESH_PAD
- SCOPES
- VERSION
Public Class Methods
FanMode(mode)
click to toggle source
# File lib/ecobee.rb, line 51 def self.FanMode(mode) { 'auto' => 'Auto', 'on' => 'On' }.fetch(mode, 'Unknown') end
Mode(mode)
click to toggle source
# File lib/ecobee.rb, line 57 def self.Mode(mode) { 'auto' => 'Auto', 'auxHeatOnly' => 'Aux Heat Only', 'cool' => 'Cool', 'heat' => 'Heat', 'off' => 'Off' }.fetch(mode, 'Unknown') end
Model(model)
click to toggle source
# File lib/ecobee.rb, line 66 def self.Model(model) { 'idtSmart' => 'ecobee Smart', 'idtEms' => 'ecobee Smart EMS', 'siSmart' => 'ecobee Si Smart', 'siEms' => 'ecobee Si EMS', 'athenaSmart' => 'ecobee3 Smart', 'athenaEms' => 'ecobee3 EMS', 'corSmart' => 'Carrier or Bryant Cor', }.fetch(model, "Unknown (#{model})") end
ResponseCode(code)
click to toggle source
# File lib/ecobee.rb, line 77 def self.ResponseCode(code) { 0 => 'Success', 1 => 'Authentication failed.', 2 => 'Not authorized.', 3 => 'Processing error.', 4 => 'Serialization error.', 5 => 'Invalid request format.', 6 => 'Too many thermostat in selection match criteria.', 7 => 'Validation error.', 8 => 'Invalid function.', 9 => 'Invalid selection.', 10 => 'Invalid page.', 11 => 'Function error.', 12 => 'Post not supported for request.', 13 => 'Get not supported for request.', 14 => 'Authentication token has expired. Refresh your tokens.', 15 => 'Duplicate data violation.', 16 => 'Invalid token. Token has been deauthorized by user. You must ' + 're-request authorization.' }.fetch(code.to_i, 'Unknown Error.') end
Selection(arg = {})
click to toggle source
# File lib/ecobee.rb, line 99 def self.Selection(arg = {}) { 'selection' => { 'selectionType' => 'registered', 'selectionMatch' => '', 'includeRuntime' => 'false', 'includeExtendedRuntime' => 'false', 'includeElectricity' => 'false', 'includeSettings' => 'false', 'includeLocation' => 'false', 'includeProgram' => 'false', 'includeEvents' => 'false', 'includeDevice' => 'false', 'includeTechnician' => 'false', 'includeUtility' => 'false', 'includeAlerts' => 'false', 'includeWeather' => 'false', 'includeOemConfig' => 'false', 'includeEquipmentStatus' => 'false', 'includeNotificationSettings' => 'false', 'includeVersion' => 'false', 'includeSensors' => 'false', }.merge(Hash[*arg.map { |k,v| [k.to_s, v.to_s] }.flatten]) } end