둘 다 서모 스탯 모드 (냉각, 열)에 대한 목표 온도를 가져올 수 있습니까? 지금 현재의 서모 스탯 모드에서 목표 온도를 얻은 다음 서모 스탯 모드를 두 번째 서모 스탯 모드로 변경하고 두 번째 서모 스탯 모드의 목표 온도를 얻을 수 있다고 생각한다.nest api 두 서모 스탯 모드의 목표 온도
목표 temps 변경과 동일한 질문입니다. 하나의 요청으로 가열 및 냉각 모드의 목표 온도를 모두 변경할 수 있습니까?
둘 다 서모 스탯 모드 (냉각, 열)에 대한 목표 온도를 가져올 수 있습니까? 지금 현재의 서모 스탯 모드에서 목표 온도를 얻은 다음 서모 스탯 모드를 두 번째 서모 스탯 모드로 변경하고 두 번째 서모 스탯 모드의 목표 온도를 얻을 수 있다고 생각한다.nest api 두 서모 스탯 모드의 목표 온도
목표 temps 변경과 동일한 질문입니다. 하나의 요청으로 가열 및 냉각 모드의 목표 온도를 모두 변경할 수 있습니까?
시스템이 식히고 가열 될 수 있다고 가정하면 온도 조절기에는 열, 냉각, 열 냉각의 세 가지 모드가 있습니다.
히트 모드 또는 쿨 모드에있는 경우 target_temperature를 설정할 수 있습니다. 가열 냉각 모드 인 경우 target_temperature_low_c & target_temperature_high_c를 설정할 수 있습니다.
당신은 하나 개의 온도 통화에서 모든 대상의 온도를 검색 할 수 있습니다:
{"target_temperature_low_c": 19, "target_temperature_high_c": 21}
: 당신은 하나의 호출에 열 차가운 온도를 설정할 수 있습니다,하지만 당신은 열 냉각 모드로해야합니다
https://developer-api.nest.com/devices/thermostats/$THERMOSTAT_ID?auth=$AUTH
당신은 하나의 호출에 열 또는 차가운 온도를 설정할 수 있지만 열 또는 멋진 모드로해야합니다
{"target_temperature_c": 20}
모드를 설정하고 아직 적절한 모드가 아닌 경우 온도를 설정하려면 2 번 통화해야합니다.
단일 API 호출에서 여러 서모 스탯의 경우에도 모든 서모 스탯 데이터를 가져올 수 있습니다. 난 그냥에서의 Bitbucket에 그것을 않습니다 Python으로 작성된 오픈 소스 응용 프로그램 게시 : 결정
https://bitbucket.org/dwalton64_/window-watcher
응용 프로그램은 날씨 지하 둥지에서 airnow 및 데이터에서 대기 질 데이터로부터 기상 데이터에 보이는을 사용자가해야하는 경우 창을 열거 나 닫으십시오. Nest에 API 호출을 만들어 모든 데이터를 단일 호출로 가져온 다음 구조의 데이터를 구문 분석합니다. 그런 다음 응용 프로그램은 자동 온도 조절기 hvac 모드와 목표 온도를 사용하여 사용자가 창을 열어야하는지 확인합니다.
email = ""
for thermostat in thermostats:
email += "For the thermostat " + thermostat.name + ":\n"
if thermostat.hvac_mode == 'cool':
if myWeather.temp_f < thermostat.target_temperature_f:
open_windows = True
email += " - It is cool outside (" + str(myWeather.temp_f) + " Deg F). \n"
else:
email += " - It is too hot outside to have the windows open. \n"
email += " - Thermostat is set at " + str(thermostat.target_temperature_f) + \
" Deg F\n"
if thermostat.hvac_mode == 'heat-cool':
if thermostat.target_temperature_high_f > myWeather.temp_f > thermostat.target_temperature_low_f:
open_windows = True
email += " - Thermostat is set to heat-cool and it's comfortable out (" + \
str(myWeather.temp_f) + " Deg F). \n"
elif myWeather.temp_f >= thermostat.target_temperature_high_f:
email += " - The thermostat is set to heat-cool and it is hot outside (" + \
str(myWeather.temp_f) + " Deg F). \n"
else:
email += " - The thermostat is set to heat-cool & it is cold outside (" + \
str(myWeather.temp_f) + " Deg F). \n"
email += " - The thermostat is set to cool at " + \
str(thermostat.target_temperature_high_f) + " Deg F\n"
email += " - The thermostat is set to heat at " + \
str(thermostat.target_temperature_low_f) + " Deg F\n"
if thermostat.hvac_mode == 'heat':
if myWeather.temp_f > thermostat.target_temperature_f:
open_windows = True
email += " - The thermostat is set to heat and it is warm outside (" + \
str(myWeather.temp_f) + " Deg F). \n"
else:
email += " - The thermostat is set to heat and it is cool outside (" + \
str(myWeather.temp_f) + " Deg F). \n"
email += " - Thermostat is set at " + str(thermostat.target_temperature_f) + \
" Deg F\n"
email += "\n"
: 나는 온도 조절 객체의 데이터를 일단
nestUserUrl = "https://developer-api.nest.com/?auth=" + auth_token
nest_user_file = urllib2.urlopen(self.nestUserUrl)
nest_user_json = json.loads(nest_user_file.read())
# copy thermostat data out of the json from Nest
thermostat_data = []
for tstat_id in nest_user_json['devices']['thermostats']:
thermostat_data.append(nest_user_json['devices']['thermostats'][tstat_id])
# create thermostat objects containing the thermostat data we want to access
thermostats = []
for tstat in thermostat_data:
thermostats.append(
NestThermostat(tstat['ambient_temperature_f'], tstat['device_id'],
tstat['hvac_mode'],
tstat['is_online'], tstat['last_connection'],
tstat['name'],
tstat['software_version'], tstat['structure_id'],
tstat['target_temperature_f'],
tstat['target_temperature_high_f'],
tstat['target_temperature_low_f']))
class NestThermostat():
def __init__(self, ambient_temperature_f, device_id, hvac_mode, is_online,
last_connection, name, software_version, structure_id,
target_temperature_f, target_temperature_high_f, target_temperature_low_f):
self.ambient_temperature_f = ambient_temperature_f
self.device_id = device_id
self.hvac_mode = hvac_mode
self.is_online = is_online
self.last_connection = last_connection
self.name = name
self.software_version = software_version
self.structure_id = structure_id
self.target_temperature_f = target_temperature_f
self.target_temperature_high_f = target_temperature_high_f
self.target_temperature_low_f = target_temperature_low_f
def print_current_temp_f(self):
print("Thermostat " + self.name + " measures a current temperature of " + str(
self.ambient_temperature_f) + " degrees F")
def print_target_temp_f(self):
print("Thermostat " + self.name + " is set to " + str(self.target_temperature_f) + " degrees F")
, 내가 HVAC 모드와 목표 온도를 모두 사용할 수 있습니다 : 여기
내가 내 응용 프로그램에서 철수 일부 파이썬 코드가열 및 냉각 모드의 목표 온도는 target_temperature_f와 같습니다.
모든 목표 온도를 검색하는 것 외에는 모두 분명합니다. 내가 차가운 열 모드에 대한 하나의 통화 목표 온도에서 검색 할 수 없다고 생각합니까? 한 번의 호출로 현재 온도 조절 모드와 열 냉각 모드를 설명하는 target_temperature_low_c 및 target_temperature_high_c의 목표 온도를 검색 할 수 있습니다. 동의하니? – user1442611
동일한 통화이기 때문에 한 번의 호출로 냉/난방 모드의 목표 온도를 검색 할 수 있습니다 : target_temperature_c. 당신이 어떤 모드에 있든 상관 없습니다. – thesimm
나는 그렇게 생각하지 않습니다.target_temperature_c는 섭씨로 표시된 target_temperature_f와 동일한 목표 온도입니다. – user1442611