PHP Class Nest

Mostrar archivo Open project: gboudreau/nest-api Class Usage Examples

Public Methods

Method Description
__construct ( $username = null, $password = null )
cancelFanModeOnWithTimer ( $serial_number = null )
cleanDevices ( $device )
clearStatusCache ( ) * Helper functions
enableHumidifier ( $enabled, $serial_number = null )
getDefaultDevice ( )
getDeviceInfo ( $serial_number = null )
getDeviceSchedule ( $serial_number = null )
getDeviceTemperatureScale ( $serial_number = null )
getDevices ( $type = DEVICE_TYPE_THERMOSTAT )
getEnergyLatest ( $serial_number = null )
getNextScheduledEvent ( $serial_number = null )
getStatus ( $retry = TRUE )
getUserLocations ( )
getWeather ( $postal_code, $country_code = NULL ) * Getters and setters
setAutoAwayEnabled ( $enabled, $serial_number = null )
setAway ( $away, $serial_number = null )
setAwayTemperatures ( $temp_low, $temp_high, $serial_number = null )
setDualFuelBreakpoint ( $breakpoint, $serial_number = null )
setEcoTemperatures ( $temp_low, $temp_high, $serial_number = null )
setFanEveryDaySchedule ( $start_hour, $end_hour, $serial_number = null )
setFanMode ( $mode, $serial_number = null )
setFanModeMinutesPerHour ( $mode, $serial_number = null )
setFanModeOnWithTimer ( $mode, $serial_number = null )
setHumidity ( $humidity, $serial_number = null )
setTargetTemperature ( $temperature, $serial_number = null )
setTargetTemperatureMode ( $mode, $temperature, $serial_number = null )
setTargetTemperatures ( $temp_low, $temp_high, $serial_number = null )
temperatureInCelsius ( $temperature, $serial_number = null )
temperatureInUserScale ( $temperature_in_celsius, $serial_number = null )
turnOff ( $serial_number = null )

Private Methods

Method Description
_setFanMode ( $mode, $fan_duty_cycle = null, $timer = null, $serial_number = null )
doGET ( $url )
doPOST ( $url, $data_fields )
doRequest ( $method, $url, $data_fields = null, $with_retry = TRUE )
getDefaultSerial ( $serial_number )
getDeviceNetworkInfo ( $serial_number = null )
get_curl_certs ( )
loadCache ( )
login ( )
prepareForGet ( )
saveCache ( )
secure_touch ( $fname )
use_cache ( )

Method Details

__construct() public method

public __construct ( $username = null, $password = null )

cancelFanModeOnWithTimer() public method

public cancelFanModeOnWithTimer ( $serial_number = null )

cleanDevices() public static method

public static cleanDevices ( $device )

clearStatusCache() public method

* Helper functions
public clearStatusCache ( )

enableHumidifier() public method

public enableHumidifier ( $enabled, $serial_number = null )

getDefaultDevice() public method

public getDefaultDevice ( )

getDeviceInfo() public method

public getDeviceInfo ( $serial_number = null )

getDeviceSchedule() public method

public getDeviceSchedule ( $serial_number = null )

getDeviceTemperatureScale() public method

public getDeviceTemperatureScale ( $serial_number = null )

getDevices() public method

public getDevices ( $type = DEVICE_TYPE_THERMOSTAT )

getEnergyLatest() public method

public getEnergyLatest ( $serial_number = null )

getNextScheduledEvent() public method

public getNextScheduledEvent ( $serial_number = null )

getStatus() public method

public getStatus ( $retry = TRUE )

getUserLocations() public method

public getUserLocations ( )

getWeather() public method

* Getters and setters
public getWeather ( $postal_code, $country_code = NULL )

setAutoAwayEnabled() public method

public setAutoAwayEnabled ( $enabled, $serial_number = null )

setAway() public method

public setAway ( $away, $serial_number = null )

setAwayTemperatures() public method

public setAwayTemperatures ( $temp_low, $temp_high, $serial_number = null )

setDualFuelBreakpoint() public method

public setDualFuelBreakpoint ( $breakpoint, $serial_number = null )

setEcoTemperatures() public method

public setEcoTemperatures ( $temp_low, $temp_high, $serial_number = null )

setFanEveryDaySchedule() public method

public setFanEveryDaySchedule ( $start_hour, $end_hour, $serial_number = null )

setFanMode() public method

public setFanMode ( $mode, $serial_number = null )

setFanModeMinutesPerHour() public method

public setFanModeMinutesPerHour ( $mode, $serial_number = null )

setFanModeOnWithTimer() public method

public setFanModeOnWithTimer ( $mode, $serial_number = null )

setHumidity() public method

public setHumidity ( $humidity, $serial_number = null )

setTargetTemperature() public method

public setTargetTemperature ( $temperature, $serial_number = null )

setTargetTemperatureMode() public method

public setTargetTemperatureMode ( $mode, $temperature, $serial_number = null )

setTargetTemperatures() public method

public setTargetTemperatures ( $temp_low, $temp_high, $serial_number = null )

temperatureInCelsius() public method

public temperatureInCelsius ( $temperature, $serial_number = null )

temperatureInUserScale() public method

public temperatureInUserScale ( $temperature_in_celsius, $serial_number = null )

turnOff() public method

public turnOff ( $serial_number = null )