PHP Класс Nest

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__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 )

Приватные методы

Метод Описание
_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 ( )

Описание методов

__construct() публичный Метод

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

cancelFanModeOnWithTimer() публичный Метод

public cancelFanModeOnWithTimer ( $serial_number = null )

cleanDevices() публичный статический Метод

public static cleanDevices ( $device )

clearStatusCache() публичный Метод

* Helper functions
public clearStatusCache ( )

enableHumidifier() публичный Метод

public enableHumidifier ( $enabled, $serial_number = null )

getDefaultDevice() публичный Метод

public getDefaultDevice ( )

getDeviceInfo() публичный Метод

public getDeviceInfo ( $serial_number = null )

getDeviceSchedule() публичный Метод

public getDeviceSchedule ( $serial_number = null )

getDeviceTemperatureScale() публичный Метод

public getDeviceTemperatureScale ( $serial_number = null )

getDevices() публичный Метод

public getDevices ( $type = DEVICE_TYPE_THERMOSTAT )

getEnergyLatest() публичный Метод

public getEnergyLatest ( $serial_number = null )

getNextScheduledEvent() публичный Метод

public getNextScheduledEvent ( $serial_number = null )

getStatus() публичный Метод

public getStatus ( $retry = TRUE )

getUserLocations() публичный Метод

public getUserLocations ( )

getWeather() публичный Метод

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

setAutoAwayEnabled() публичный Метод

public setAutoAwayEnabled ( $enabled, $serial_number = null )

setAway() публичный Метод

public setAway ( $away, $serial_number = null )

setAwayTemperatures() публичный Метод

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

setDualFuelBreakpoint() публичный Метод

public setDualFuelBreakpoint ( $breakpoint, $serial_number = null )

setEcoTemperatures() публичный Метод

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

setFanEveryDaySchedule() публичный Метод

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

setFanMode() публичный Метод

public setFanMode ( $mode, $serial_number = null )

setFanModeMinutesPerHour() публичный Метод

public setFanModeMinutesPerHour ( $mode, $serial_number = null )

setFanModeOnWithTimer() публичный Метод

public setFanModeOnWithTimer ( $mode, $serial_number = null )

setHumidity() публичный Метод

public setHumidity ( $humidity, $serial_number = null )

setTargetTemperature() публичный Метод

public setTargetTemperature ( $temperature, $serial_number = null )

setTargetTemperatureMode() публичный Метод

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

setTargetTemperatures() публичный Метод

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

temperatureInCelsius() публичный Метод

public temperatureInCelsius ( $temperature, $serial_number = null )

temperatureInUserScale() публичный Метод

public temperatureInUserScale ( $temperature_in_celsius, $serial_number = null )

turnOff() публичный Метод

public turnOff ( $serial_number = null )