diff --git a/fixtures/vcr_cassettes/.DS_Store b/fixtures/vcr_cassettes/.DS_Store new file mode 100644 index 0000000..5008ddf Binary files /dev/null and b/fixtures/vcr_cassettes/.DS_Store differ diff --git a/fixtures/vcr_cassettes/NestThermostat_Nest/detects_invalid_logins.yml b/fixtures/vcr_cassettes/NestThermostat_Nest/detects_invalid_logins.yml new file mode 100644 index 0000000..76e42bd --- /dev/null +++ b/fixtures/vcr_cassettes/NestThermostat_Nest/detects_invalid_logins.yml @@ -0,0 +1,34 @@ +--- +http_interactions: +- request: + method: post + uri: https://home.nest.com/user/login + body: + encoding: UTF-8 + string: username=invalid%40example.com&password=asdf + headers: + user-agent: + - Nest/1.1.0.10 CFNetwork/548.0.4 + response: + status: + code: 400 + message: Bad Request + headers: + content-type: + - application/json + date: + - Tue, 27 Oct 2015 14:34:17 GMT + server: + - nginx/1.4.4 + set-cookie: + - cztoken=; Expires=Tue, 27 Oct 2015 14:34:17 GMT + content-length: + - '125' + connection: + - Close + body: + encoding: UTF-8 + string: '{"error":"access_denied","error_description":"invalid user credentials","instance_id":"429fba9b-c82f-48a9-af2b-9cb219cffc55"}' + http_version: '1.1' + recorded_at: Tue, 27 Oct 2015 14:34:17 GMT +recorded_with: VCR 2.9.3 diff --git a/fixtures/vcr_cassettes/NestThermostat_Nest/does_not_remember_the_login_email_or_password.yml b/fixtures/vcr_cassettes/NestThermostat_Nest/does_not_remember_the_login_email_or_password.yml new file mode 100644 index 0000000..753570e --- /dev/null +++ b/fixtures/vcr_cassettes/NestThermostat_Nest/does_not_remember_the_login_email_or_password.yml @@ -0,0 +1,87 @@ +--- +http_interactions: +- request: + method: post + uri: https://home.nest.com/user/login + body: + encoding: UTF-8 + string: username=test%40yahoo.com&password=sekret + headers: + user-agent: + - Nest/1.1.0.10 CFNetwork/548.0.4 + response: + status: + code: 200 + message: OK + headers: + content-type: + - application/json + date: + - Tue, 27 Oct 2015 14:34:18 GMT + server: + - nginx/1.4.4 + set-cookie: + - cztoken=b.2423243.0kxBAwso8DcRT1AHPbvq0gRMTn4LiEKDhCAOhkYs7mz9Z2Faeuwh2DHsonlR1Wx3dO1n9ukfXMPF4OkBSEilPxoOcLphgYEgiXRekTAmkWWoZcb4aoZt3axSBLtyFQOmWrvT85OfL2UgKuaR; + Expires=Thu, 26 Nov 2015 14:34:17 GMT; Secure + content-length: + - '2197' + connection: + - Close + body: + encoding: UTF-8 + string: '{"user":"user.2423243","access_token":"b.2423243.0kxBAwso8DcRT1AHPbvq0gRMTn4LiEKDhCAOhkYs7mz9Z2Faeuwh2DHsonlR1Wx3dO1n9ukfXMPF4OkBSEilPxoOcLphgYEgiXRekTAmkWWoZcb4aoZt3axSBLtyFQOmWrvT85OfL2UgKuaR","expires_in":"Thu, + 26-Nov-2015 14:34:17 GMT","language":"en_US","email":"test@yahoo.com","is_superuser":false,"is_staff":false,"urls":{"transport_url":"https://czfe90-front01-iad01.transport.home.nest.com","czfe_url":"https://czfe90-front01-iad01.transport.home.nest.com","direct_transport_url":"https://transport01-rts09-iad01.transport.home.nest.com:443","rubyapi_url":"https://home.nest.com/","weather_url":"https://apps-weather.nest.com/weather/v1?query=","log_upload_url":"https://log-rts09-iad01.home.nest.com/upload/user","support_url":"https://nest.secure.force.com/support/webapp?"},"limits":{"thermostats_per_structure":20,"structures":2,"thermostats":40,"smoke_detectors":36,"smoke_detectors_per_structure":18},"weave":{"service_config":"1QAADwABADYBFTABCEdYfNbKQ+Z8JAIENwMnEwEAAADuMLQYGCYERUgWGiYFRQb7STcGJxMBAAAA7jC0GBgkBwImCCUAWiMwCjkEFJtArVoBj0T+fpKZeV1TBT0osdlSUx1FRK1ZTcslNfDQSMUwiG3iH5tQjeGhrxbfr0kphGthRBA1gykBKQIYNYIpASQCYBg1gTACCEM09xLfX5HPGDWAMAIIQzT3Et9fkc8YNQwwAR0AlvB51cbUag/T//0P7EqwJNQATpT0hWNT7odJgzACHQCPTm4jL9hwiKnIKvpqXtz6LnCd0ifQrU9apo0jGBgVMAEIXYkodEr1AdAkAgQ3AywBBzI0MjMyNDMYJgSUcSIeJgWUGkgxNwYsAQcyNDIzMjQzGCQHAiYIJQBaIzAKOQRiIZeDbWdzrS9L/8BCP231hinNbMIB5VWsBP8zjc4U9PxFkrC2Nom9hfEnUYIx/SjsaJJp5yPuODWDKQEYNYIpASQCBRg1hCkBNgIEAgQBGBg1gTACCE5l7/ee7NldGDWAMAIITmXv957s2V0YNQwwARwOJoELt7iynQNB/aGh9JoQL/gzTFzUI7Am0xYeMAIdAIt0EwEUhHkegDzo172nvW2fQy5qMtUUA3RK5TAYGBg1AicBAQAAAAIwtBg2AhUsARJmcm9udGRvb3IubmVzdC5jb20lAlcrGBgYGA==","pairing_token":"wu.yS0n7oFQGM9Nj2jCq9GPkqUevy0s4CSR/1zNgyk2Eo85oEbvGZ2xVhnNnq8riciIVaIY12UFMRBx5oHXvrV8ZUN+ZUM=","access_token":"lQkANQEwAQhdiSh0SvUB0CQCBDcDLAEHMjQyMzI0MxgmBJRxIh4mBZQaSDE3BiwBBzI0MjMyNDMYJAcCJgglAFojMAo5BGIhl4NtZ3OtL0v/wEI/bfWGKc1swgHlVawE/zONzhT0/EWSsLY2ib2F8SdRgjH9KOxokmnnI+44NYMpARg1gikBJAIFGDWEKQE2AgQCBAEYGDWBMAIITmXv957s2V0YNYAwAghOZe/3nuzZXRg1DDABHA4mgQu3uLKdA0H9oaH0mhAv+DNMXNQjsCbTFh4wAh0Ai3QTARSEeR6APOjXvae9bZ9DLmoy1RQDdErlMBgYNQImASUAWiMwAhxnzkTnVXVu258FYcj1SssE/s4zKq9t+kBSvHPlGBg="},"userid":"2423243"}' + http_version: '1.1' + recorded_at: Tue, 27 Oct 2015 14:34:19 GMT +- request: + method: get + uri: https://on6%DFn7%D2LA%03%0B(%F07%11OP%07=%BB%EA%D2%04LN~%0B%88B%83%84%20%0E%86F,%EEl%FDgaZz%EC!%D81%EC%A2yQ%D5lwt%EDg%F6%E9%1F%5C%C3%C5%E0%E9%01HH%A5%3F%1A%0Ep%BAa%81%81%20%89t%5E%910&%91e%A8e%C6%F8j%86m%DD%ACR%04%BBr%15%03%A6Z%BB%D3%F3%93%9F%2Fe%20*%E6%91@czfe90-front01-iad01.transport.home.nest.com/v2/mobile/user.2423243 + body: + encoding: US-ASCII + string: '' + headers: + host: + - czfe90-front01-iad01.transport.home.nest.com + user-agent: + - Nest/1.1.0.10 CFNetwork/548.0.4 + authorization: + - Basic b.2423243.0kxBAwso8DcRT1AHPbvq0gRMTn4LiEKDhCAOhkYs7mz9Z2Faeuwh2DHsonlR1Wx3dO1n9ukfXMPF4OkBSEilPxoOcLphgYEgiXRekTAmkWWoZcb4aoZt3axSBLtyFQOmWrvT85OfL2UgKuaR + x-nl-user-id: + - '2423243' + x-nl-protocol-version: + - '1' + accept-language: + - en-us + connection: + - keep-alive + accept: + - "*/*" + response: + status: + code: 200 + message: OK + headers: + content-type: + - application/json + x-nl-defer-device-window: + - '120' + x-nl-service-timestamp: + - '1445956459588' + content-length: + - '10890' + connection: + - keep-alive + body: + encoding: UTF-8 + string: '{"user_alert_dialog":{"2423243":{"$version":-31019,"$timestamp":1445954076171,"dialog_data":"","dialog_id":"confirm-pairing"}},"buckets":{"2423243":{"$version":12532,"$timestamp":1445956458542,"buckets":["user.2423243","user_alert_dialog.2423243","message_center.2423243","user_settings.2423243","buckets.2423243","device.fake3243E4FEE924","demand_response.fake3243E4FEE924","device_alert_dialog.fake3243E4FEE924","link.fake3243E4FEE924","message.fake3243E4FEE924","metadata.fake3243E4FEE924","schedule.fake3243E4FEE924","shared.fake3243E4FEE924","track.fake3243E4FEE924","tuneups.fake3243E4FEE924","energy_latest.fake3243E4FEE924","energy_weekly.fake3243E4FEE924","diamond_sensor_event.fake3243E4FEE924","diamond_sensor_config.fake3243E4FEE924","structure.0b47dcf0-7c13-11e5-8199-22000b420f99","where.0b47dcf0-7c13-11e5-8199-22000b420f99","utility.0b47dcf0-7c13-11e5-8199-22000b420f99","structure_history.0b47dcf0-7c13-11e5-8199-22000b420f99","trip.0b47dcf0-7c13-11e5-8199-22000b420f99","structure_metadata.0b47dcf0-7c13-11e5-8199-22000b420f99","safety.0b47dcf0-7c13-11e5-8199-22000b420f99","safety_summary.0b47dcf0-7c13-11e5-8199-22000b420f99","geofence_info.0b47dcf0-7c13-11e5-8199-22000b420f99"]}},"track":{"fake3243E4FEE924":{"$version":31457,"$timestamp":1445954075890,"online":false}},"message_center":{"2423243":{"$version":-1,"$timestamp":1325379661000,"messages":[]}},"safety":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":3651,"$timestamp":1445885694252,"audio_self_test_participants":[]}},"utility":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-1,"$timestamp":1}},"where":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":25319,"$timestamp":1445885694015,"wheres":[{"where_id":"00000000-0000-0000-0000-000100000001","name":"Basement"},{"where_id":"00000000-0000-0000-0000-00010000000d","name":"Bedroom"},{"where_id":"00000000-0000-0000-0000-000100000003","name":"Den"},{"where_id":"00000000-0000-0000-0000-000100000010","name":"Dining + Room"},{"where_id":"00000000-0000-0000-0000-000100000006","name":"Downstairs"},{"where_id":"00000000-0000-0000-0000-000100000000","name":"Entryway"},{"where_id":"00000000-0000-0000-0000-00010000000b","name":"Family + Room"},{"where_id":"00000000-0000-0000-0000-000100000002","name":"Hallway"},{"where_id":"00000000-0000-0000-0000-000100000008","name":"Kids + Room"},{"where_id":"00000000-0000-0000-0000-00010000000a","name":"Kitchen"},{"where_id":"00000000-0000-0000-0000-00010000000c","name":"Living + Room"},{"where_id":"00000000-0000-0000-0000-000100000005","name":"Master Bedroom"},{"where_id":"00000000-0000-0000-0000-00010000000e","name":"Office"},{"where_id":"00000000-0000-0000-0000-00010000000f","name":"Upstairs"}]}},"structure":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-9689,"$timestamp":1445956385810,"away_timestamp":1445954700,"away":false,"location":"Palm + Harbor, FL","name":"Chrome App Structure","postal_code":"34683","topaz_away":false,"creation_time":1445885694067,"country_code":"US","away_setter":0,"topaz_hush_key":"FmyQftpkdU9eH9St4mMWhQ==","user":"user.2423243","devices":["device.fake3243E4FEE924"],"swarm":["device.fake3243E4FEE924"],"fabric_ids":[],"clutches":[],"members":[{"user":"user.2423243","roles":["owner"]}]}},"message":{"fake3243E4FEE924":{"$version":-24419,"$timestamp":1445954076171,"1":{"cmd":"register"}}},"tuneups":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1}},"device":{"fake3243E4FEE924":{"$version":-27199,"$timestamp":1445956401831,"heatpump_setback_active":false,"emer_heat_enable":false,"touched_by":{},"local_ip":"192.168.2.4","switch_system_off":false,"away_temperature_high":24.444,"cooling_source":"electric","temperature_lock_high_temp":22.222,"y2_type":"unknown","leaf_threshold_cool":0,"heater_source":"gas","fan_cooling_state":false,"note_codes":[],"compressor_lockout_leaf":-17.8,"has_x3_heat":false,"target_humidity_enabled":false,"heat_x3_source":"electric","alt_heat_delivery":"forced-air","has_x2_heat":false,"fan_mode":"auto","rssi":66,"sunlight_correction_active":false,"emer_heat_delivery":"forced-air","heatpump_savings":"off","pin_y2_description":"none","humidity_control_lockout_end_time":0,"filter_reminder_level":0,"gear_opacity":0,"filter_reminder_enabled":true,"capability_level":4,"schedule_learning_reset":false,"has_x2_cool":false,"hvac_pins":"W1,C,Rh,G","ob_orientation":"O","cooling_delivery":"unknown","range_enable":false,"auto_away_enable":true,"dual_fuel_breakpoint_override":"none","lower_safety_temp_enabled":true,"has_fan":true,"dehumidifier_state":false,"emer_heat_source":"electric","nlclient_state":"","heatpump_ready":false,"cooling_x2_delivery":"unknown","available_locales":"en_US,fr_CA,es_US,en_GB","current_version":"4.1","has_fossil_fuel":true,"learning_state":"slow","pin_ob_description":"none","pin_rh_description":"power","has_alt_heat":false,"safety_temp_activating_hvac":false,"fan_duty_cycle":900,"pin_y1_description":"none","humidifier_state":false,"gear_threshold_high":0,"backplate_serial_number":"02BA01AB241200CW","has_x2_alt_heat":false,"heat_x3_delivery":"forced-air","leaf_threshold_heat":18.334,"is_on_stand":false,"has_emer_heat":false,"learning_mode":true,"leaf_learning":"ready","has_aux_heat":false,"filter_changed_set_date":1386452016,"aux_heat_source":"electric","backplate_bsl_info":"BSL","alt_heat_x2_source":"gas","sunlight_correction_ready":true,"humidifier_type":"unknown","pin_c_description":"power","humidity_control_lockout_start_time":0,"pin_w2aux_description":"none","fan_timer_timeout":0,"country_code":"US","sunlight_correction_enabled":true,"heat_x2_delivery":"forced-air","target_humidity":35,"gear_threshold_low":0,"lower_safety_temp":4.738,"cooling_x2_source":"electric","equipment_type":"electric","heat_pump_aux_threshold":10,"alt_heat_x2_delivery":"forced-air","heat_pump_comp_threshold":-31.5,"learning_days_completed_cool":0,"backplate_bsl_version":"2.1","current_schedule_mode":"HEAT","fan_duty_end_time":68400,"hvac_wires":"Heat,Fan,Common + Wire,Rh","leaf":true,"type":"TBD","pin_g_description":"fan","click_sound":"on","away_temperature_low_enabled":true,"aux_heat_delivery":"forced-air","filter_changed_date":1387065600,"hvac_safety_shutoff_active":false,"heat_pump_comp_threshold_enabled":false,"has_dehumidifier":false,"preconditioning_ready":true,"fan_cooling_enabled":true,"leaf_away_high":28.88,"fan_cooling_readiness":"not + ready","device_locale":"en_US","temperature_scale":"F","battery_level":3.963,"error_code":"","maint_band_upper":0.39,"preconditioning_active":false,"fan_control_state":false,"away_temperature_high_enabled":false,"dehumidifier_fan_activation":false,"learning_days_completed_heat":598,"humidifier_fan_activation":false,"pin_star_description":"none","upper_safety_temp_enabled":false,"dual_fuel_selected":false,"preconditioning_enabled":false,"current_humidity":50,"dual_fuel_breakpoint":-1,"postal_code":"94602","backplate_mono_version":"4.0.20","alt_heat_source":"gas","aux_lockout_leaf":10,"has_heat_pump":false,"heater_delivery":"forced-air","away_temperature_low":12.778,"auto_away_reset":false,"radiant_control_enabled":false,"has_air_filter":true,"temperature_lock":false,"dehumidifier_type":"unknown","time_to_target_training":"training","upper_safety_temp":35,"humidity_control_lockout_enabled":false,"fan_timer_duration":900,"target_time_confidence":0,"pin_w1_description":"heat","temperature_lock_low_temp":20,"where_id":"00000000-0000-0000-0000-000100000001","forced_air":true,"temperature_lock_pin_hash":"","auto_dehum_enabled":false,"leaf_type":1,"backplate_mono_info":"TFE + (BP_D2) 4.0.20 (root@bamboo) 2014-02-03 10:06:33","has_dual_fuel":false,"star_type":"unknown","learning_time":1703,"maint_band_lower":0.39,"creation_time":1420654958512,"has_humidifier":false,"learning_days_completed_range":0,"dehumidifier_orientation_selected":"unknown","leaf_schedule_delta":1.11,"logging_priority":"informational","user_brightness":"medium","leaf_away_low":16.835,"pin_rc_description":"none","auto_dehum_state":false,"serial_number":"80C4887E69DF00D9","heat_x2_source":"electric","mac_address":"18b430093686","fan_duty_start_time":50400,"time_to_target":0,"backplate_model":"Backplate-2.2","heat_link_connection":0,"model_version":"Display-2.1","heat_pump_aux_threshold_enabled":true,"ob_persistence":true,"schedules":[]}},"trip":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":32201,"$timestamp":1445885694252,"trips":[]}},"demand_response":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1}},"user":{"2423243":{"$version":9049,"$timestamp":1445885721137,"email":"test@yahoo.com","name":"test@yahoo.com","structures":["structure.0b47dcf0-7c13-11e5-8199-22000b420f99"],"structure_memberships":[{"structure":"structure.0b47dcf0-7c13-11e5-8199-22000b420f99","roles":["owner"]}]}},"link":{"fake3243E4FEE924":{"$version":10338,"$timestamp":1445954076171,"structure":"structure.0b47dcf0-7c13-11e5-8199-22000b420f99"}},"device_alert_dialog":{"fake3243E4FEE924":{"$version":-9248,"$timestamp":1445954076171,"dialog_data":"","dialog_id":"confirm-pairing"}},"geofence_info":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-31412,"$timestamp":1445885694252,"device_events":[],"fences":[]}},"metadata":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1356998400000,"last_ip":"127.0.0.1","last_connection":1356998400000}},"user_settings":{"2423243":{"$version":31691,"$timestamp":1445354998080,"email_verified":true,"tos_accepted_version":1434564000000,"receive_marketing_emails":true,"receive_nest_emails":true,"receive_support_emails":true,"max_structures":2,"max_thermostats":40,"max_thermostats_per_structure":20,"max_smoke_detectors_per_structure":18,"max_smoke_detectors":36,"max_wwn_devices_per_structure":10,"max_wwn_devices":20,"tos_minimum_version":1434564000000,"tos_current_version":1434564000000,"lang":"en_US"}},"schedule":{"fake3243E4FEE924":{"$version":21638,"$timestamp":1445954075940}},"structure_metadata":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-32678,"$timestamp":1445951380776,"entitlements_api_path":"/api/0.1/structure/0b47dcf0-7c13-11e5-8199-22000b420f99/entitlements?v=8a957eeb-c93a-4e47-aea4-fb31cfc65691"}},"shared":{"fake3243E4FEE924":{"$version":-13990,"$timestamp":1445956397555,"auto_away_learning":"ready","auto_away":0,"hvac_alt_heat_state":false,"compressor_lockout_enabled":false,"hvac_heat_x3_state":false,"target_temperature_type":"heat","hvac_heater_state":false,"can_heat":true,"hvac_emer_heat_state":false,"compressor_lockout_timeout":0,"hvac_cool_x2_state":false,"target_temperature_high":23.33333,"hvac_aux_heater_state":false,"hvac_heat_x2_state":false,"target_temperature_low":23.33333,"hvac_ac_state":false,"target_temperature":22.85,"hvac_fan_state":false,"target_change_pending":true,"name":"E924","current_temperature":21,"hvac_alt_heat_x2_state":false,"can_cool":true}},"safety_summary":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-21456,"$timestamp":1445885694252}}}' + http_version: '1.1' + recorded_at: Tue, 27 Oct 2015 14:34:20 GMT +recorded_with: VCR 2.9.3 diff --git a/fixtures/vcr_cassettes/NestThermostat_Nest/doesn_t_fail_if_there_are_no_thermostats.yml b/fixtures/vcr_cassettes/NestThermostat_Nest/doesn_t_fail_if_there_are_no_thermostats.yml new file mode 100644 index 0000000..f250e78 --- /dev/null +++ b/fixtures/vcr_cassettes/NestThermostat_Nest/doesn_t_fail_if_there_are_no_thermostats.yml @@ -0,0 +1,51 @@ +--- +http_interactions: +- request: + method: get + uri: https://on6%DFn7d%AC%A0%B57%D4%F7j9ZD%5B%13g%12%AE%AA7~%FD+gwtO%12%A9%DA%CA%60&Ea%B7%DCp%05%18s%C2&%DD%F4%C2;%D9Bw%09%25I;%BC%D5x%D9:V%E99*rC%B92;4cV%5D%E7%E1%DC%C7%B2%B0%16O%94ZY%B6%20%94X%17%03%ED%1E%91%CC%09tNS(%C9%F2%20%E9%FEY%01%5C%3Cf%A4%E4@czfe09-front01-iad01.transport.home.nest.com/v2/mobile/user.2423243 + body: + encoding: US-ASCII + string: '' + headers: + host: + - czfe09-front01-iad01.transport.home.nest.com + user-agent: + - Nest/1.1.0.10 CFNetwork/548.0.4 + authorization: + - Basic b.2423243.ZKygtTfU92o5WkRbE2cSrqo3fv0rZ3d0TxKp2spgJkVht9xwBRhzwibd9MI72UJ3CSVJO7zVeNk6Vuk5KnJDuTI7NGNWXefh3MeysBZPlFpZtiCUWBcD7R6RzAl0TlMoyfIg6f5ZAVw8ZqTk + x-nl-user-id: + - '2423243' + x-nl-protocol-version: + - '1' + accept-language: + - en-us + connection: + - keep-alive + accept: + - "*/*" + response: + status: + code: 200 + message: OK + headers: + content-type: + - application/json + x-nl-defer-device-window: + - '120' + x-nl-service-timestamp: + - '1445956565096' + content-length: + - '4032' + connection: + - keep-alive + body: + encoding: UTF-8 + string: '{"buckets":{"2423243":{"$version":-32194,"$timestamp":1445956557750,"buckets":["user.2423243","user_alert_dialog.2423243","message_center.2423243","user_settings.2423243","buckets.2423243","structure.0b47dcf0-7c13-11e5-8199-22000b420f99","where.0b47dcf0-7c13-11e5-8199-22000b420f99","utility.0b47dcf0-7c13-11e5-8199-22000b420f99","structure_history.0b47dcf0-7c13-11e5-8199-22000b420f99","trip.0b47dcf0-7c13-11e5-8199-22000b420f99","structure_metadata.0b47dcf0-7c13-11e5-8199-22000b420f99","safety.0b47dcf0-7c13-11e5-8199-22000b420f99","safety_summary.0b47dcf0-7c13-11e5-8199-22000b420f99","geofence_info.0b47dcf0-7c13-11e5-8199-22000b420f99"]}},"user_alert_dialog":{"2423243":{"$version":-31019,"$timestamp":1445954076171,"dialog_data":"","dialog_id":"confirm-pairing"}},"message_center":{"2423243":{"$version":-1,"$timestamp":1325379661000,"messages":[]}},"safety":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":3651,"$timestamp":1445885694252,"audio_self_test_participants":[]}},"utility":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-1,"$timestamp":1}},"where":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":25319,"$timestamp":1445885694015,"wheres":[{"where_id":"00000000-0000-0000-0000-000100000001","name":"Basement"},{"where_id":"00000000-0000-0000-0000-00010000000d","name":"Bedroom"},{"where_id":"00000000-0000-0000-0000-000100000003","name":"Den"},{"where_id":"00000000-0000-0000-0000-000100000010","name":"Dining + Room"},{"where_id":"00000000-0000-0000-0000-000100000006","name":"Downstairs"},{"where_id":"00000000-0000-0000-0000-000100000000","name":"Entryway"},{"where_id":"00000000-0000-0000-0000-00010000000b","name":"Family + Room"},{"where_id":"00000000-0000-0000-0000-000100000002","name":"Hallway"},{"where_id":"00000000-0000-0000-0000-000100000008","name":"Kids + Room"},{"where_id":"00000000-0000-0000-0000-00010000000a","name":"Kitchen"},{"where_id":"00000000-0000-0000-0000-00010000000c","name":"Living + Room"},{"where_id":"00000000-0000-0000-0000-000100000005","name":"Master Bedroom"},{"where_id":"00000000-0000-0000-0000-00010000000e","name":"Office"},{"where_id":"00000000-0000-0000-0000-00010000000f","name":"Upstairs"}]}},"structure":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-27268,"$timestamp":1445956557452,"away":false,"away_setter":0,"away_timestamp":1445954700,"country_code":"US","creation_time":1445885694067,"location":"Palm + Harbor, FL","name":"Chrome App Structure","postal_code":"34683","topaz_away":false,"topaz_hush_key":"FmyQftpkdU9eH9St4mMWhQ==","user":"user.2423243","devices":[],"swarm":[],"fabric_ids":[],"clutches":[],"members":[{"user":"user.2423243","roles":["owner"]}]}},"trip":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":32201,"$timestamp":1445885694252,"trips":[]}},"user":{"2423243":{"$version":9049,"$timestamp":1445885721137,"email":"test@yahoo.com","name":"test@yahoo.com","structures":["structure.0b47dcf0-7c13-11e5-8199-22000b420f99"],"structure_memberships":[{"structure":"structure.0b47dcf0-7c13-11e5-8199-22000b420f99","roles":["owner"]}]}},"geofence_info":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-31412,"$timestamp":1445885694252,"device_events":[],"fences":[]}},"user_settings":{"2423243":{"$version":31691,"$timestamp":1445354998080,"email_verified":true,"tos_accepted_version":1434564000000,"receive_marketing_emails":true,"receive_nest_emails":true,"receive_support_emails":true,"max_structures":2,"max_thermostats":40,"max_thermostats_per_structure":20,"max_smoke_detectors_per_structure":18,"max_smoke_detectors":36,"max_wwn_devices_per_structure":10,"max_wwn_devices":20,"tos_minimum_version":1434564000000,"tos_current_version":1434564000000,"lang":"en_US"}},"structure_metadata":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":19380,"$timestamp":1445956557981,"entitlements_api_path":"/api/0.1/structure/0b47dcf0-7c13-11e5-8199-22000b420f99/entitlements?v=a6453a7c-f16e-4768-abb3-4dfb70139cfd"}},"safety_summary":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-21456,"$timestamp":1445885694252}}}' + http_version: '1.1' + recorded_at: Tue, 27 Oct 2015 14:36:05 GMT +recorded_with: VCR 2.9.3 diff --git a/fixtures/vcr_cassettes/NestThermostat_Nest/gets_away_status.yml b/fixtures/vcr_cassettes/NestThermostat_Nest/gets_away_status.yml new file mode 100644 index 0000000..1ab9030 --- /dev/null +++ b/fixtures/vcr_cassettes/NestThermostat_Nest/gets_away_status.yml @@ -0,0 +1,54 @@ +--- +http_interactions: +- request: + method: get + uri: https://on6%DFn7d%AC%A0%B57%D4%F7j9ZD%5B%13g%12%AE%AA7~%FD+gwtO%12%A9%DA%CA%60&Ea%B7%DCp%05%18s%C2&%DD%F4%C2;%D9Bw%09%25I;%BC%D5x%D9:V%E99*rC%B92;4cV%5D%E7%E1%DC%C7%B2%B0%16O%94ZY%B6%20%94X%17%03%ED%1E%91%CC%09tNS(%C9%F2%20%E9%FEY%01%5C%3Cf%A4%E4@czfe09-front01-iad01.transport.home.nest.com/v2/mobile/user.2423243 + body: + encoding: US-ASCII + string: '' + headers: + host: + - czfe09-front01-iad01.transport.home.nest.com + user-agent: + - Nest/1.1.0.10 CFNetwork/548.0.4 + authorization: + - Basic b.2423243.ZKygtTfU92o5WkRbE2cSrqo3fv0rZ3d0TxKp2spgJkVht9xwBRhzwibd9MI72UJ3CSVJO7zVeNk6Vuk5KnJDuTI7NGNWXefh3MeysBZPlFpZtiCUWBcD7R6RzAl0TlMoyfIg6f5ZAVw8ZqTk + x-nl-user-id: + - '2423243' + x-nl-protocol-version: + - '1' + accept-language: + - en-us + connection: + - keep-alive + accept: + - "*/*" + response: + status: + code: 200 + message: OK + headers: + content-type: + - application/json + x-nl-defer-device-window: + - '120' + x-nl-service-timestamp: + - '1445956461526' + content-length: + - '10890' + connection: + - keep-alive + body: + encoding: UTF-8 + string: '{"user_alert_dialog":{"2423243":{"$version":-31019,"$timestamp":1445954076171,"dialog_data":"","dialog_id":"confirm-pairing"}},"buckets":{"2423243":{"$version":12532,"$timestamp":1445956458542,"buckets":["user.2423243","user_alert_dialog.2423243","message_center.2423243","user_settings.2423243","buckets.2423243","device.fake3243E4FEE924","demand_response.fake3243E4FEE924","device_alert_dialog.fake3243E4FEE924","link.fake3243E4FEE924","message.fake3243E4FEE924","metadata.fake3243E4FEE924","schedule.fake3243E4FEE924","shared.fake3243E4FEE924","track.fake3243E4FEE924","tuneups.fake3243E4FEE924","energy_latest.fake3243E4FEE924","energy_weekly.fake3243E4FEE924","diamond_sensor_event.fake3243E4FEE924","diamond_sensor_config.fake3243E4FEE924","structure.0b47dcf0-7c13-11e5-8199-22000b420f99","where.0b47dcf0-7c13-11e5-8199-22000b420f99","utility.0b47dcf0-7c13-11e5-8199-22000b420f99","structure_history.0b47dcf0-7c13-11e5-8199-22000b420f99","trip.0b47dcf0-7c13-11e5-8199-22000b420f99","structure_metadata.0b47dcf0-7c13-11e5-8199-22000b420f99","safety.0b47dcf0-7c13-11e5-8199-22000b420f99","safety_summary.0b47dcf0-7c13-11e5-8199-22000b420f99","geofence_info.0b47dcf0-7c13-11e5-8199-22000b420f99"]}},"track":{"fake3243E4FEE924":{"$version":31457,"$timestamp":1445954075890,"online":false}},"message_center":{"2423243":{"$version":-1,"$timestamp":1325379661000,"messages":[]}},"safety":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":3651,"$timestamp":1445885694252,"audio_self_test_participants":[]}},"utility":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-1,"$timestamp":1}},"where":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":25319,"$timestamp":1445885694015,"wheres":[{"where_id":"00000000-0000-0000-0000-000100000001","name":"Basement"},{"where_id":"00000000-0000-0000-0000-00010000000d","name":"Bedroom"},{"where_id":"00000000-0000-0000-0000-000100000003","name":"Den"},{"where_id":"00000000-0000-0000-0000-000100000010","name":"Dining + Room"},{"where_id":"00000000-0000-0000-0000-000100000006","name":"Downstairs"},{"where_id":"00000000-0000-0000-0000-000100000000","name":"Entryway"},{"where_id":"00000000-0000-0000-0000-00010000000b","name":"Family + Room"},{"where_id":"00000000-0000-0000-0000-000100000002","name":"Hallway"},{"where_id":"00000000-0000-0000-0000-000100000008","name":"Kids + Room"},{"where_id":"00000000-0000-0000-0000-00010000000a","name":"Kitchen"},{"where_id":"00000000-0000-0000-0000-00010000000c","name":"Living + Room"},{"where_id":"00000000-0000-0000-0000-000100000005","name":"Master Bedroom"},{"where_id":"00000000-0000-0000-0000-00010000000e","name":"Office"},{"where_id":"00000000-0000-0000-0000-00010000000f","name":"Upstairs"}]}},"structure":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-9689,"$timestamp":1445956385810,"away_timestamp":1445954700,"away":false,"location":"Palm + Harbor, FL","name":"Chrome App Structure","postal_code":"34683","topaz_away":false,"creation_time":1445885694067,"country_code":"US","away_setter":0,"topaz_hush_key":"FmyQftpkdU9eH9St4mMWhQ==","user":"user.2423243","devices":["device.fake3243E4FEE924"],"swarm":["device.fake3243E4FEE924"],"fabric_ids":[],"clutches":[],"members":[{"user":"user.2423243","roles":["owner"]}]}},"message":{"fake3243E4FEE924":{"$version":-24419,"$timestamp":1445954076171,"1":{"cmd":"register"}}},"tuneups":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1}},"device":{"fake3243E4FEE924":{"$version":-27199,"$timestamp":1445956401831,"heatpump_setback_active":false,"emer_heat_enable":false,"touched_by":{},"local_ip":"192.168.2.4","switch_system_off":false,"away_temperature_high":24.444,"cooling_source":"electric","temperature_lock_high_temp":22.222,"y2_type":"unknown","leaf_threshold_cool":0,"heater_source":"gas","fan_cooling_state":false,"note_codes":[],"compressor_lockout_leaf":-17.8,"has_x3_heat":false,"target_humidity_enabled":false,"heat_x3_source":"electric","alt_heat_delivery":"forced-air","has_x2_heat":false,"fan_mode":"auto","rssi":66,"sunlight_correction_active":false,"emer_heat_delivery":"forced-air","heatpump_savings":"off","pin_y2_description":"none","humidity_control_lockout_end_time":0,"filter_reminder_level":0,"gear_opacity":0,"filter_reminder_enabled":true,"capability_level":4,"schedule_learning_reset":false,"has_x2_cool":false,"hvac_pins":"W1,C,Rh,G","ob_orientation":"O","cooling_delivery":"unknown","range_enable":false,"auto_away_enable":true,"dual_fuel_breakpoint_override":"none","lower_safety_temp_enabled":true,"has_fan":true,"dehumidifier_state":false,"emer_heat_source":"electric","nlclient_state":"","heatpump_ready":false,"cooling_x2_delivery":"unknown","available_locales":"en_US,fr_CA,es_US,en_GB","current_version":"4.1","has_fossil_fuel":true,"learning_state":"slow","pin_ob_description":"none","pin_rh_description":"power","has_alt_heat":false,"safety_temp_activating_hvac":false,"fan_duty_cycle":900,"pin_y1_description":"none","humidifier_state":false,"gear_threshold_high":0,"backplate_serial_number":"02BA01AB241200CW","has_x2_alt_heat":false,"heat_x3_delivery":"forced-air","leaf_threshold_heat":18.334,"is_on_stand":false,"has_emer_heat":false,"learning_mode":true,"leaf_learning":"ready","has_aux_heat":false,"filter_changed_set_date":1386452016,"aux_heat_source":"electric","backplate_bsl_info":"BSL","alt_heat_x2_source":"gas","sunlight_correction_ready":true,"humidifier_type":"unknown","pin_c_description":"power","humidity_control_lockout_start_time":0,"pin_w2aux_description":"none","fan_timer_timeout":0,"country_code":"US","sunlight_correction_enabled":true,"heat_x2_delivery":"forced-air","target_humidity":35,"gear_threshold_low":0,"lower_safety_temp":4.738,"cooling_x2_source":"electric","equipment_type":"electric","heat_pump_aux_threshold":10,"alt_heat_x2_delivery":"forced-air","heat_pump_comp_threshold":-31.5,"learning_days_completed_cool":0,"backplate_bsl_version":"2.1","current_schedule_mode":"HEAT","fan_duty_end_time":68400,"hvac_wires":"Heat,Fan,Common + Wire,Rh","leaf":true,"type":"TBD","pin_g_description":"fan","click_sound":"on","away_temperature_low_enabled":true,"aux_heat_delivery":"forced-air","filter_changed_date":1387065600,"hvac_safety_shutoff_active":false,"heat_pump_comp_threshold_enabled":false,"has_dehumidifier":false,"preconditioning_ready":true,"fan_cooling_enabled":true,"leaf_away_high":28.88,"fan_cooling_readiness":"not + ready","device_locale":"en_US","temperature_scale":"F","battery_level":3.963,"error_code":"","maint_band_upper":0.39,"preconditioning_active":false,"fan_control_state":false,"away_temperature_high_enabled":false,"dehumidifier_fan_activation":false,"learning_days_completed_heat":598,"humidifier_fan_activation":false,"pin_star_description":"none","upper_safety_temp_enabled":false,"dual_fuel_selected":false,"preconditioning_enabled":false,"current_humidity":50,"dual_fuel_breakpoint":-1,"postal_code":"94602","backplate_mono_version":"4.0.20","alt_heat_source":"gas","aux_lockout_leaf":10,"has_heat_pump":false,"heater_delivery":"forced-air","away_temperature_low":12.778,"auto_away_reset":false,"radiant_control_enabled":false,"has_air_filter":true,"temperature_lock":false,"dehumidifier_type":"unknown","time_to_target_training":"training","upper_safety_temp":35,"humidity_control_lockout_enabled":false,"fan_timer_duration":900,"target_time_confidence":0,"pin_w1_description":"heat","temperature_lock_low_temp":20,"where_id":"00000000-0000-0000-0000-000100000001","forced_air":true,"temperature_lock_pin_hash":"","auto_dehum_enabled":false,"leaf_type":1,"backplate_mono_info":"TFE + (BP_D2) 4.0.20 (root@bamboo) 2014-02-03 10:06:33","has_dual_fuel":false,"star_type":"unknown","learning_time":1703,"maint_band_lower":0.39,"creation_time":1420654958512,"has_humidifier":false,"learning_days_completed_range":0,"dehumidifier_orientation_selected":"unknown","leaf_schedule_delta":1.11,"logging_priority":"informational","user_brightness":"medium","leaf_away_low":16.835,"pin_rc_description":"none","auto_dehum_state":false,"serial_number":"80C4887E69DF00D9","heat_x2_source":"electric","mac_address":"18b430093686","fan_duty_start_time":50400,"time_to_target":0,"backplate_model":"Backplate-2.2","heat_link_connection":0,"model_version":"Display-2.1","heat_pump_aux_threshold_enabled":true,"ob_persistence":true,"schedules":[]}},"trip":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":32201,"$timestamp":1445885694252,"trips":[]}},"demand_response":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1}},"user":{"2423243":{"$version":9049,"$timestamp":1445885721137,"email":"test@yahoo.com","name":"test@yahoo.com","structures":["structure.0b47dcf0-7c13-11e5-8199-22000b420f99"],"structure_memberships":[{"structure":"structure.0b47dcf0-7c13-11e5-8199-22000b420f99","roles":["owner"]}]}},"link":{"fake3243E4FEE924":{"$version":10338,"$timestamp":1445954076171,"structure":"structure.0b47dcf0-7c13-11e5-8199-22000b420f99"}},"device_alert_dialog":{"fake3243E4FEE924":{"$version":-9248,"$timestamp":1445954076171,"dialog_data":"","dialog_id":"confirm-pairing"}},"geofence_info":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-31412,"$timestamp":1445885694252,"device_events":[],"fences":[]}},"metadata":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1356998400000,"last_ip":"127.0.0.1","last_connection":1356998400000}},"user_settings":{"2423243":{"$version":31691,"$timestamp":1445354998080,"email_verified":true,"tos_accepted_version":1434564000000,"receive_marketing_emails":true,"receive_nest_emails":true,"receive_support_emails":true,"max_structures":2,"max_thermostats":40,"max_thermostats_per_structure":20,"max_smoke_detectors_per_structure":18,"max_smoke_detectors":36,"max_wwn_devices_per_structure":10,"max_wwn_devices":20,"tos_minimum_version":1434564000000,"tos_current_version":1434564000000,"lang":"en_US"}},"schedule":{"fake3243E4FEE924":{"$version":21638,"$timestamp":1445954075940}},"structure_metadata":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-32678,"$timestamp":1445951380776,"entitlements_api_path":"/api/0.1/structure/0b47dcf0-7c13-11e5-8199-22000b420f99/entitlements?v=8a957eeb-c93a-4e47-aea4-fb31cfc65691"}},"shared":{"fake3243E4FEE924":{"$version":-13990,"$timestamp":1445956397555,"auto_away_learning":"ready","auto_away":0,"hvac_alt_heat_state":false,"compressor_lockout_enabled":false,"hvac_heat_x3_state":false,"target_temperature_type":"heat","hvac_heater_state":false,"can_heat":true,"hvac_emer_heat_state":false,"compressor_lockout_timeout":0,"hvac_cool_x2_state":false,"target_temperature_high":23.33333,"hvac_aux_heater_state":false,"hvac_heat_x2_state":false,"target_temperature_low":23.33333,"hvac_ac_state":false,"target_temperature":22.85,"hvac_fan_state":false,"target_change_pending":true,"name":"E924","current_temperature":21,"hvac_alt_heat_x2_state":false,"can_cool":true}},"safety_summary":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-21456,"$timestamp":1445885694252}}}' + http_version: '1.1' + recorded_at: Tue, 27 Oct 2015 14:34:22 GMT +recorded_with: VCR 2.9.3 diff --git a/fixtures/vcr_cassettes/NestThermostat_Nest/gets_the_current_temperature.yml b/fixtures/vcr_cassettes/NestThermostat_Nest/gets_the_current_temperature.yml new file mode 100644 index 0000000..38c38a0 --- /dev/null +++ b/fixtures/vcr_cassettes/NestThermostat_Nest/gets_the_current_temperature.yml @@ -0,0 +1,105 @@ +--- +http_interactions: +- request: + method: get + uri: https://on6%DFn7d%AC%A0%B57%D4%F7j9ZD%5B%13g%12%AE%AA7~%FD+gwtO%12%A9%DA%CA%60&Ea%B7%DCp%05%18s%C2&%DD%F4%C2;%D9Bw%09%25I;%BC%D5x%D9:V%E99*rC%B92;4cV%5D%E7%E1%DC%C7%B2%B0%16O%94ZY%B6%20%94X%17%03%ED%1E%91%CC%09tNS(%C9%F2%20%E9%FEY%01%5C%3Cf%A4%E4@czfe09-front01-iad01.transport.home.nest.com/v2/mobile/user.2423243 + body: + encoding: US-ASCII + string: '' + headers: + host: + - czfe09-front01-iad01.transport.home.nest.com + user-agent: + - Nest/1.1.0.10 CFNetwork/548.0.4 + authorization: + - Basic b.2423243.ZKygtTfU92o5WkRbE2cSrqo3fv0rZ3d0TxKp2spgJkVht9xwBRhzwibd9MI72UJ3CSVJO7zVeNk6Vuk5KnJDuTI7NGNWXefh3MeysBZPlFpZtiCUWBcD7R6RzAl0TlMoyfIg6f5ZAVw8ZqTk + x-nl-user-id: + - '2423243' + x-nl-protocol-version: + - '1' + accept-language: + - en-us + connection: + - keep-alive + accept: + - "*/*" + response: + status: + code: 200 + message: OK + headers: + content-type: + - application/json + x-nl-defer-device-window: + - '120' + x-nl-service-timestamp: + - '1445956463537' + content-length: + - '10890' + connection: + - keep-alive + body: + encoding: UTF-8 + string: '{"user_alert_dialog":{"2423243":{"$version":-31019,"$timestamp":1445954076171,"dialog_data":"","dialog_id":"confirm-pairing"}},"buckets":{"2423243":{"$version":12532,"$timestamp":1445956458542,"buckets":["user.2423243","user_alert_dialog.2423243","message_center.2423243","user_settings.2423243","buckets.2423243","device.fake3243E4FEE924","demand_response.fake3243E4FEE924","device_alert_dialog.fake3243E4FEE924","link.fake3243E4FEE924","message.fake3243E4FEE924","metadata.fake3243E4FEE924","schedule.fake3243E4FEE924","shared.fake3243E4FEE924","track.fake3243E4FEE924","tuneups.fake3243E4FEE924","energy_latest.fake3243E4FEE924","energy_weekly.fake3243E4FEE924","diamond_sensor_event.fake3243E4FEE924","diamond_sensor_config.fake3243E4FEE924","structure.0b47dcf0-7c13-11e5-8199-22000b420f99","where.0b47dcf0-7c13-11e5-8199-22000b420f99","utility.0b47dcf0-7c13-11e5-8199-22000b420f99","structure_history.0b47dcf0-7c13-11e5-8199-22000b420f99","trip.0b47dcf0-7c13-11e5-8199-22000b420f99","structure_metadata.0b47dcf0-7c13-11e5-8199-22000b420f99","safety.0b47dcf0-7c13-11e5-8199-22000b420f99","safety_summary.0b47dcf0-7c13-11e5-8199-22000b420f99","geofence_info.0b47dcf0-7c13-11e5-8199-22000b420f99"]}},"track":{"fake3243E4FEE924":{"$version":31457,"$timestamp":1445954075890,"online":false}},"message_center":{"2423243":{"$version":-1,"$timestamp":1325379661000,"messages":[]}},"safety":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":3651,"$timestamp":1445885694252,"audio_self_test_participants":[]}},"utility":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-1,"$timestamp":1}},"where":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":25319,"$timestamp":1445885694015,"wheres":[{"where_id":"00000000-0000-0000-0000-000100000001","name":"Basement"},{"where_id":"00000000-0000-0000-0000-00010000000d","name":"Bedroom"},{"where_id":"00000000-0000-0000-0000-000100000003","name":"Den"},{"where_id":"00000000-0000-0000-0000-000100000010","name":"Dining + Room"},{"where_id":"00000000-0000-0000-0000-000100000006","name":"Downstairs"},{"where_id":"00000000-0000-0000-0000-000100000000","name":"Entryway"},{"where_id":"00000000-0000-0000-0000-00010000000b","name":"Family + Room"},{"where_id":"00000000-0000-0000-0000-000100000002","name":"Hallway"},{"where_id":"00000000-0000-0000-0000-000100000008","name":"Kids + Room"},{"where_id":"00000000-0000-0000-0000-00010000000a","name":"Kitchen"},{"where_id":"00000000-0000-0000-0000-00010000000c","name":"Living + Room"},{"where_id":"00000000-0000-0000-0000-000100000005","name":"Master Bedroom"},{"where_id":"00000000-0000-0000-0000-00010000000e","name":"Office"},{"where_id":"00000000-0000-0000-0000-00010000000f","name":"Upstairs"}]}},"structure":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":15857,"$timestamp":1445956462746,"away_timestamp":1445954700,"away":false,"location":"Palm + Harbor, FL","name":"Chrome App Structure","postal_code":"34683","topaz_away":false,"creation_time":1445885694067,"country_code":"US","away_setter":0,"topaz_hush_key":"FmyQftpkdU9eH9St4mMWhQ==","user":"user.2423243","devices":["device.fake3243E4FEE924"],"swarm":["device.fake3243E4FEE924"],"fabric_ids":[],"clutches":[],"members":[{"user":"user.2423243","roles":["owner"]}]}},"message":{"fake3243E4FEE924":{"$version":-24419,"$timestamp":1445954076171,"1":{"cmd":"register"}}},"tuneups":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1}},"device":{"fake3243E4FEE924":{"$version":-27199,"$timestamp":1445956401831,"heatpump_setback_active":false,"emer_heat_enable":false,"touched_by":{},"local_ip":"192.168.2.4","switch_system_off":false,"away_temperature_high":24.444,"cooling_source":"electric","temperature_lock_high_temp":22.222,"y2_type":"unknown","leaf_threshold_cool":0,"heater_source":"gas","fan_cooling_state":false,"note_codes":[],"compressor_lockout_leaf":-17.8,"has_x3_heat":false,"target_humidity_enabled":false,"heat_x3_source":"electric","alt_heat_delivery":"forced-air","has_x2_heat":false,"fan_mode":"auto","rssi":66,"sunlight_correction_active":false,"emer_heat_delivery":"forced-air","heatpump_savings":"off","pin_y2_description":"none","humidity_control_lockout_end_time":0,"filter_reminder_level":0,"gear_opacity":0,"filter_reminder_enabled":true,"capability_level":4,"schedule_learning_reset":false,"has_x2_cool":false,"hvac_pins":"W1,C,Rh,G","ob_orientation":"O","cooling_delivery":"unknown","range_enable":false,"auto_away_enable":true,"dual_fuel_breakpoint_override":"none","lower_safety_temp_enabled":true,"has_fan":true,"dehumidifier_state":false,"emer_heat_source":"electric","nlclient_state":"","heatpump_ready":false,"cooling_x2_delivery":"unknown","available_locales":"en_US,fr_CA,es_US,en_GB","current_version":"4.1","has_fossil_fuel":true,"learning_state":"slow","pin_ob_description":"none","pin_rh_description":"power","has_alt_heat":false,"safety_temp_activating_hvac":false,"fan_duty_cycle":900,"pin_y1_description":"none","humidifier_state":false,"gear_threshold_high":0,"backplate_serial_number":"02BA01AB241200CW","has_x2_alt_heat":false,"heat_x3_delivery":"forced-air","leaf_threshold_heat":18.334,"is_on_stand":false,"has_emer_heat":false,"learning_mode":true,"leaf_learning":"ready","has_aux_heat":false,"filter_changed_set_date":1386452016,"aux_heat_source":"electric","backplate_bsl_info":"BSL","alt_heat_x2_source":"gas","sunlight_correction_ready":true,"humidifier_type":"unknown","pin_c_description":"power","humidity_control_lockout_start_time":0,"pin_w2aux_description":"none","fan_timer_timeout":0,"country_code":"US","sunlight_correction_enabled":true,"heat_x2_delivery":"forced-air","target_humidity":35,"gear_threshold_low":0,"lower_safety_temp":4.738,"cooling_x2_source":"electric","equipment_type":"electric","heat_pump_aux_threshold":10,"alt_heat_x2_delivery":"forced-air","heat_pump_comp_threshold":-31.5,"learning_days_completed_cool":0,"backplate_bsl_version":"2.1","current_schedule_mode":"HEAT","fan_duty_end_time":68400,"hvac_wires":"Heat,Fan,Common + Wire,Rh","leaf":true,"type":"TBD","pin_g_description":"fan","click_sound":"on","away_temperature_low_enabled":true,"aux_heat_delivery":"forced-air","filter_changed_date":1387065600,"hvac_safety_shutoff_active":false,"heat_pump_comp_threshold_enabled":false,"has_dehumidifier":false,"preconditioning_ready":true,"fan_cooling_enabled":true,"leaf_away_high":28.88,"fan_cooling_readiness":"not + ready","device_locale":"en_US","temperature_scale":"F","battery_level":3.963,"error_code":"","maint_band_upper":0.39,"preconditioning_active":false,"fan_control_state":false,"away_temperature_high_enabled":false,"dehumidifier_fan_activation":false,"learning_days_completed_heat":598,"humidifier_fan_activation":false,"pin_star_description":"none","upper_safety_temp_enabled":false,"dual_fuel_selected":false,"preconditioning_enabled":false,"current_humidity":50,"dual_fuel_breakpoint":-1,"postal_code":"94602","backplate_mono_version":"4.0.20","alt_heat_source":"gas","aux_lockout_leaf":10,"has_heat_pump":false,"heater_delivery":"forced-air","away_temperature_low":12.778,"auto_away_reset":false,"radiant_control_enabled":false,"has_air_filter":true,"temperature_lock":false,"dehumidifier_type":"unknown","time_to_target_training":"training","upper_safety_temp":35,"humidity_control_lockout_enabled":false,"fan_timer_duration":900,"target_time_confidence":0,"pin_w1_description":"heat","temperature_lock_low_temp":20,"where_id":"00000000-0000-0000-0000-000100000001","forced_air":true,"temperature_lock_pin_hash":"","auto_dehum_enabled":false,"leaf_type":1,"backplate_mono_info":"TFE + (BP_D2) 4.0.20 (root@bamboo) 2014-02-03 10:06:33","has_dual_fuel":false,"star_type":"unknown","learning_time":1703,"maint_band_lower":0.39,"creation_time":1420654958512,"has_humidifier":false,"learning_days_completed_range":0,"dehumidifier_orientation_selected":"unknown","leaf_schedule_delta":1.11,"logging_priority":"informational","user_brightness":"medium","leaf_away_low":16.835,"pin_rc_description":"none","auto_dehum_state":false,"serial_number":"80C4887E69DF00D9","heat_x2_source":"electric","mac_address":"18b430093686","fan_duty_start_time":50400,"time_to_target":0,"backplate_model":"Backplate-2.2","heat_link_connection":0,"model_version":"Display-2.1","heat_pump_aux_threshold_enabled":true,"ob_persistence":true,"schedules":[]}},"trip":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":32201,"$timestamp":1445885694252,"trips":[]}},"demand_response":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1}},"user":{"2423243":{"$version":9049,"$timestamp":1445885721137,"email":"test@yahoo.com","name":"test@yahoo.com","structures":["structure.0b47dcf0-7c13-11e5-8199-22000b420f99"],"structure_memberships":[{"structure":"structure.0b47dcf0-7c13-11e5-8199-22000b420f99","roles":["owner"]}]}},"link":{"fake3243E4FEE924":{"$version":10338,"$timestamp":1445954076171,"structure":"structure.0b47dcf0-7c13-11e5-8199-22000b420f99"}},"device_alert_dialog":{"fake3243E4FEE924":{"$version":-9248,"$timestamp":1445954076171,"dialog_data":"","dialog_id":"confirm-pairing"}},"geofence_info":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-31412,"$timestamp":1445885694252,"device_events":[],"fences":[]}},"metadata":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1356998400000,"last_ip":"127.0.0.1","last_connection":1356998400000}},"user_settings":{"2423243":{"$version":31691,"$timestamp":1445354998080,"email_verified":true,"tos_accepted_version":1434564000000,"receive_marketing_emails":true,"receive_nest_emails":true,"receive_support_emails":true,"max_structures":2,"max_thermostats":40,"max_thermostats_per_structure":20,"max_smoke_detectors_per_structure":18,"max_smoke_detectors":36,"max_wwn_devices_per_structure":10,"max_wwn_devices":20,"tos_minimum_version":1434564000000,"tos_current_version":1434564000000,"lang":"en_US"}},"schedule":{"fake3243E4FEE924":{"$version":21638,"$timestamp":1445954075940}},"structure_metadata":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-32678,"$timestamp":1445951380776,"entitlements_api_path":"/api/0.1/structure/0b47dcf0-7c13-11e5-8199-22000b420f99/entitlements?v=8a957eeb-c93a-4e47-aea4-fb31cfc65691"}},"shared":{"fake3243E4FEE924":{"$version":-13990,"$timestamp":1445956397555,"auto_away_learning":"ready","auto_away":0,"hvac_alt_heat_state":false,"compressor_lockout_enabled":false,"hvac_heat_x3_state":false,"target_temperature_type":"heat","hvac_heater_state":false,"can_heat":true,"hvac_emer_heat_state":false,"compressor_lockout_timeout":0,"hvac_cool_x2_state":false,"target_temperature_high":23.33333,"hvac_aux_heater_state":false,"hvac_heat_x2_state":false,"target_temperature_low":23.33333,"hvac_ac_state":false,"target_temperature":22.85,"hvac_fan_state":false,"target_change_pending":true,"name":"E924","current_temperature":21,"hvac_alt_heat_x2_state":false,"can_cool":true}},"safety_summary":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-21456,"$timestamp":1445885694252}}}' + http_version: '1.1' + recorded_at: Tue, 27 Oct 2015 14:34:24 GMT +- request: + method: get + uri: https://on6%DFn7d%AC%A0%B57%D4%F7j9ZD%5B%13g%12%AE%AA7~%FD+gwtO%12%A9%DA%CA%60&Ea%B7%DCp%05%18s%C2&%DD%F4%C2;%D9Bw%09%25I;%BC%D5x%D9:V%E99*rC%B92;4cV%5D%E7%E1%DC%C7%B2%B0%16O%94ZY%B6%20%94X%17%03%ED%1E%91%CC%09tNS(%C9%F2%20%E9%FEY%01%5C%3Cf%A4%E4@czfe09-front01-iad01.transport.home.nest.com/v2/mobile/user.2423243 + body: + encoding: US-ASCII + string: '' + headers: + host: + - czfe09-front01-iad01.transport.home.nest.com + user-agent: + - Nest/1.1.0.10 CFNetwork/548.0.4 + authorization: + - Basic b.2423243.ZKygtTfU92o5WkRbE2cSrqo3fv0rZ3d0TxKp2spgJkVht9xwBRhzwibd9MI72UJ3CSVJO7zVeNk6Vuk5KnJDuTI7NGNWXefh3MeysBZPlFpZtiCUWBcD7R6RzAl0TlMoyfIg6f5ZAVw8ZqTk + x-nl-user-id: + - '2423243' + x-nl-protocol-version: + - '1' + accept-language: + - en-us + connection: + - keep-alive + accept: + - "*/*" + response: + status: + code: 200 + message: OK + headers: + content-type: + - application/json + x-nl-defer-device-window: + - '120' + x-nl-service-timestamp: + - '1445956463912' + content-length: + - '10890' + connection: + - keep-alive + body: + encoding: UTF-8 + string: '{"user_alert_dialog":{"2423243":{"$version":-31019,"$timestamp":1445954076171,"dialog_data":"","dialog_id":"confirm-pairing"}},"buckets":{"2423243":{"$version":12532,"$timestamp":1445956458542,"buckets":["user.2423243","user_alert_dialog.2423243","message_center.2423243","user_settings.2423243","buckets.2423243","device.fake3243E4FEE924","demand_response.fake3243E4FEE924","device_alert_dialog.fake3243E4FEE924","link.fake3243E4FEE924","message.fake3243E4FEE924","metadata.fake3243E4FEE924","schedule.fake3243E4FEE924","shared.fake3243E4FEE924","track.fake3243E4FEE924","tuneups.fake3243E4FEE924","energy_latest.fake3243E4FEE924","energy_weekly.fake3243E4FEE924","diamond_sensor_event.fake3243E4FEE924","diamond_sensor_config.fake3243E4FEE924","structure.0b47dcf0-7c13-11e5-8199-22000b420f99","where.0b47dcf0-7c13-11e5-8199-22000b420f99","utility.0b47dcf0-7c13-11e5-8199-22000b420f99","structure_history.0b47dcf0-7c13-11e5-8199-22000b420f99","trip.0b47dcf0-7c13-11e5-8199-22000b420f99","structure_metadata.0b47dcf0-7c13-11e5-8199-22000b420f99","safety.0b47dcf0-7c13-11e5-8199-22000b420f99","safety_summary.0b47dcf0-7c13-11e5-8199-22000b420f99","geofence_info.0b47dcf0-7c13-11e5-8199-22000b420f99"]}},"track":{"fake3243E4FEE924":{"$version":31457,"$timestamp":1445954075890,"online":false}},"message_center":{"2423243":{"$version":-1,"$timestamp":1325379661000,"messages":[]}},"safety":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":3651,"$timestamp":1445885694252,"audio_self_test_participants":[]}},"utility":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-1,"$timestamp":1}},"where":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":25319,"$timestamp":1445885694015,"wheres":[{"where_id":"00000000-0000-0000-0000-000100000001","name":"Basement"},{"where_id":"00000000-0000-0000-0000-00010000000d","name":"Bedroom"},{"where_id":"00000000-0000-0000-0000-000100000003","name":"Den"},{"where_id":"00000000-0000-0000-0000-000100000010","name":"Dining + Room"},{"where_id":"00000000-0000-0000-0000-000100000006","name":"Downstairs"},{"where_id":"00000000-0000-0000-0000-000100000000","name":"Entryway"},{"where_id":"00000000-0000-0000-0000-00010000000b","name":"Family + Room"},{"where_id":"00000000-0000-0000-0000-000100000002","name":"Hallway"},{"where_id":"00000000-0000-0000-0000-000100000008","name":"Kids + Room"},{"where_id":"00000000-0000-0000-0000-00010000000a","name":"Kitchen"},{"where_id":"00000000-0000-0000-0000-00010000000c","name":"Living + Room"},{"where_id":"00000000-0000-0000-0000-000100000005","name":"Master Bedroom"},{"where_id":"00000000-0000-0000-0000-00010000000e","name":"Office"},{"where_id":"00000000-0000-0000-0000-00010000000f","name":"Upstairs"}]}},"structure":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":15857,"$timestamp":1445956462746,"away_timestamp":1445954700,"away":false,"location":"Palm + Harbor, FL","name":"Chrome App Structure","postal_code":"34683","topaz_away":false,"creation_time":1445885694067,"country_code":"US","away_setter":0,"topaz_hush_key":"FmyQftpkdU9eH9St4mMWhQ==","user":"user.2423243","devices":["device.fake3243E4FEE924"],"swarm":["device.fake3243E4FEE924"],"fabric_ids":[],"clutches":[],"members":[{"user":"user.2423243","roles":["owner"]}]}},"message":{"fake3243E4FEE924":{"$version":-24419,"$timestamp":1445954076171,"1":{"cmd":"register"}}},"tuneups":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1}},"device":{"fake3243E4FEE924":{"$version":-27199,"$timestamp":1445956401831,"heatpump_setback_active":false,"emer_heat_enable":false,"touched_by":{},"local_ip":"192.168.2.4","switch_system_off":false,"away_temperature_high":24.444,"cooling_source":"electric","temperature_lock_high_temp":22.222,"y2_type":"unknown","leaf_threshold_cool":0,"heater_source":"gas","fan_cooling_state":false,"note_codes":[],"compressor_lockout_leaf":-17.8,"has_x3_heat":false,"target_humidity_enabled":false,"heat_x3_source":"electric","alt_heat_delivery":"forced-air","has_x2_heat":false,"fan_mode":"auto","rssi":66,"sunlight_correction_active":false,"emer_heat_delivery":"forced-air","heatpump_savings":"off","pin_y2_description":"none","humidity_control_lockout_end_time":0,"filter_reminder_level":0,"gear_opacity":0,"filter_reminder_enabled":true,"capability_level":4,"schedule_learning_reset":false,"has_x2_cool":false,"hvac_pins":"W1,C,Rh,G","ob_orientation":"O","cooling_delivery":"unknown","range_enable":false,"auto_away_enable":true,"dual_fuel_breakpoint_override":"none","lower_safety_temp_enabled":true,"has_fan":true,"dehumidifier_state":false,"emer_heat_source":"electric","nlclient_state":"","heatpump_ready":false,"cooling_x2_delivery":"unknown","available_locales":"en_US,fr_CA,es_US,en_GB","current_version":"4.1","has_fossil_fuel":true,"learning_state":"slow","pin_ob_description":"none","pin_rh_description":"power","has_alt_heat":false,"safety_temp_activating_hvac":false,"fan_duty_cycle":900,"pin_y1_description":"none","humidifier_state":false,"gear_threshold_high":0,"backplate_serial_number":"02BA01AB241200CW","has_x2_alt_heat":false,"heat_x3_delivery":"forced-air","leaf_threshold_heat":18.334,"is_on_stand":false,"has_emer_heat":false,"learning_mode":true,"leaf_learning":"ready","has_aux_heat":false,"filter_changed_set_date":1386452016,"aux_heat_source":"electric","backplate_bsl_info":"BSL","alt_heat_x2_source":"gas","sunlight_correction_ready":true,"humidifier_type":"unknown","pin_c_description":"power","humidity_control_lockout_start_time":0,"pin_w2aux_description":"none","fan_timer_timeout":0,"country_code":"US","sunlight_correction_enabled":true,"heat_x2_delivery":"forced-air","target_humidity":35,"gear_threshold_low":0,"lower_safety_temp":4.738,"cooling_x2_source":"electric","equipment_type":"electric","heat_pump_aux_threshold":10,"alt_heat_x2_delivery":"forced-air","heat_pump_comp_threshold":-31.5,"learning_days_completed_cool":0,"backplate_bsl_version":"2.1","current_schedule_mode":"HEAT","fan_duty_end_time":68400,"hvac_wires":"Heat,Fan,Common + Wire,Rh","leaf":true,"type":"TBD","pin_g_description":"fan","click_sound":"on","away_temperature_low_enabled":true,"aux_heat_delivery":"forced-air","filter_changed_date":1387065600,"hvac_safety_shutoff_active":false,"heat_pump_comp_threshold_enabled":false,"has_dehumidifier":false,"preconditioning_ready":true,"fan_cooling_enabled":true,"leaf_away_high":28.88,"fan_cooling_readiness":"not + ready","device_locale":"en_US","temperature_scale":"F","battery_level":3.963,"error_code":"","maint_band_upper":0.39,"preconditioning_active":false,"fan_control_state":false,"away_temperature_high_enabled":false,"dehumidifier_fan_activation":false,"learning_days_completed_heat":598,"humidifier_fan_activation":false,"pin_star_description":"none","upper_safety_temp_enabled":false,"dual_fuel_selected":false,"preconditioning_enabled":false,"current_humidity":50,"dual_fuel_breakpoint":-1,"postal_code":"94602","backplate_mono_version":"4.0.20","alt_heat_source":"gas","aux_lockout_leaf":10,"has_heat_pump":false,"heater_delivery":"forced-air","away_temperature_low":12.778,"auto_away_reset":false,"radiant_control_enabled":false,"has_air_filter":true,"temperature_lock":false,"dehumidifier_type":"unknown","time_to_target_training":"training","upper_safety_temp":35,"humidity_control_lockout_enabled":false,"fan_timer_duration":900,"target_time_confidence":0,"pin_w1_description":"heat","temperature_lock_low_temp":20,"where_id":"00000000-0000-0000-0000-000100000001","forced_air":true,"temperature_lock_pin_hash":"","auto_dehum_enabled":false,"leaf_type":1,"backplate_mono_info":"TFE + (BP_D2) 4.0.20 (root@bamboo) 2014-02-03 10:06:33","has_dual_fuel":false,"star_type":"unknown","learning_time":1703,"maint_band_lower":0.39,"creation_time":1420654958512,"has_humidifier":false,"learning_days_completed_range":0,"dehumidifier_orientation_selected":"unknown","leaf_schedule_delta":1.11,"logging_priority":"informational","user_brightness":"medium","leaf_away_low":16.835,"pin_rc_description":"none","auto_dehum_state":false,"serial_number":"80C4887E69DF00D9","heat_x2_source":"electric","mac_address":"18b430093686","fan_duty_start_time":50400,"time_to_target":0,"backplate_model":"Backplate-2.2","heat_link_connection":0,"model_version":"Display-2.1","heat_pump_aux_threshold_enabled":true,"ob_persistence":true,"schedules":[]}},"trip":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":32201,"$timestamp":1445885694252,"trips":[]}},"demand_response":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1}},"user":{"2423243":{"$version":9049,"$timestamp":1445885721137,"email":"test@yahoo.com","name":"test@yahoo.com","structures":["structure.0b47dcf0-7c13-11e5-8199-22000b420f99"],"structure_memberships":[{"structure":"structure.0b47dcf0-7c13-11e5-8199-22000b420f99","roles":["owner"]}]}},"link":{"fake3243E4FEE924":{"$version":10338,"$timestamp":1445954076171,"structure":"structure.0b47dcf0-7c13-11e5-8199-22000b420f99"}},"device_alert_dialog":{"fake3243E4FEE924":{"$version":-9248,"$timestamp":1445954076171,"dialog_data":"","dialog_id":"confirm-pairing"}},"geofence_info":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-31412,"$timestamp":1445885694252,"device_events":[],"fences":[]}},"metadata":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1356998400000,"last_ip":"127.0.0.1","last_connection":1356998400000}},"user_settings":{"2423243":{"$version":31691,"$timestamp":1445354998080,"email_verified":true,"tos_accepted_version":1434564000000,"receive_marketing_emails":true,"receive_nest_emails":true,"receive_support_emails":true,"max_structures":2,"max_thermostats":40,"max_thermostats_per_structure":20,"max_smoke_detectors_per_structure":18,"max_smoke_detectors":36,"max_wwn_devices_per_structure":10,"max_wwn_devices":20,"tos_minimum_version":1434564000000,"tos_current_version":1434564000000,"lang":"en_US"}},"schedule":{"fake3243E4FEE924":{"$version":21638,"$timestamp":1445954075940}},"structure_metadata":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-32678,"$timestamp":1445951380776,"entitlements_api_path":"/api/0.1/structure/0b47dcf0-7c13-11e5-8199-22000b420f99/entitlements?v=8a957eeb-c93a-4e47-aea4-fb31cfc65691"}},"shared":{"fake3243E4FEE924":{"$version":-13990,"$timestamp":1445956397555,"auto_away_learning":"ready","auto_away":0,"hvac_alt_heat_state":false,"compressor_lockout_enabled":false,"hvac_heat_x3_state":false,"target_temperature_type":"heat","hvac_heater_state":false,"can_heat":true,"hvac_emer_heat_state":false,"compressor_lockout_timeout":0,"hvac_cool_x2_state":false,"target_temperature_high":23.33333,"hvac_aux_heater_state":false,"hvac_heat_x2_state":false,"target_temperature_low":23.33333,"hvac_ac_state":false,"target_temperature":22.85,"hvac_fan_state":false,"target_change_pending":true,"name":"E924","current_temperature":21,"hvac_alt_heat_x2_state":false,"can_cool":true}},"safety_summary":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-21456,"$timestamp":1445885694252}}}' + http_version: '1.1' + recorded_at: Tue, 27 Oct 2015 14:34:24 GMT +recorded_with: VCR 2.9.3 diff --git a/fixtures/vcr_cassettes/NestThermostat_Nest/gets_the_fan_status.yml b/fixtures/vcr_cassettes/NestThermostat_Nest/gets_the_fan_status.yml new file mode 100644 index 0000000..03c1816 --- /dev/null +++ b/fixtures/vcr_cassettes/NestThermostat_Nest/gets_the_fan_status.yml @@ -0,0 +1,54 @@ +--- +http_interactions: +- request: + method: get + uri: https://on6%DFn7d%AC%A0%B57%D4%F7j9ZD%5B%13g%12%AE%AA7~%FD+gwtO%12%A9%DA%CA%60&Ea%B7%DCp%05%18s%C2&%DD%F4%C2;%D9Bw%09%25I;%BC%D5x%D9:V%E99*rC%B92;4cV%5D%E7%E1%DC%C7%B2%B0%16O%94ZY%B6%20%94X%17%03%ED%1E%91%CC%09tNS(%C9%F2%20%E9%FEY%01%5C%3Cf%A4%E4@czfe09-front01-iad01.transport.home.nest.com/v2/mobile/user.2423243 + body: + encoding: US-ASCII + string: '' + headers: + host: + - czfe09-front01-iad01.transport.home.nest.com + user-agent: + - Nest/1.1.0.10 CFNetwork/548.0.4 + authorization: + - Basic b.2423243.ZKygtTfU92o5WkRbE2cSrqo3fv0rZ3d0TxKp2spgJkVht9xwBRhzwibd9MI72UJ3CSVJO7zVeNk6Vuk5KnJDuTI7NGNWXefh3MeysBZPlFpZtiCUWBcD7R6RzAl0TlMoyfIg6f5ZAVw8ZqTk + x-nl-user-id: + - '2423243' + x-nl-protocol-version: + - '1' + accept-language: + - en-us + connection: + - keep-alive + accept: + - "*/*" + response: + status: + code: 200 + message: OK + headers: + content-type: + - application/json + x-nl-defer-device-window: + - '120' + x-nl-service-timestamp: + - '1445956473443' + content-length: + - '10890' + connection: + - keep-alive + body: + encoding: UTF-8 + string: '{"user_alert_dialog":{"2423243":{"$version":-31019,"$timestamp":1445954076171,"dialog_data":"","dialog_id":"confirm-pairing"}},"buckets":{"2423243":{"$version":12532,"$timestamp":1445956458542,"buckets":["user.2423243","user_alert_dialog.2423243","message_center.2423243","user_settings.2423243","buckets.2423243","device.fake3243E4FEE924","demand_response.fake3243E4FEE924","device_alert_dialog.fake3243E4FEE924","link.fake3243E4FEE924","message.fake3243E4FEE924","metadata.fake3243E4FEE924","schedule.fake3243E4FEE924","shared.fake3243E4FEE924","track.fake3243E4FEE924","tuneups.fake3243E4FEE924","energy_latest.fake3243E4FEE924","energy_weekly.fake3243E4FEE924","diamond_sensor_event.fake3243E4FEE924","diamond_sensor_config.fake3243E4FEE924","structure.0b47dcf0-7c13-11e5-8199-22000b420f99","where.0b47dcf0-7c13-11e5-8199-22000b420f99","utility.0b47dcf0-7c13-11e5-8199-22000b420f99","structure_history.0b47dcf0-7c13-11e5-8199-22000b420f99","trip.0b47dcf0-7c13-11e5-8199-22000b420f99","structure_metadata.0b47dcf0-7c13-11e5-8199-22000b420f99","safety.0b47dcf0-7c13-11e5-8199-22000b420f99","safety_summary.0b47dcf0-7c13-11e5-8199-22000b420f99","geofence_info.0b47dcf0-7c13-11e5-8199-22000b420f99"]}},"track":{"fake3243E4FEE924":{"$version":31457,"$timestamp":1445954075890,"online":false}},"message_center":{"2423243":{"$version":-1,"$timestamp":1325379661000,"messages":[]}},"safety":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":3651,"$timestamp":1445885694252,"audio_self_test_participants":[]}},"utility":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-1,"$timestamp":1}},"where":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":25319,"$timestamp":1445885694015,"wheres":[{"where_id":"00000000-0000-0000-0000-000100000001","name":"Basement"},{"where_id":"00000000-0000-0000-0000-00010000000d","name":"Bedroom"},{"where_id":"00000000-0000-0000-0000-000100000003","name":"Den"},{"where_id":"00000000-0000-0000-0000-000100000010","name":"Dining + Room"},{"where_id":"00000000-0000-0000-0000-000100000006","name":"Downstairs"},{"where_id":"00000000-0000-0000-0000-000100000000","name":"Entryway"},{"where_id":"00000000-0000-0000-0000-00010000000b","name":"Family + Room"},{"where_id":"00000000-0000-0000-0000-000100000002","name":"Hallway"},{"where_id":"00000000-0000-0000-0000-000100000008","name":"Kids + Room"},{"where_id":"00000000-0000-0000-0000-00010000000a","name":"Kitchen"},{"where_id":"00000000-0000-0000-0000-00010000000c","name":"Living + Room"},{"where_id":"00000000-0000-0000-0000-000100000005","name":"Master Bedroom"},{"where_id":"00000000-0000-0000-0000-00010000000e","name":"Office"},{"where_id":"00000000-0000-0000-0000-00010000000f","name":"Upstairs"}]}},"structure":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":15857,"$timestamp":1445956462746,"away_timestamp":1445954700,"away":false,"location":"Palm + Harbor, FL","name":"Chrome App Structure","postal_code":"34683","topaz_away":false,"creation_time":1445885694067,"country_code":"US","away_setter":0,"topaz_hush_key":"FmyQftpkdU9eH9St4mMWhQ==","user":"user.2423243","devices":["device.fake3243E4FEE924"],"swarm":["device.fake3243E4FEE924"],"fabric_ids":[],"clutches":[],"members":[{"user":"user.2423243","roles":["owner"]}]}},"message":{"fake3243E4FEE924":{"$version":-24419,"$timestamp":1445954076171,"1":{"cmd":"register"}}},"tuneups":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1}},"device":{"fake3243E4FEE924":{"$version":-27199,"$timestamp":1445956401831,"heatpump_setback_active":false,"emer_heat_enable":false,"touched_by":{},"local_ip":"192.168.2.4","switch_system_off":false,"away_temperature_high":24.444,"cooling_source":"electric","temperature_lock_high_temp":22.222,"y2_type":"unknown","leaf_threshold_cool":0,"heater_source":"gas","fan_cooling_state":false,"note_codes":[],"compressor_lockout_leaf":-17.8,"has_x3_heat":false,"target_humidity_enabled":false,"heat_x3_source":"electric","alt_heat_delivery":"forced-air","has_x2_heat":false,"fan_mode":"auto","rssi":66,"sunlight_correction_active":false,"emer_heat_delivery":"forced-air","heatpump_savings":"off","pin_y2_description":"none","humidity_control_lockout_end_time":0,"filter_reminder_level":0,"gear_opacity":0,"filter_reminder_enabled":true,"capability_level":4,"schedule_learning_reset":false,"has_x2_cool":false,"hvac_pins":"W1,C,Rh,G","ob_orientation":"O","cooling_delivery":"unknown","range_enable":false,"auto_away_enable":true,"dual_fuel_breakpoint_override":"none","lower_safety_temp_enabled":true,"has_fan":true,"dehumidifier_state":false,"emer_heat_source":"electric","nlclient_state":"","heatpump_ready":false,"cooling_x2_delivery":"unknown","available_locales":"en_US,fr_CA,es_US,en_GB","current_version":"4.1","has_fossil_fuel":true,"learning_state":"slow","pin_ob_description":"none","pin_rh_description":"power","has_alt_heat":false,"safety_temp_activating_hvac":false,"fan_duty_cycle":900,"pin_y1_description":"none","humidifier_state":false,"gear_threshold_high":0,"backplate_serial_number":"02BA01AB241200CW","has_x2_alt_heat":false,"heat_x3_delivery":"forced-air","leaf_threshold_heat":18.334,"is_on_stand":false,"has_emer_heat":false,"learning_mode":true,"leaf_learning":"ready","has_aux_heat":false,"filter_changed_set_date":1386452016,"aux_heat_source":"electric","backplate_bsl_info":"BSL","alt_heat_x2_source":"gas","sunlight_correction_ready":true,"humidifier_type":"unknown","pin_c_description":"power","humidity_control_lockout_start_time":0,"pin_w2aux_description":"none","fan_timer_timeout":0,"country_code":"US","sunlight_correction_enabled":true,"heat_x2_delivery":"forced-air","target_humidity":35,"gear_threshold_low":0,"lower_safety_temp":4.738,"cooling_x2_source":"electric","equipment_type":"electric","heat_pump_aux_threshold":10,"alt_heat_x2_delivery":"forced-air","heat_pump_comp_threshold":-31.5,"learning_days_completed_cool":0,"backplate_bsl_version":"2.1","current_schedule_mode":"HEAT","fan_duty_end_time":68400,"hvac_wires":"Heat,Fan,Common + Wire,Rh","leaf":true,"type":"TBD","pin_g_description":"fan","click_sound":"on","away_temperature_low_enabled":true,"aux_heat_delivery":"forced-air","filter_changed_date":1387065600,"hvac_safety_shutoff_active":false,"heat_pump_comp_threshold_enabled":false,"has_dehumidifier":false,"preconditioning_ready":true,"fan_cooling_enabled":true,"leaf_away_high":28.88,"fan_cooling_readiness":"not + ready","device_locale":"en_US","temperature_scale":"F","battery_level":3.963,"error_code":"","maint_band_upper":0.39,"preconditioning_active":false,"fan_control_state":false,"away_temperature_high_enabled":false,"dehumidifier_fan_activation":false,"learning_days_completed_heat":598,"humidifier_fan_activation":false,"pin_star_description":"none","upper_safety_temp_enabled":false,"dual_fuel_selected":false,"preconditioning_enabled":false,"current_humidity":50,"dual_fuel_breakpoint":-1,"postal_code":"94602","backplate_mono_version":"4.0.20","alt_heat_source":"gas","aux_lockout_leaf":10,"has_heat_pump":false,"heater_delivery":"forced-air","away_temperature_low":12.778,"auto_away_reset":false,"radiant_control_enabled":false,"has_air_filter":true,"temperature_lock":false,"dehumidifier_type":"unknown","time_to_target_training":"training","upper_safety_temp":35,"humidity_control_lockout_enabled":false,"fan_timer_duration":900,"target_time_confidence":0,"pin_w1_description":"heat","temperature_lock_low_temp":20,"where_id":"00000000-0000-0000-0000-000100000001","forced_air":true,"temperature_lock_pin_hash":"","auto_dehum_enabled":false,"leaf_type":1,"backplate_mono_info":"TFE + (BP_D2) 4.0.20 (root@bamboo) 2014-02-03 10:06:33","has_dual_fuel":false,"star_type":"unknown","learning_time":1703,"maint_band_lower":0.39,"creation_time":1420654958512,"has_humidifier":false,"learning_days_completed_range":0,"dehumidifier_orientation_selected":"unknown","leaf_schedule_delta":1.11,"logging_priority":"informational","user_brightness":"medium","leaf_away_low":16.835,"pin_rc_description":"none","auto_dehum_state":false,"serial_number":"80C4887E69DF00D9","heat_x2_source":"electric","mac_address":"18b430093686","fan_duty_start_time":50400,"time_to_target":0,"backplate_model":"Backplate-2.2","heat_link_connection":0,"model_version":"Display-2.1","heat_pump_aux_threshold_enabled":true,"ob_persistence":true,"schedules":[]}},"trip":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":32201,"$timestamp":1445885694252,"trips":[]}},"demand_response":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1}},"user":{"2423243":{"$version":9049,"$timestamp":1445885721137,"email":"test@yahoo.com","name":"test@yahoo.com","structures":["structure.0b47dcf0-7c13-11e5-8199-22000b420f99"],"structure_memberships":[{"structure":"structure.0b47dcf0-7c13-11e5-8199-22000b420f99","roles":["owner"]}]}},"link":{"fake3243E4FEE924":{"$version":10338,"$timestamp":1445954076171,"structure":"structure.0b47dcf0-7c13-11e5-8199-22000b420f99"}},"device_alert_dialog":{"fake3243E4FEE924":{"$version":-9248,"$timestamp":1445954076171,"dialog_data":"","dialog_id":"confirm-pairing"}},"geofence_info":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-31412,"$timestamp":1445885694252,"device_events":[],"fences":[]}},"metadata":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1356998400000,"last_ip":"127.0.0.1","last_connection":1356998400000}},"user_settings":{"2423243":{"$version":31691,"$timestamp":1445354998080,"email_verified":true,"tos_accepted_version":1434564000000,"receive_marketing_emails":true,"receive_nest_emails":true,"receive_support_emails":true,"max_structures":2,"max_thermostats":40,"max_thermostats_per_structure":20,"max_smoke_detectors_per_structure":18,"max_smoke_detectors":36,"max_wwn_devices_per_structure":10,"max_wwn_devices":20,"tos_minimum_version":1434564000000,"tos_current_version":1434564000000,"lang":"en_US"}},"schedule":{"fake3243E4FEE924":{"$version":21638,"$timestamp":1445954075940}},"structure_metadata":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-32678,"$timestamp":1445951380776,"entitlements_api_path":"/api/0.1/structure/0b47dcf0-7c13-11e5-8199-22000b420f99/entitlements?v=8a957eeb-c93a-4e47-aea4-fb31cfc65691"}},"shared":{"fake3243E4FEE924":{"$version":-22003,"$timestamp":1445956471869,"auto_away_learning":"ready","auto_away":0,"hvac_alt_heat_state":false,"compressor_lockout_enabled":false,"hvac_heat_x3_state":false,"target_temperature_type":"heat","hvac_heater_state":false,"can_heat":true,"hvac_emer_heat_state":false,"compressor_lockout_timeout":0,"hvac_cool_x2_state":false,"target_temperature_high":23.33333,"hvac_aux_heater_state":false,"hvac_heat_x2_state":false,"target_temperature_low":23.33333,"hvac_ac_state":false,"target_temperature":22.85,"hvac_fan_state":false,"target_change_pending":true,"name":"E924","current_temperature":21,"hvac_alt_heat_x2_state":false,"can_cool":true}},"safety_summary":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-21456,"$timestamp":1445885694252}}}' + http_version: '1.1' + recorded_at: Tue, 27 Oct 2015 14:34:33 GMT +recorded_with: VCR 2.9.3 diff --git a/fixtures/vcr_cassettes/NestThermostat_Nest/gets_the_high_temperature.yml b/fixtures/vcr_cassettes/NestThermostat_Nest/gets_the_high_temperature.yml new file mode 100644 index 0000000..402373e --- /dev/null +++ b/fixtures/vcr_cassettes/NestThermostat_Nest/gets_the_high_temperature.yml @@ -0,0 +1,105 @@ +--- +http_interactions: +- request: + method: get + uri: https://on6%DFn7d%AC%A0%B57%D4%F7j9ZD%5B%13g%12%AE%AA7~%FD+gwtO%12%A9%DA%CA%60&Ea%B7%DCp%05%18s%C2&%DD%F4%C2;%D9Bw%09%25I;%BC%D5x%D9:V%E99*rC%B92;4cV%5D%E7%E1%DC%C7%B2%B0%16O%94ZY%B6%20%94X%17%03%ED%1E%91%CC%09tNS(%C9%F2%20%E9%FEY%01%5C%3Cf%A4%E4@czfe09-front01-iad01.transport.home.nest.com/v2/mobile/user.2423243 + body: + encoding: US-ASCII + string: '' + headers: + host: + - czfe09-front01-iad01.transport.home.nest.com + user-agent: + - Nest/1.1.0.10 CFNetwork/548.0.4 + authorization: + - Basic b.2423243.ZKygtTfU92o5WkRbE2cSrqo3fv0rZ3d0TxKp2spgJkVht9xwBRhzwibd9MI72UJ3CSVJO7zVeNk6Vuk5KnJDuTI7NGNWXefh3MeysBZPlFpZtiCUWBcD7R6RzAl0TlMoyfIg6f5ZAVw8ZqTk + x-nl-user-id: + - '2423243' + x-nl-protocol-version: + - '1' + accept-language: + - en-us + connection: + - keep-alive + accept: + - "*/*" + response: + status: + code: 200 + message: OK + headers: + content-type: + - application/json + x-nl-defer-device-window: + - '120' + x-nl-service-timestamp: + - '1445956466226' + content-length: + - '10890' + connection: + - keep-alive + body: + encoding: UTF-8 + string: '{"user_alert_dialog":{"2423243":{"$version":-31019,"$timestamp":1445954076171,"dialog_data":"","dialog_id":"confirm-pairing"}},"buckets":{"2423243":{"$version":12532,"$timestamp":1445956458542,"buckets":["user.2423243","user_alert_dialog.2423243","message_center.2423243","user_settings.2423243","buckets.2423243","device.fake3243E4FEE924","demand_response.fake3243E4FEE924","device_alert_dialog.fake3243E4FEE924","link.fake3243E4FEE924","message.fake3243E4FEE924","metadata.fake3243E4FEE924","schedule.fake3243E4FEE924","shared.fake3243E4FEE924","track.fake3243E4FEE924","tuneups.fake3243E4FEE924","energy_latest.fake3243E4FEE924","energy_weekly.fake3243E4FEE924","diamond_sensor_event.fake3243E4FEE924","diamond_sensor_config.fake3243E4FEE924","structure.0b47dcf0-7c13-11e5-8199-22000b420f99","where.0b47dcf0-7c13-11e5-8199-22000b420f99","utility.0b47dcf0-7c13-11e5-8199-22000b420f99","structure_history.0b47dcf0-7c13-11e5-8199-22000b420f99","trip.0b47dcf0-7c13-11e5-8199-22000b420f99","structure_metadata.0b47dcf0-7c13-11e5-8199-22000b420f99","safety.0b47dcf0-7c13-11e5-8199-22000b420f99","safety_summary.0b47dcf0-7c13-11e5-8199-22000b420f99","geofence_info.0b47dcf0-7c13-11e5-8199-22000b420f99"]}},"track":{"fake3243E4FEE924":{"$version":31457,"$timestamp":1445954075890,"online":false}},"message_center":{"2423243":{"$version":-1,"$timestamp":1325379661000,"messages":[]}},"safety":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":3651,"$timestamp":1445885694252,"audio_self_test_participants":[]}},"utility":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-1,"$timestamp":1}},"where":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":25319,"$timestamp":1445885694015,"wheres":[{"where_id":"00000000-0000-0000-0000-000100000001","name":"Basement"},{"where_id":"00000000-0000-0000-0000-00010000000d","name":"Bedroom"},{"where_id":"00000000-0000-0000-0000-000100000003","name":"Den"},{"where_id":"00000000-0000-0000-0000-000100000010","name":"Dining + Room"},{"where_id":"00000000-0000-0000-0000-000100000006","name":"Downstairs"},{"where_id":"00000000-0000-0000-0000-000100000000","name":"Entryway"},{"where_id":"00000000-0000-0000-0000-00010000000b","name":"Family + Room"},{"where_id":"00000000-0000-0000-0000-000100000002","name":"Hallway"},{"where_id":"00000000-0000-0000-0000-000100000008","name":"Kids + Room"},{"where_id":"00000000-0000-0000-0000-00010000000a","name":"Kitchen"},{"where_id":"00000000-0000-0000-0000-00010000000c","name":"Living + Room"},{"where_id":"00000000-0000-0000-0000-000100000005","name":"Master Bedroom"},{"where_id":"00000000-0000-0000-0000-00010000000e","name":"Office"},{"where_id":"00000000-0000-0000-0000-00010000000f","name":"Upstairs"}]}},"structure":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":15857,"$timestamp":1445956462746,"away_timestamp":1445954700,"away":false,"location":"Palm + Harbor, FL","name":"Chrome App Structure","postal_code":"34683","topaz_away":false,"creation_time":1445885694067,"country_code":"US","away_setter":0,"topaz_hush_key":"FmyQftpkdU9eH9St4mMWhQ==","user":"user.2423243","devices":["device.fake3243E4FEE924"],"swarm":["device.fake3243E4FEE924"],"fabric_ids":[],"clutches":[],"members":[{"user":"user.2423243","roles":["owner"]}]}},"message":{"fake3243E4FEE924":{"$version":-24419,"$timestamp":1445954076171,"1":{"cmd":"register"}}},"tuneups":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1}},"device":{"fake3243E4FEE924":{"$version":-27199,"$timestamp":1445956401831,"heatpump_setback_active":false,"emer_heat_enable":false,"touched_by":{},"local_ip":"192.168.2.4","switch_system_off":false,"away_temperature_high":24.444,"cooling_source":"electric","temperature_lock_high_temp":22.222,"y2_type":"unknown","leaf_threshold_cool":0,"heater_source":"gas","fan_cooling_state":false,"note_codes":[],"compressor_lockout_leaf":-17.8,"has_x3_heat":false,"target_humidity_enabled":false,"heat_x3_source":"electric","alt_heat_delivery":"forced-air","has_x2_heat":false,"fan_mode":"auto","rssi":66,"sunlight_correction_active":false,"emer_heat_delivery":"forced-air","heatpump_savings":"off","pin_y2_description":"none","humidity_control_lockout_end_time":0,"filter_reminder_level":0,"gear_opacity":0,"filter_reminder_enabled":true,"capability_level":4,"schedule_learning_reset":false,"has_x2_cool":false,"hvac_pins":"W1,C,Rh,G","ob_orientation":"O","cooling_delivery":"unknown","range_enable":false,"auto_away_enable":true,"dual_fuel_breakpoint_override":"none","lower_safety_temp_enabled":true,"has_fan":true,"dehumidifier_state":false,"emer_heat_source":"electric","nlclient_state":"","heatpump_ready":false,"cooling_x2_delivery":"unknown","available_locales":"en_US,fr_CA,es_US,en_GB","current_version":"4.1","has_fossil_fuel":true,"learning_state":"slow","pin_ob_description":"none","pin_rh_description":"power","has_alt_heat":false,"safety_temp_activating_hvac":false,"fan_duty_cycle":900,"pin_y1_description":"none","humidifier_state":false,"gear_threshold_high":0,"backplate_serial_number":"02BA01AB241200CW","has_x2_alt_heat":false,"heat_x3_delivery":"forced-air","leaf_threshold_heat":18.334,"is_on_stand":false,"has_emer_heat":false,"learning_mode":true,"leaf_learning":"ready","has_aux_heat":false,"filter_changed_set_date":1386452016,"aux_heat_source":"electric","backplate_bsl_info":"BSL","alt_heat_x2_source":"gas","sunlight_correction_ready":true,"humidifier_type":"unknown","pin_c_description":"power","humidity_control_lockout_start_time":0,"pin_w2aux_description":"none","fan_timer_timeout":0,"country_code":"US","sunlight_correction_enabled":true,"heat_x2_delivery":"forced-air","target_humidity":35,"gear_threshold_low":0,"lower_safety_temp":4.738,"cooling_x2_source":"electric","equipment_type":"electric","heat_pump_aux_threshold":10,"alt_heat_x2_delivery":"forced-air","heat_pump_comp_threshold":-31.5,"learning_days_completed_cool":0,"backplate_bsl_version":"2.1","current_schedule_mode":"HEAT","fan_duty_end_time":68400,"hvac_wires":"Heat,Fan,Common + Wire,Rh","leaf":true,"type":"TBD","pin_g_description":"fan","click_sound":"on","away_temperature_low_enabled":true,"aux_heat_delivery":"forced-air","filter_changed_date":1387065600,"hvac_safety_shutoff_active":false,"heat_pump_comp_threshold_enabled":false,"has_dehumidifier":false,"preconditioning_ready":true,"fan_cooling_enabled":true,"leaf_away_high":28.88,"fan_cooling_readiness":"not + ready","device_locale":"en_US","temperature_scale":"F","battery_level":3.963,"error_code":"","maint_band_upper":0.39,"preconditioning_active":false,"fan_control_state":false,"away_temperature_high_enabled":false,"dehumidifier_fan_activation":false,"learning_days_completed_heat":598,"humidifier_fan_activation":false,"pin_star_description":"none","upper_safety_temp_enabled":false,"dual_fuel_selected":false,"preconditioning_enabled":false,"current_humidity":50,"dual_fuel_breakpoint":-1,"postal_code":"94602","backplate_mono_version":"4.0.20","alt_heat_source":"gas","aux_lockout_leaf":10,"has_heat_pump":false,"heater_delivery":"forced-air","away_temperature_low":12.778,"auto_away_reset":false,"radiant_control_enabled":false,"has_air_filter":true,"temperature_lock":false,"dehumidifier_type":"unknown","time_to_target_training":"training","upper_safety_temp":35,"humidity_control_lockout_enabled":false,"fan_timer_duration":900,"target_time_confidence":0,"pin_w1_description":"heat","temperature_lock_low_temp":20,"where_id":"00000000-0000-0000-0000-000100000001","forced_air":true,"temperature_lock_pin_hash":"","auto_dehum_enabled":false,"leaf_type":1,"backplate_mono_info":"TFE + (BP_D2) 4.0.20 (root@bamboo) 2014-02-03 10:06:33","has_dual_fuel":false,"star_type":"unknown","learning_time":1703,"maint_band_lower":0.39,"creation_time":1420654958512,"has_humidifier":false,"learning_days_completed_range":0,"dehumidifier_orientation_selected":"unknown","leaf_schedule_delta":1.11,"logging_priority":"informational","user_brightness":"medium","leaf_away_low":16.835,"pin_rc_description":"none","auto_dehum_state":false,"serial_number":"80C4887E69DF00D9","heat_x2_source":"electric","mac_address":"18b430093686","fan_duty_start_time":50400,"time_to_target":0,"backplate_model":"Backplate-2.2","heat_link_connection":0,"model_version":"Display-2.1","heat_pump_aux_threshold_enabled":true,"ob_persistence":true,"schedules":[]}},"trip":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":32201,"$timestamp":1445885694252,"trips":[]}},"demand_response":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1}},"user":{"2423243":{"$version":9049,"$timestamp":1445885721137,"email":"test@yahoo.com","name":"test@yahoo.com","structures":["structure.0b47dcf0-7c13-11e5-8199-22000b420f99"],"structure_memberships":[{"structure":"structure.0b47dcf0-7c13-11e5-8199-22000b420f99","roles":["owner"]}]}},"link":{"fake3243E4FEE924":{"$version":10338,"$timestamp":1445954076171,"structure":"structure.0b47dcf0-7c13-11e5-8199-22000b420f99"}},"device_alert_dialog":{"fake3243E4FEE924":{"$version":-9248,"$timestamp":1445954076171,"dialog_data":"","dialog_id":"confirm-pairing"}},"geofence_info":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-31412,"$timestamp":1445885694252,"device_events":[],"fences":[]}},"metadata":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1356998400000,"last_ip":"127.0.0.1","last_connection":1356998400000}},"user_settings":{"2423243":{"$version":31691,"$timestamp":1445354998080,"email_verified":true,"tos_accepted_version":1434564000000,"receive_marketing_emails":true,"receive_nest_emails":true,"receive_support_emails":true,"max_structures":2,"max_thermostats":40,"max_thermostats_per_structure":20,"max_smoke_detectors_per_structure":18,"max_smoke_detectors":36,"max_wwn_devices_per_structure":10,"max_wwn_devices":20,"tos_minimum_version":1434564000000,"tos_current_version":1434564000000,"lang":"en_US"}},"schedule":{"fake3243E4FEE924":{"$version":21638,"$timestamp":1445954075940}},"structure_metadata":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-32678,"$timestamp":1445951380776,"entitlements_api_path":"/api/0.1/structure/0b47dcf0-7c13-11e5-8199-22000b420f99/entitlements?v=8a957eeb-c93a-4e47-aea4-fb31cfc65691"}},"shared":{"fake3243E4FEE924":{"$version":-13990,"$timestamp":1445956397555,"auto_away_learning":"ready","auto_away":0,"hvac_alt_heat_state":false,"compressor_lockout_enabled":false,"hvac_heat_x3_state":false,"target_temperature_type":"heat","hvac_heater_state":false,"can_heat":true,"hvac_emer_heat_state":false,"compressor_lockout_timeout":0,"hvac_cool_x2_state":false,"target_temperature_high":23.33333,"hvac_aux_heater_state":false,"hvac_heat_x2_state":false,"target_temperature_low":23.33333,"hvac_ac_state":false,"target_temperature":22.85,"hvac_fan_state":false,"target_change_pending":true,"name":"E924","current_temperature":21,"hvac_alt_heat_x2_state":false,"can_cool":true}},"safety_summary":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-21456,"$timestamp":1445885694252}}}' + http_version: '1.1' + recorded_at: Tue, 27 Oct 2015 14:34:26 GMT +- request: + method: get + uri: https://on6%DFn7d%AC%A0%B57%D4%F7j9ZD%5B%13g%12%AE%AA7~%FD+gwtO%12%A9%DA%CA%60&Ea%B7%DCp%05%18s%C2&%DD%F4%C2;%D9Bw%09%25I;%BC%D5x%D9:V%E99*rC%B92;4cV%5D%E7%E1%DC%C7%B2%B0%16O%94ZY%B6%20%94X%17%03%ED%1E%91%CC%09tNS(%C9%F2%20%E9%FEY%01%5C%3Cf%A4%E4@czfe09-front01-iad01.transport.home.nest.com/v2/mobile/user.2423243 + body: + encoding: US-ASCII + string: '' + headers: + host: + - czfe09-front01-iad01.transport.home.nest.com + user-agent: + - Nest/1.1.0.10 CFNetwork/548.0.4 + authorization: + - Basic b.2423243.ZKygtTfU92o5WkRbE2cSrqo3fv0rZ3d0TxKp2spgJkVht9xwBRhzwibd9MI72UJ3CSVJO7zVeNk6Vuk5KnJDuTI7NGNWXefh3MeysBZPlFpZtiCUWBcD7R6RzAl0TlMoyfIg6f5ZAVw8ZqTk + x-nl-user-id: + - '2423243' + x-nl-protocol-version: + - '1' + accept-language: + - en-us + connection: + - keep-alive + accept: + - "*/*" + response: + status: + code: 200 + message: OK + headers: + content-type: + - application/json + x-nl-defer-device-window: + - '120' + x-nl-service-timestamp: + - '1445956466583' + content-length: + - '10890' + connection: + - keep-alive + body: + encoding: UTF-8 + string: '{"user_alert_dialog":{"2423243":{"$version":-31019,"$timestamp":1445954076171,"dialog_data":"","dialog_id":"confirm-pairing"}},"buckets":{"2423243":{"$version":12532,"$timestamp":1445956458542,"buckets":["user.2423243","user_alert_dialog.2423243","message_center.2423243","user_settings.2423243","buckets.2423243","device.fake3243E4FEE924","demand_response.fake3243E4FEE924","device_alert_dialog.fake3243E4FEE924","link.fake3243E4FEE924","message.fake3243E4FEE924","metadata.fake3243E4FEE924","schedule.fake3243E4FEE924","shared.fake3243E4FEE924","track.fake3243E4FEE924","tuneups.fake3243E4FEE924","energy_latest.fake3243E4FEE924","energy_weekly.fake3243E4FEE924","diamond_sensor_event.fake3243E4FEE924","diamond_sensor_config.fake3243E4FEE924","structure.0b47dcf0-7c13-11e5-8199-22000b420f99","where.0b47dcf0-7c13-11e5-8199-22000b420f99","utility.0b47dcf0-7c13-11e5-8199-22000b420f99","structure_history.0b47dcf0-7c13-11e5-8199-22000b420f99","trip.0b47dcf0-7c13-11e5-8199-22000b420f99","structure_metadata.0b47dcf0-7c13-11e5-8199-22000b420f99","safety.0b47dcf0-7c13-11e5-8199-22000b420f99","safety_summary.0b47dcf0-7c13-11e5-8199-22000b420f99","geofence_info.0b47dcf0-7c13-11e5-8199-22000b420f99"]}},"track":{"fake3243E4FEE924":{"$version":31457,"$timestamp":1445954075890,"online":false}},"message_center":{"2423243":{"$version":-1,"$timestamp":1325379661000,"messages":[]}},"safety":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":3651,"$timestamp":1445885694252,"audio_self_test_participants":[]}},"utility":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-1,"$timestamp":1}},"where":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":25319,"$timestamp":1445885694015,"wheres":[{"where_id":"00000000-0000-0000-0000-000100000001","name":"Basement"},{"where_id":"00000000-0000-0000-0000-00010000000d","name":"Bedroom"},{"where_id":"00000000-0000-0000-0000-000100000003","name":"Den"},{"where_id":"00000000-0000-0000-0000-000100000010","name":"Dining + Room"},{"where_id":"00000000-0000-0000-0000-000100000006","name":"Downstairs"},{"where_id":"00000000-0000-0000-0000-000100000000","name":"Entryway"},{"where_id":"00000000-0000-0000-0000-00010000000b","name":"Family + Room"},{"where_id":"00000000-0000-0000-0000-000100000002","name":"Hallway"},{"where_id":"00000000-0000-0000-0000-000100000008","name":"Kids + Room"},{"where_id":"00000000-0000-0000-0000-00010000000a","name":"Kitchen"},{"where_id":"00000000-0000-0000-0000-00010000000c","name":"Living + Room"},{"where_id":"00000000-0000-0000-0000-000100000005","name":"Master Bedroom"},{"where_id":"00000000-0000-0000-0000-00010000000e","name":"Office"},{"where_id":"00000000-0000-0000-0000-00010000000f","name":"Upstairs"}]}},"structure":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":15857,"$timestamp":1445956462746,"away_timestamp":1445954700,"away":false,"location":"Palm + Harbor, FL","name":"Chrome App Structure","postal_code":"34683","topaz_away":false,"creation_time":1445885694067,"country_code":"US","away_setter":0,"topaz_hush_key":"FmyQftpkdU9eH9St4mMWhQ==","user":"user.2423243","devices":["device.fake3243E4FEE924"],"swarm":["device.fake3243E4FEE924"],"fabric_ids":[],"clutches":[],"members":[{"user":"user.2423243","roles":["owner"]}]}},"message":{"fake3243E4FEE924":{"$version":-24419,"$timestamp":1445954076171,"1":{"cmd":"register"}}},"tuneups":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1}},"device":{"fake3243E4FEE924":{"$version":-27199,"$timestamp":1445956401831,"heatpump_setback_active":false,"emer_heat_enable":false,"touched_by":{},"local_ip":"192.168.2.4","switch_system_off":false,"away_temperature_high":24.444,"cooling_source":"electric","temperature_lock_high_temp":22.222,"y2_type":"unknown","leaf_threshold_cool":0,"heater_source":"gas","fan_cooling_state":false,"note_codes":[],"compressor_lockout_leaf":-17.8,"has_x3_heat":false,"target_humidity_enabled":false,"heat_x3_source":"electric","alt_heat_delivery":"forced-air","has_x2_heat":false,"fan_mode":"auto","rssi":66,"sunlight_correction_active":false,"emer_heat_delivery":"forced-air","heatpump_savings":"off","pin_y2_description":"none","humidity_control_lockout_end_time":0,"filter_reminder_level":0,"gear_opacity":0,"filter_reminder_enabled":true,"capability_level":4,"schedule_learning_reset":false,"has_x2_cool":false,"hvac_pins":"W1,C,Rh,G","ob_orientation":"O","cooling_delivery":"unknown","range_enable":false,"auto_away_enable":true,"dual_fuel_breakpoint_override":"none","lower_safety_temp_enabled":true,"has_fan":true,"dehumidifier_state":false,"emer_heat_source":"electric","nlclient_state":"","heatpump_ready":false,"cooling_x2_delivery":"unknown","available_locales":"en_US,fr_CA,es_US,en_GB","current_version":"4.1","has_fossil_fuel":true,"learning_state":"slow","pin_ob_description":"none","pin_rh_description":"power","has_alt_heat":false,"safety_temp_activating_hvac":false,"fan_duty_cycle":900,"pin_y1_description":"none","humidifier_state":false,"gear_threshold_high":0,"backplate_serial_number":"02BA01AB241200CW","has_x2_alt_heat":false,"heat_x3_delivery":"forced-air","leaf_threshold_heat":18.334,"is_on_stand":false,"has_emer_heat":false,"learning_mode":true,"leaf_learning":"ready","has_aux_heat":false,"filter_changed_set_date":1386452016,"aux_heat_source":"electric","backplate_bsl_info":"BSL","alt_heat_x2_source":"gas","sunlight_correction_ready":true,"humidifier_type":"unknown","pin_c_description":"power","humidity_control_lockout_start_time":0,"pin_w2aux_description":"none","fan_timer_timeout":0,"country_code":"US","sunlight_correction_enabled":true,"heat_x2_delivery":"forced-air","target_humidity":35,"gear_threshold_low":0,"lower_safety_temp":4.738,"cooling_x2_source":"electric","equipment_type":"electric","heat_pump_aux_threshold":10,"alt_heat_x2_delivery":"forced-air","heat_pump_comp_threshold":-31.5,"learning_days_completed_cool":0,"backplate_bsl_version":"2.1","current_schedule_mode":"HEAT","fan_duty_end_time":68400,"hvac_wires":"Heat,Fan,Common + Wire,Rh","leaf":true,"type":"TBD","pin_g_description":"fan","click_sound":"on","away_temperature_low_enabled":true,"aux_heat_delivery":"forced-air","filter_changed_date":1387065600,"hvac_safety_shutoff_active":false,"heat_pump_comp_threshold_enabled":false,"has_dehumidifier":false,"preconditioning_ready":true,"fan_cooling_enabled":true,"leaf_away_high":28.88,"fan_cooling_readiness":"not + ready","device_locale":"en_US","temperature_scale":"F","battery_level":3.963,"error_code":"","maint_band_upper":0.39,"preconditioning_active":false,"fan_control_state":false,"away_temperature_high_enabled":false,"dehumidifier_fan_activation":false,"learning_days_completed_heat":598,"humidifier_fan_activation":false,"pin_star_description":"none","upper_safety_temp_enabled":false,"dual_fuel_selected":false,"preconditioning_enabled":false,"current_humidity":50,"dual_fuel_breakpoint":-1,"postal_code":"94602","backplate_mono_version":"4.0.20","alt_heat_source":"gas","aux_lockout_leaf":10,"has_heat_pump":false,"heater_delivery":"forced-air","away_temperature_low":12.778,"auto_away_reset":false,"radiant_control_enabled":false,"has_air_filter":true,"temperature_lock":false,"dehumidifier_type":"unknown","time_to_target_training":"training","upper_safety_temp":35,"humidity_control_lockout_enabled":false,"fan_timer_duration":900,"target_time_confidence":0,"pin_w1_description":"heat","temperature_lock_low_temp":20,"where_id":"00000000-0000-0000-0000-000100000001","forced_air":true,"temperature_lock_pin_hash":"","auto_dehum_enabled":false,"leaf_type":1,"backplate_mono_info":"TFE + (BP_D2) 4.0.20 (root@bamboo) 2014-02-03 10:06:33","has_dual_fuel":false,"star_type":"unknown","learning_time":1703,"maint_band_lower":0.39,"creation_time":1420654958512,"has_humidifier":false,"learning_days_completed_range":0,"dehumidifier_orientation_selected":"unknown","leaf_schedule_delta":1.11,"logging_priority":"informational","user_brightness":"medium","leaf_away_low":16.835,"pin_rc_description":"none","auto_dehum_state":false,"serial_number":"80C4887E69DF00D9","heat_x2_source":"electric","mac_address":"18b430093686","fan_duty_start_time":50400,"time_to_target":0,"backplate_model":"Backplate-2.2","heat_link_connection":0,"model_version":"Display-2.1","heat_pump_aux_threshold_enabled":true,"ob_persistence":true,"schedules":[]}},"trip":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":32201,"$timestamp":1445885694252,"trips":[]}},"demand_response":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1}},"user":{"2423243":{"$version":9049,"$timestamp":1445885721137,"email":"test@yahoo.com","name":"test@yahoo.com","structures":["structure.0b47dcf0-7c13-11e5-8199-22000b420f99"],"structure_memberships":[{"structure":"structure.0b47dcf0-7c13-11e5-8199-22000b420f99","roles":["owner"]}]}},"link":{"fake3243E4FEE924":{"$version":10338,"$timestamp":1445954076171,"structure":"structure.0b47dcf0-7c13-11e5-8199-22000b420f99"}},"device_alert_dialog":{"fake3243E4FEE924":{"$version":-9248,"$timestamp":1445954076171,"dialog_data":"","dialog_id":"confirm-pairing"}},"geofence_info":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-31412,"$timestamp":1445885694252,"device_events":[],"fences":[]}},"metadata":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1356998400000,"last_ip":"127.0.0.1","last_connection":1356998400000}},"user_settings":{"2423243":{"$version":31691,"$timestamp":1445354998080,"email_verified":true,"tos_accepted_version":1434564000000,"receive_marketing_emails":true,"receive_nest_emails":true,"receive_support_emails":true,"max_structures":2,"max_thermostats":40,"max_thermostats_per_structure":20,"max_smoke_detectors_per_structure":18,"max_smoke_detectors":36,"max_wwn_devices_per_structure":10,"max_wwn_devices":20,"tos_minimum_version":1434564000000,"tos_current_version":1434564000000,"lang":"en_US"}},"schedule":{"fake3243E4FEE924":{"$version":21638,"$timestamp":1445954075940}},"structure_metadata":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-32678,"$timestamp":1445951380776,"entitlements_api_path":"/api/0.1/structure/0b47dcf0-7c13-11e5-8199-22000b420f99/entitlements?v=8a957eeb-c93a-4e47-aea4-fb31cfc65691"}},"shared":{"fake3243E4FEE924":{"$version":-13990,"$timestamp":1445956397555,"auto_away_learning":"ready","auto_away":0,"hvac_alt_heat_state":false,"compressor_lockout_enabled":false,"hvac_heat_x3_state":false,"target_temperature_type":"heat","hvac_heater_state":false,"can_heat":true,"hvac_emer_heat_state":false,"compressor_lockout_timeout":0,"hvac_cool_x2_state":false,"target_temperature_high":23.33333,"hvac_aux_heater_state":false,"hvac_heat_x2_state":false,"target_temperature_low":23.33333,"hvac_ac_state":false,"target_temperature":22.85,"hvac_fan_state":false,"target_change_pending":true,"name":"E924","current_temperature":21,"hvac_alt_heat_x2_state":false,"can_cool":true}},"safety_summary":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-21456,"$timestamp":1445885694252}}}' + http_version: '1.1' + recorded_at: Tue, 27 Oct 2015 14:34:27 GMT +recorded_with: VCR 2.9.3 diff --git a/fixtures/vcr_cassettes/NestThermostat_Nest/gets_the_leaf_status.yml b/fixtures/vcr_cassettes/NestThermostat_Nest/gets_the_leaf_status.yml new file mode 100644 index 0000000..aafb995 --- /dev/null +++ b/fixtures/vcr_cassettes/NestThermostat_Nest/gets_the_leaf_status.yml @@ -0,0 +1,54 @@ +--- +http_interactions: +- request: + method: get + uri: https://on6%DFn7d%AC%A0%B57%D4%F7j9ZD%5B%13g%12%AE%AA7~%FD+gwtO%12%A9%DA%CA%60&Ea%B7%DCp%05%18s%C2&%DD%F4%C2;%D9Bw%09%25I;%BC%D5x%D9:V%E99*rC%B92;4cV%5D%E7%E1%DC%C7%B2%B0%16O%94ZY%B6%20%94X%17%03%ED%1E%91%CC%09tNS(%C9%F2%20%E9%FEY%01%5C%3Cf%A4%E4@czfe09-front01-iad01.transport.home.nest.com/v2/mobile/user.2423243 + body: + encoding: US-ASCII + string: '' + headers: + host: + - czfe09-front01-iad01.transport.home.nest.com + user-agent: + - Nest/1.1.0.10 CFNetwork/548.0.4 + authorization: + - Basic b.2423243.ZKygtTfU92o5WkRbE2cSrqo3fv0rZ3d0TxKp2spgJkVht9xwBRhzwibd9MI72UJ3CSVJO7zVeNk6Vuk5KnJDuTI7NGNWXefh3MeysBZPlFpZtiCUWBcD7R6RzAl0TlMoyfIg6f5ZAVw8ZqTk + x-nl-user-id: + - '2423243' + x-nl-protocol-version: + - '1' + accept-language: + - en-us + connection: + - keep-alive + accept: + - "*/*" + response: + status: + code: 200 + message: OK + headers: + content-type: + - application/json + x-nl-defer-device-window: + - '120' + x-nl-service-timestamp: + - '1445956461159' + content-length: + - '10890' + connection: + - keep-alive + body: + encoding: UTF-8 + string: '{"user_alert_dialog":{"2423243":{"$version":-31019,"$timestamp":1445954076171,"dialog_data":"","dialog_id":"confirm-pairing"}},"buckets":{"2423243":{"$version":12532,"$timestamp":1445956458542,"buckets":["user.2423243","user_alert_dialog.2423243","message_center.2423243","user_settings.2423243","buckets.2423243","device.fake3243E4FEE924","demand_response.fake3243E4FEE924","device_alert_dialog.fake3243E4FEE924","link.fake3243E4FEE924","message.fake3243E4FEE924","metadata.fake3243E4FEE924","schedule.fake3243E4FEE924","shared.fake3243E4FEE924","track.fake3243E4FEE924","tuneups.fake3243E4FEE924","energy_latest.fake3243E4FEE924","energy_weekly.fake3243E4FEE924","diamond_sensor_event.fake3243E4FEE924","diamond_sensor_config.fake3243E4FEE924","structure.0b47dcf0-7c13-11e5-8199-22000b420f99","where.0b47dcf0-7c13-11e5-8199-22000b420f99","utility.0b47dcf0-7c13-11e5-8199-22000b420f99","structure_history.0b47dcf0-7c13-11e5-8199-22000b420f99","trip.0b47dcf0-7c13-11e5-8199-22000b420f99","structure_metadata.0b47dcf0-7c13-11e5-8199-22000b420f99","safety.0b47dcf0-7c13-11e5-8199-22000b420f99","safety_summary.0b47dcf0-7c13-11e5-8199-22000b420f99","geofence_info.0b47dcf0-7c13-11e5-8199-22000b420f99"]}},"track":{"fake3243E4FEE924":{"$version":31457,"$timestamp":1445954075890,"online":false}},"message_center":{"2423243":{"$version":-1,"$timestamp":1325379661000,"messages":[]}},"safety":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":3651,"$timestamp":1445885694252,"audio_self_test_participants":[]}},"utility":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-1,"$timestamp":1}},"where":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":25319,"$timestamp":1445885694015,"wheres":[{"where_id":"00000000-0000-0000-0000-000100000001","name":"Basement"},{"where_id":"00000000-0000-0000-0000-00010000000d","name":"Bedroom"},{"where_id":"00000000-0000-0000-0000-000100000003","name":"Den"},{"where_id":"00000000-0000-0000-0000-000100000010","name":"Dining + Room"},{"where_id":"00000000-0000-0000-0000-000100000006","name":"Downstairs"},{"where_id":"00000000-0000-0000-0000-000100000000","name":"Entryway"},{"where_id":"00000000-0000-0000-0000-00010000000b","name":"Family + Room"},{"where_id":"00000000-0000-0000-0000-000100000002","name":"Hallway"},{"where_id":"00000000-0000-0000-0000-000100000008","name":"Kids + Room"},{"where_id":"00000000-0000-0000-0000-00010000000a","name":"Kitchen"},{"where_id":"00000000-0000-0000-0000-00010000000c","name":"Living + Room"},{"where_id":"00000000-0000-0000-0000-000100000005","name":"Master Bedroom"},{"where_id":"00000000-0000-0000-0000-00010000000e","name":"Office"},{"where_id":"00000000-0000-0000-0000-00010000000f","name":"Upstairs"}]}},"structure":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-9689,"$timestamp":1445956385810,"away_timestamp":1445954700,"away":false,"location":"Palm + Harbor, FL","name":"Chrome App Structure","postal_code":"34683","topaz_away":false,"creation_time":1445885694067,"country_code":"US","away_setter":0,"topaz_hush_key":"FmyQftpkdU9eH9St4mMWhQ==","user":"user.2423243","devices":["device.fake3243E4FEE924"],"swarm":["device.fake3243E4FEE924"],"fabric_ids":[],"clutches":[],"members":[{"user":"user.2423243","roles":["owner"]}]}},"message":{"fake3243E4FEE924":{"$version":-24419,"$timestamp":1445954076171,"1":{"cmd":"register"}}},"tuneups":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1}},"device":{"fake3243E4FEE924":{"$version":-27199,"$timestamp":1445956401831,"heatpump_setback_active":false,"emer_heat_enable":false,"touched_by":{},"local_ip":"192.168.2.4","switch_system_off":false,"away_temperature_high":24.444,"cooling_source":"electric","temperature_lock_high_temp":22.222,"y2_type":"unknown","leaf_threshold_cool":0,"heater_source":"gas","fan_cooling_state":false,"note_codes":[],"compressor_lockout_leaf":-17.8,"has_x3_heat":false,"target_humidity_enabled":false,"heat_x3_source":"electric","alt_heat_delivery":"forced-air","has_x2_heat":false,"fan_mode":"auto","rssi":66,"sunlight_correction_active":false,"emer_heat_delivery":"forced-air","heatpump_savings":"off","pin_y2_description":"none","humidity_control_lockout_end_time":0,"filter_reminder_level":0,"gear_opacity":0,"filter_reminder_enabled":true,"capability_level":4,"schedule_learning_reset":false,"has_x2_cool":false,"hvac_pins":"W1,C,Rh,G","ob_orientation":"O","cooling_delivery":"unknown","range_enable":false,"auto_away_enable":true,"dual_fuel_breakpoint_override":"none","lower_safety_temp_enabled":true,"has_fan":true,"dehumidifier_state":false,"emer_heat_source":"electric","nlclient_state":"","heatpump_ready":false,"cooling_x2_delivery":"unknown","available_locales":"en_US,fr_CA,es_US,en_GB","current_version":"4.1","has_fossil_fuel":true,"learning_state":"slow","pin_ob_description":"none","pin_rh_description":"power","has_alt_heat":false,"safety_temp_activating_hvac":false,"fan_duty_cycle":900,"pin_y1_description":"none","humidifier_state":false,"gear_threshold_high":0,"backplate_serial_number":"02BA01AB241200CW","has_x2_alt_heat":false,"heat_x3_delivery":"forced-air","leaf_threshold_heat":18.334,"is_on_stand":false,"has_emer_heat":false,"learning_mode":true,"leaf_learning":"ready","has_aux_heat":false,"filter_changed_set_date":1386452016,"aux_heat_source":"electric","backplate_bsl_info":"BSL","alt_heat_x2_source":"gas","sunlight_correction_ready":true,"humidifier_type":"unknown","pin_c_description":"power","humidity_control_lockout_start_time":0,"pin_w2aux_description":"none","fan_timer_timeout":0,"country_code":"US","sunlight_correction_enabled":true,"heat_x2_delivery":"forced-air","target_humidity":35,"gear_threshold_low":0,"lower_safety_temp":4.738,"cooling_x2_source":"electric","equipment_type":"electric","heat_pump_aux_threshold":10,"alt_heat_x2_delivery":"forced-air","heat_pump_comp_threshold":-31.5,"learning_days_completed_cool":0,"backplate_bsl_version":"2.1","current_schedule_mode":"HEAT","fan_duty_end_time":68400,"hvac_wires":"Heat,Fan,Common + Wire,Rh","leaf":true,"type":"TBD","pin_g_description":"fan","click_sound":"on","away_temperature_low_enabled":true,"aux_heat_delivery":"forced-air","filter_changed_date":1387065600,"hvac_safety_shutoff_active":false,"heat_pump_comp_threshold_enabled":false,"has_dehumidifier":false,"preconditioning_ready":true,"fan_cooling_enabled":true,"leaf_away_high":28.88,"fan_cooling_readiness":"not + ready","device_locale":"en_US","temperature_scale":"F","battery_level":3.963,"error_code":"","maint_band_upper":0.39,"preconditioning_active":false,"fan_control_state":false,"away_temperature_high_enabled":false,"dehumidifier_fan_activation":false,"learning_days_completed_heat":598,"humidifier_fan_activation":false,"pin_star_description":"none","upper_safety_temp_enabled":false,"dual_fuel_selected":false,"preconditioning_enabled":false,"current_humidity":50,"dual_fuel_breakpoint":-1,"postal_code":"94602","backplate_mono_version":"4.0.20","alt_heat_source":"gas","aux_lockout_leaf":10,"has_heat_pump":false,"heater_delivery":"forced-air","away_temperature_low":12.778,"auto_away_reset":false,"radiant_control_enabled":false,"has_air_filter":true,"temperature_lock":false,"dehumidifier_type":"unknown","time_to_target_training":"training","upper_safety_temp":35,"humidity_control_lockout_enabled":false,"fan_timer_duration":900,"target_time_confidence":0,"pin_w1_description":"heat","temperature_lock_low_temp":20,"where_id":"00000000-0000-0000-0000-000100000001","forced_air":true,"temperature_lock_pin_hash":"","auto_dehum_enabled":false,"leaf_type":1,"backplate_mono_info":"TFE + (BP_D2) 4.0.20 (root@bamboo) 2014-02-03 10:06:33","has_dual_fuel":false,"star_type":"unknown","learning_time":1703,"maint_band_lower":0.39,"creation_time":1420654958512,"has_humidifier":false,"learning_days_completed_range":0,"dehumidifier_orientation_selected":"unknown","leaf_schedule_delta":1.11,"logging_priority":"informational","user_brightness":"medium","leaf_away_low":16.835,"pin_rc_description":"none","auto_dehum_state":false,"serial_number":"80C4887E69DF00D9","heat_x2_source":"electric","mac_address":"18b430093686","fan_duty_start_time":50400,"time_to_target":0,"backplate_model":"Backplate-2.2","heat_link_connection":0,"model_version":"Display-2.1","heat_pump_aux_threshold_enabled":true,"ob_persistence":true,"schedules":[]}},"trip":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":32201,"$timestamp":1445885694252,"trips":[]}},"demand_response":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1}},"user":{"2423243":{"$version":9049,"$timestamp":1445885721137,"email":"test@yahoo.com","name":"test@yahoo.com","structures":["structure.0b47dcf0-7c13-11e5-8199-22000b420f99"],"structure_memberships":[{"structure":"structure.0b47dcf0-7c13-11e5-8199-22000b420f99","roles":["owner"]}]}},"link":{"fake3243E4FEE924":{"$version":10338,"$timestamp":1445954076171,"structure":"structure.0b47dcf0-7c13-11e5-8199-22000b420f99"}},"device_alert_dialog":{"fake3243E4FEE924":{"$version":-9248,"$timestamp":1445954076171,"dialog_data":"","dialog_id":"confirm-pairing"}},"geofence_info":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-31412,"$timestamp":1445885694252,"device_events":[],"fences":[]}},"metadata":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1356998400000,"last_ip":"127.0.0.1","last_connection":1356998400000}},"user_settings":{"2423243":{"$version":31691,"$timestamp":1445354998080,"email_verified":true,"tos_accepted_version":1434564000000,"receive_marketing_emails":true,"receive_nest_emails":true,"receive_support_emails":true,"max_structures":2,"max_thermostats":40,"max_thermostats_per_structure":20,"max_smoke_detectors_per_structure":18,"max_smoke_detectors":36,"max_wwn_devices_per_structure":10,"max_wwn_devices":20,"tos_minimum_version":1434564000000,"tos_current_version":1434564000000,"lang":"en_US"}},"schedule":{"fake3243E4FEE924":{"$version":21638,"$timestamp":1445954075940}},"structure_metadata":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-32678,"$timestamp":1445951380776,"entitlements_api_path":"/api/0.1/structure/0b47dcf0-7c13-11e5-8199-22000b420f99/entitlements?v=8a957eeb-c93a-4e47-aea4-fb31cfc65691"}},"shared":{"fake3243E4FEE924":{"$version":-13990,"$timestamp":1445956397555,"auto_away_learning":"ready","auto_away":0,"hvac_alt_heat_state":false,"compressor_lockout_enabled":false,"hvac_heat_x3_state":false,"target_temperature_type":"heat","hvac_heater_state":false,"can_heat":true,"hvac_emer_heat_state":false,"compressor_lockout_timeout":0,"hvac_cool_x2_state":false,"target_temperature_high":23.33333,"hvac_aux_heater_state":false,"hvac_heat_x2_state":false,"target_temperature_low":23.33333,"hvac_ac_state":false,"target_temperature":22.85,"hvac_fan_state":false,"target_change_pending":true,"name":"E924","current_temperature":21,"hvac_alt_heat_x2_state":false,"can_cool":true}},"safety_summary":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-21456,"$timestamp":1445885694252}}}' + http_version: '1.1' + recorded_at: Tue, 27 Oct 2015 14:34:21 GMT +recorded_with: VCR 2.9.3 diff --git a/fixtures/vcr_cassettes/NestThermostat_Nest/gets_the_low_temperature.yml b/fixtures/vcr_cassettes/NestThermostat_Nest/gets_the_low_temperature.yml new file mode 100644 index 0000000..43fdc4b --- /dev/null +++ b/fixtures/vcr_cassettes/NestThermostat_Nest/gets_the_low_temperature.yml @@ -0,0 +1,105 @@ +--- +http_interactions: +- request: + method: get + uri: https://on6%DFn7d%AC%A0%B57%D4%F7j9ZD%5B%13g%12%AE%AA7~%FD+gwtO%12%A9%DA%CA%60&Ea%B7%DCp%05%18s%C2&%DD%F4%C2;%D9Bw%09%25I;%BC%D5x%D9:V%E99*rC%B92;4cV%5D%E7%E1%DC%C7%B2%B0%16O%94ZY%B6%20%94X%17%03%ED%1E%91%CC%09tNS(%C9%F2%20%E9%FEY%01%5C%3Cf%A4%E4@czfe09-front01-iad01.transport.home.nest.com/v2/mobile/user.2423243 + body: + encoding: US-ASCII + string: '' + headers: + host: + - czfe09-front01-iad01.transport.home.nest.com + user-agent: + - Nest/1.1.0.10 CFNetwork/548.0.4 + authorization: + - Basic b.2423243.ZKygtTfU92o5WkRbE2cSrqo3fv0rZ3d0TxKp2spgJkVht9xwBRhzwibd9MI72UJ3CSVJO7zVeNk6Vuk5KnJDuTI7NGNWXefh3MeysBZPlFpZtiCUWBcD7R6RzAl0TlMoyfIg6f5ZAVw8ZqTk + x-nl-user-id: + - '2423243' + x-nl-protocol-version: + - '1' + accept-language: + - en-us + connection: + - keep-alive + accept: + - "*/*" + response: + status: + code: 200 + message: OK + headers: + content-type: + - application/json + x-nl-defer-device-window: + - '120' + x-nl-service-timestamp: + - '1445956465464' + content-length: + - '10890' + connection: + - keep-alive + body: + encoding: UTF-8 + string: '{"user_alert_dialog":{"2423243":{"$version":-31019,"$timestamp":1445954076171,"dialog_data":"","dialog_id":"confirm-pairing"}},"buckets":{"2423243":{"$version":12532,"$timestamp":1445956458542,"buckets":["user.2423243","user_alert_dialog.2423243","message_center.2423243","user_settings.2423243","buckets.2423243","device.fake3243E4FEE924","demand_response.fake3243E4FEE924","device_alert_dialog.fake3243E4FEE924","link.fake3243E4FEE924","message.fake3243E4FEE924","metadata.fake3243E4FEE924","schedule.fake3243E4FEE924","shared.fake3243E4FEE924","track.fake3243E4FEE924","tuneups.fake3243E4FEE924","energy_latest.fake3243E4FEE924","energy_weekly.fake3243E4FEE924","diamond_sensor_event.fake3243E4FEE924","diamond_sensor_config.fake3243E4FEE924","structure.0b47dcf0-7c13-11e5-8199-22000b420f99","where.0b47dcf0-7c13-11e5-8199-22000b420f99","utility.0b47dcf0-7c13-11e5-8199-22000b420f99","structure_history.0b47dcf0-7c13-11e5-8199-22000b420f99","trip.0b47dcf0-7c13-11e5-8199-22000b420f99","structure_metadata.0b47dcf0-7c13-11e5-8199-22000b420f99","safety.0b47dcf0-7c13-11e5-8199-22000b420f99","safety_summary.0b47dcf0-7c13-11e5-8199-22000b420f99","geofence_info.0b47dcf0-7c13-11e5-8199-22000b420f99"]}},"track":{"fake3243E4FEE924":{"$version":31457,"$timestamp":1445954075890,"online":false}},"message_center":{"2423243":{"$version":-1,"$timestamp":1325379661000,"messages":[]}},"safety":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":3651,"$timestamp":1445885694252,"audio_self_test_participants":[]}},"utility":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-1,"$timestamp":1}},"where":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":25319,"$timestamp":1445885694015,"wheres":[{"where_id":"00000000-0000-0000-0000-000100000001","name":"Basement"},{"where_id":"00000000-0000-0000-0000-00010000000d","name":"Bedroom"},{"where_id":"00000000-0000-0000-0000-000100000003","name":"Den"},{"where_id":"00000000-0000-0000-0000-000100000010","name":"Dining + Room"},{"where_id":"00000000-0000-0000-0000-000100000006","name":"Downstairs"},{"where_id":"00000000-0000-0000-0000-000100000000","name":"Entryway"},{"where_id":"00000000-0000-0000-0000-00010000000b","name":"Family + Room"},{"where_id":"00000000-0000-0000-0000-000100000002","name":"Hallway"},{"where_id":"00000000-0000-0000-0000-000100000008","name":"Kids + Room"},{"where_id":"00000000-0000-0000-0000-00010000000a","name":"Kitchen"},{"where_id":"00000000-0000-0000-0000-00010000000c","name":"Living + Room"},{"where_id":"00000000-0000-0000-0000-000100000005","name":"Master Bedroom"},{"where_id":"00000000-0000-0000-0000-00010000000e","name":"Office"},{"where_id":"00000000-0000-0000-0000-00010000000f","name":"Upstairs"}]}},"structure":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":15857,"$timestamp":1445956462746,"away_timestamp":1445954700,"away":false,"location":"Palm + Harbor, FL","name":"Chrome App Structure","postal_code":"34683","topaz_away":false,"creation_time":1445885694067,"country_code":"US","away_setter":0,"topaz_hush_key":"FmyQftpkdU9eH9St4mMWhQ==","user":"user.2423243","devices":["device.fake3243E4FEE924"],"swarm":["device.fake3243E4FEE924"],"fabric_ids":[],"clutches":[],"members":[{"user":"user.2423243","roles":["owner"]}]}},"message":{"fake3243E4FEE924":{"$version":-24419,"$timestamp":1445954076171,"1":{"cmd":"register"}}},"tuneups":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1}},"device":{"fake3243E4FEE924":{"$version":-27199,"$timestamp":1445956401831,"heatpump_setback_active":false,"emer_heat_enable":false,"touched_by":{},"local_ip":"192.168.2.4","switch_system_off":false,"away_temperature_high":24.444,"cooling_source":"electric","temperature_lock_high_temp":22.222,"y2_type":"unknown","leaf_threshold_cool":0,"heater_source":"gas","fan_cooling_state":false,"note_codes":[],"compressor_lockout_leaf":-17.8,"has_x3_heat":false,"target_humidity_enabled":false,"heat_x3_source":"electric","alt_heat_delivery":"forced-air","has_x2_heat":false,"fan_mode":"auto","rssi":66,"sunlight_correction_active":false,"emer_heat_delivery":"forced-air","heatpump_savings":"off","pin_y2_description":"none","humidity_control_lockout_end_time":0,"filter_reminder_level":0,"gear_opacity":0,"filter_reminder_enabled":true,"capability_level":4,"schedule_learning_reset":false,"has_x2_cool":false,"hvac_pins":"W1,C,Rh,G","ob_orientation":"O","cooling_delivery":"unknown","range_enable":false,"auto_away_enable":true,"dual_fuel_breakpoint_override":"none","lower_safety_temp_enabled":true,"has_fan":true,"dehumidifier_state":false,"emer_heat_source":"electric","nlclient_state":"","heatpump_ready":false,"cooling_x2_delivery":"unknown","available_locales":"en_US,fr_CA,es_US,en_GB","current_version":"4.1","has_fossil_fuel":true,"learning_state":"slow","pin_ob_description":"none","pin_rh_description":"power","has_alt_heat":false,"safety_temp_activating_hvac":false,"fan_duty_cycle":900,"pin_y1_description":"none","humidifier_state":false,"gear_threshold_high":0,"backplate_serial_number":"02BA01AB241200CW","has_x2_alt_heat":false,"heat_x3_delivery":"forced-air","leaf_threshold_heat":18.334,"is_on_stand":false,"has_emer_heat":false,"learning_mode":true,"leaf_learning":"ready","has_aux_heat":false,"filter_changed_set_date":1386452016,"aux_heat_source":"electric","backplate_bsl_info":"BSL","alt_heat_x2_source":"gas","sunlight_correction_ready":true,"humidifier_type":"unknown","pin_c_description":"power","humidity_control_lockout_start_time":0,"pin_w2aux_description":"none","fan_timer_timeout":0,"country_code":"US","sunlight_correction_enabled":true,"heat_x2_delivery":"forced-air","target_humidity":35,"gear_threshold_low":0,"lower_safety_temp":4.738,"cooling_x2_source":"electric","equipment_type":"electric","heat_pump_aux_threshold":10,"alt_heat_x2_delivery":"forced-air","heat_pump_comp_threshold":-31.5,"learning_days_completed_cool":0,"backplate_bsl_version":"2.1","current_schedule_mode":"HEAT","fan_duty_end_time":68400,"hvac_wires":"Heat,Fan,Common + Wire,Rh","leaf":true,"type":"TBD","pin_g_description":"fan","click_sound":"on","away_temperature_low_enabled":true,"aux_heat_delivery":"forced-air","filter_changed_date":1387065600,"hvac_safety_shutoff_active":false,"heat_pump_comp_threshold_enabled":false,"has_dehumidifier":false,"preconditioning_ready":true,"fan_cooling_enabled":true,"leaf_away_high":28.88,"fan_cooling_readiness":"not + ready","device_locale":"en_US","temperature_scale":"F","battery_level":3.963,"error_code":"","maint_band_upper":0.39,"preconditioning_active":false,"fan_control_state":false,"away_temperature_high_enabled":false,"dehumidifier_fan_activation":false,"learning_days_completed_heat":598,"humidifier_fan_activation":false,"pin_star_description":"none","upper_safety_temp_enabled":false,"dual_fuel_selected":false,"preconditioning_enabled":false,"current_humidity":50,"dual_fuel_breakpoint":-1,"postal_code":"94602","backplate_mono_version":"4.0.20","alt_heat_source":"gas","aux_lockout_leaf":10,"has_heat_pump":false,"heater_delivery":"forced-air","away_temperature_low":12.778,"auto_away_reset":false,"radiant_control_enabled":false,"has_air_filter":true,"temperature_lock":false,"dehumidifier_type":"unknown","time_to_target_training":"training","upper_safety_temp":35,"humidity_control_lockout_enabled":false,"fan_timer_duration":900,"target_time_confidence":0,"pin_w1_description":"heat","temperature_lock_low_temp":20,"where_id":"00000000-0000-0000-0000-000100000001","forced_air":true,"temperature_lock_pin_hash":"","auto_dehum_enabled":false,"leaf_type":1,"backplate_mono_info":"TFE + (BP_D2) 4.0.20 (root@bamboo) 2014-02-03 10:06:33","has_dual_fuel":false,"star_type":"unknown","learning_time":1703,"maint_band_lower":0.39,"creation_time":1420654958512,"has_humidifier":false,"learning_days_completed_range":0,"dehumidifier_orientation_selected":"unknown","leaf_schedule_delta":1.11,"logging_priority":"informational","user_brightness":"medium","leaf_away_low":16.835,"pin_rc_description":"none","auto_dehum_state":false,"serial_number":"80C4887E69DF00D9","heat_x2_source":"electric","mac_address":"18b430093686","fan_duty_start_time":50400,"time_to_target":0,"backplate_model":"Backplate-2.2","heat_link_connection":0,"model_version":"Display-2.1","heat_pump_aux_threshold_enabled":true,"ob_persistence":true,"schedules":[]}},"trip":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":32201,"$timestamp":1445885694252,"trips":[]}},"demand_response":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1}},"user":{"2423243":{"$version":9049,"$timestamp":1445885721137,"email":"test@yahoo.com","name":"test@yahoo.com","structures":["structure.0b47dcf0-7c13-11e5-8199-22000b420f99"],"structure_memberships":[{"structure":"structure.0b47dcf0-7c13-11e5-8199-22000b420f99","roles":["owner"]}]}},"link":{"fake3243E4FEE924":{"$version":10338,"$timestamp":1445954076171,"structure":"structure.0b47dcf0-7c13-11e5-8199-22000b420f99"}},"device_alert_dialog":{"fake3243E4FEE924":{"$version":-9248,"$timestamp":1445954076171,"dialog_data":"","dialog_id":"confirm-pairing"}},"geofence_info":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-31412,"$timestamp":1445885694252,"device_events":[],"fences":[]}},"metadata":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1356998400000,"last_ip":"127.0.0.1","last_connection":1356998400000}},"user_settings":{"2423243":{"$version":31691,"$timestamp":1445354998080,"email_verified":true,"tos_accepted_version":1434564000000,"receive_marketing_emails":true,"receive_nest_emails":true,"receive_support_emails":true,"max_structures":2,"max_thermostats":40,"max_thermostats_per_structure":20,"max_smoke_detectors_per_structure":18,"max_smoke_detectors":36,"max_wwn_devices_per_structure":10,"max_wwn_devices":20,"tos_minimum_version":1434564000000,"tos_current_version":1434564000000,"lang":"en_US"}},"schedule":{"fake3243E4FEE924":{"$version":21638,"$timestamp":1445954075940}},"structure_metadata":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-32678,"$timestamp":1445951380776,"entitlements_api_path":"/api/0.1/structure/0b47dcf0-7c13-11e5-8199-22000b420f99/entitlements?v=8a957eeb-c93a-4e47-aea4-fb31cfc65691"}},"shared":{"fake3243E4FEE924":{"$version":-13990,"$timestamp":1445956397555,"auto_away_learning":"ready","auto_away":0,"hvac_alt_heat_state":false,"compressor_lockout_enabled":false,"hvac_heat_x3_state":false,"target_temperature_type":"heat","hvac_heater_state":false,"can_heat":true,"hvac_emer_heat_state":false,"compressor_lockout_timeout":0,"hvac_cool_x2_state":false,"target_temperature_high":23.33333,"hvac_aux_heater_state":false,"hvac_heat_x2_state":false,"target_temperature_low":23.33333,"hvac_ac_state":false,"target_temperature":22.85,"hvac_fan_state":false,"target_change_pending":true,"name":"E924","current_temperature":21,"hvac_alt_heat_x2_state":false,"can_cool":true}},"safety_summary":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-21456,"$timestamp":1445885694252}}}' + http_version: '1.1' + recorded_at: Tue, 27 Oct 2015 14:34:25 GMT +- request: + method: get + uri: https://on6%DFn7d%AC%A0%B57%D4%F7j9ZD%5B%13g%12%AE%AA7~%FD+gwtO%12%A9%DA%CA%60&Ea%B7%DCp%05%18s%C2&%DD%F4%C2;%D9Bw%09%25I;%BC%D5x%D9:V%E99*rC%B92;4cV%5D%E7%E1%DC%C7%B2%B0%16O%94ZY%B6%20%94X%17%03%ED%1E%91%CC%09tNS(%C9%F2%20%E9%FEY%01%5C%3Cf%A4%E4@czfe09-front01-iad01.transport.home.nest.com/v2/mobile/user.2423243 + body: + encoding: US-ASCII + string: '' + headers: + host: + - czfe09-front01-iad01.transport.home.nest.com + user-agent: + - Nest/1.1.0.10 CFNetwork/548.0.4 + authorization: + - Basic b.2423243.ZKygtTfU92o5WkRbE2cSrqo3fv0rZ3d0TxKp2spgJkVht9xwBRhzwibd9MI72UJ3CSVJO7zVeNk6Vuk5KnJDuTI7NGNWXefh3MeysBZPlFpZtiCUWBcD7R6RzAl0TlMoyfIg6f5ZAVw8ZqTk + x-nl-user-id: + - '2423243' + x-nl-protocol-version: + - '1' + accept-language: + - en-us + connection: + - keep-alive + accept: + - "*/*" + response: + status: + code: 200 + message: OK + headers: + content-type: + - application/json + x-nl-defer-device-window: + - '120' + x-nl-service-timestamp: + - '1445956465848' + content-length: + - '10890' + connection: + - keep-alive + body: + encoding: UTF-8 + string: '{"user_alert_dialog":{"2423243":{"$version":-31019,"$timestamp":1445954076171,"dialog_data":"","dialog_id":"confirm-pairing"}},"buckets":{"2423243":{"$version":12532,"$timestamp":1445956458542,"buckets":["user.2423243","user_alert_dialog.2423243","message_center.2423243","user_settings.2423243","buckets.2423243","device.fake3243E4FEE924","demand_response.fake3243E4FEE924","device_alert_dialog.fake3243E4FEE924","link.fake3243E4FEE924","message.fake3243E4FEE924","metadata.fake3243E4FEE924","schedule.fake3243E4FEE924","shared.fake3243E4FEE924","track.fake3243E4FEE924","tuneups.fake3243E4FEE924","energy_latest.fake3243E4FEE924","energy_weekly.fake3243E4FEE924","diamond_sensor_event.fake3243E4FEE924","diamond_sensor_config.fake3243E4FEE924","structure.0b47dcf0-7c13-11e5-8199-22000b420f99","where.0b47dcf0-7c13-11e5-8199-22000b420f99","utility.0b47dcf0-7c13-11e5-8199-22000b420f99","structure_history.0b47dcf0-7c13-11e5-8199-22000b420f99","trip.0b47dcf0-7c13-11e5-8199-22000b420f99","structure_metadata.0b47dcf0-7c13-11e5-8199-22000b420f99","safety.0b47dcf0-7c13-11e5-8199-22000b420f99","safety_summary.0b47dcf0-7c13-11e5-8199-22000b420f99","geofence_info.0b47dcf0-7c13-11e5-8199-22000b420f99"]}},"track":{"fake3243E4FEE924":{"$version":31457,"$timestamp":1445954075890,"online":false}},"message_center":{"2423243":{"$version":-1,"$timestamp":1325379661000,"messages":[]}},"safety":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":3651,"$timestamp":1445885694252,"audio_self_test_participants":[]}},"utility":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-1,"$timestamp":1}},"where":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":25319,"$timestamp":1445885694015,"wheres":[{"where_id":"00000000-0000-0000-0000-000100000001","name":"Basement"},{"where_id":"00000000-0000-0000-0000-00010000000d","name":"Bedroom"},{"where_id":"00000000-0000-0000-0000-000100000003","name":"Den"},{"where_id":"00000000-0000-0000-0000-000100000010","name":"Dining + Room"},{"where_id":"00000000-0000-0000-0000-000100000006","name":"Downstairs"},{"where_id":"00000000-0000-0000-0000-000100000000","name":"Entryway"},{"where_id":"00000000-0000-0000-0000-00010000000b","name":"Family + Room"},{"where_id":"00000000-0000-0000-0000-000100000002","name":"Hallway"},{"where_id":"00000000-0000-0000-0000-000100000008","name":"Kids + Room"},{"where_id":"00000000-0000-0000-0000-00010000000a","name":"Kitchen"},{"where_id":"00000000-0000-0000-0000-00010000000c","name":"Living + Room"},{"where_id":"00000000-0000-0000-0000-000100000005","name":"Master Bedroom"},{"where_id":"00000000-0000-0000-0000-00010000000e","name":"Office"},{"where_id":"00000000-0000-0000-0000-00010000000f","name":"Upstairs"}]}},"structure":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":15857,"$timestamp":1445956462746,"away_timestamp":1445954700,"away":false,"location":"Palm + Harbor, FL","name":"Chrome App Structure","postal_code":"34683","topaz_away":false,"creation_time":1445885694067,"country_code":"US","away_setter":0,"topaz_hush_key":"FmyQftpkdU9eH9St4mMWhQ==","user":"user.2423243","devices":["device.fake3243E4FEE924"],"swarm":["device.fake3243E4FEE924"],"fabric_ids":[],"clutches":[],"members":[{"user":"user.2423243","roles":["owner"]}]}},"message":{"fake3243E4FEE924":{"$version":-24419,"$timestamp":1445954076171,"1":{"cmd":"register"}}},"tuneups":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1}},"device":{"fake3243E4FEE924":{"$version":-27199,"$timestamp":1445956401831,"heatpump_setback_active":false,"emer_heat_enable":false,"touched_by":{},"local_ip":"192.168.2.4","switch_system_off":false,"away_temperature_high":24.444,"cooling_source":"electric","temperature_lock_high_temp":22.222,"y2_type":"unknown","leaf_threshold_cool":0,"heater_source":"gas","fan_cooling_state":false,"note_codes":[],"compressor_lockout_leaf":-17.8,"has_x3_heat":false,"target_humidity_enabled":false,"heat_x3_source":"electric","alt_heat_delivery":"forced-air","has_x2_heat":false,"fan_mode":"auto","rssi":66,"sunlight_correction_active":false,"emer_heat_delivery":"forced-air","heatpump_savings":"off","pin_y2_description":"none","humidity_control_lockout_end_time":0,"filter_reminder_level":0,"gear_opacity":0,"filter_reminder_enabled":true,"capability_level":4,"schedule_learning_reset":false,"has_x2_cool":false,"hvac_pins":"W1,C,Rh,G","ob_orientation":"O","cooling_delivery":"unknown","range_enable":false,"auto_away_enable":true,"dual_fuel_breakpoint_override":"none","lower_safety_temp_enabled":true,"has_fan":true,"dehumidifier_state":false,"emer_heat_source":"electric","nlclient_state":"","heatpump_ready":false,"cooling_x2_delivery":"unknown","available_locales":"en_US,fr_CA,es_US,en_GB","current_version":"4.1","has_fossil_fuel":true,"learning_state":"slow","pin_ob_description":"none","pin_rh_description":"power","has_alt_heat":false,"safety_temp_activating_hvac":false,"fan_duty_cycle":900,"pin_y1_description":"none","humidifier_state":false,"gear_threshold_high":0,"backplate_serial_number":"02BA01AB241200CW","has_x2_alt_heat":false,"heat_x3_delivery":"forced-air","leaf_threshold_heat":18.334,"is_on_stand":false,"has_emer_heat":false,"learning_mode":true,"leaf_learning":"ready","has_aux_heat":false,"filter_changed_set_date":1386452016,"aux_heat_source":"electric","backplate_bsl_info":"BSL","alt_heat_x2_source":"gas","sunlight_correction_ready":true,"humidifier_type":"unknown","pin_c_description":"power","humidity_control_lockout_start_time":0,"pin_w2aux_description":"none","fan_timer_timeout":0,"country_code":"US","sunlight_correction_enabled":true,"heat_x2_delivery":"forced-air","target_humidity":35,"gear_threshold_low":0,"lower_safety_temp":4.738,"cooling_x2_source":"electric","equipment_type":"electric","heat_pump_aux_threshold":10,"alt_heat_x2_delivery":"forced-air","heat_pump_comp_threshold":-31.5,"learning_days_completed_cool":0,"backplate_bsl_version":"2.1","current_schedule_mode":"HEAT","fan_duty_end_time":68400,"hvac_wires":"Heat,Fan,Common + Wire,Rh","leaf":true,"type":"TBD","pin_g_description":"fan","click_sound":"on","away_temperature_low_enabled":true,"aux_heat_delivery":"forced-air","filter_changed_date":1387065600,"hvac_safety_shutoff_active":false,"heat_pump_comp_threshold_enabled":false,"has_dehumidifier":false,"preconditioning_ready":true,"fan_cooling_enabled":true,"leaf_away_high":28.88,"fan_cooling_readiness":"not + ready","device_locale":"en_US","temperature_scale":"F","battery_level":3.963,"error_code":"","maint_band_upper":0.39,"preconditioning_active":false,"fan_control_state":false,"away_temperature_high_enabled":false,"dehumidifier_fan_activation":false,"learning_days_completed_heat":598,"humidifier_fan_activation":false,"pin_star_description":"none","upper_safety_temp_enabled":false,"dual_fuel_selected":false,"preconditioning_enabled":false,"current_humidity":50,"dual_fuel_breakpoint":-1,"postal_code":"94602","backplate_mono_version":"4.0.20","alt_heat_source":"gas","aux_lockout_leaf":10,"has_heat_pump":false,"heater_delivery":"forced-air","away_temperature_low":12.778,"auto_away_reset":false,"radiant_control_enabled":false,"has_air_filter":true,"temperature_lock":false,"dehumidifier_type":"unknown","time_to_target_training":"training","upper_safety_temp":35,"humidity_control_lockout_enabled":false,"fan_timer_duration":900,"target_time_confidence":0,"pin_w1_description":"heat","temperature_lock_low_temp":20,"where_id":"00000000-0000-0000-0000-000100000001","forced_air":true,"temperature_lock_pin_hash":"","auto_dehum_enabled":false,"leaf_type":1,"backplate_mono_info":"TFE + (BP_D2) 4.0.20 (root@bamboo) 2014-02-03 10:06:33","has_dual_fuel":false,"star_type":"unknown","learning_time":1703,"maint_band_lower":0.39,"creation_time":1420654958512,"has_humidifier":false,"learning_days_completed_range":0,"dehumidifier_orientation_selected":"unknown","leaf_schedule_delta":1.11,"logging_priority":"informational","user_brightness":"medium","leaf_away_low":16.835,"pin_rc_description":"none","auto_dehum_state":false,"serial_number":"80C4887E69DF00D9","heat_x2_source":"electric","mac_address":"18b430093686","fan_duty_start_time":50400,"time_to_target":0,"backplate_model":"Backplate-2.2","heat_link_connection":0,"model_version":"Display-2.1","heat_pump_aux_threshold_enabled":true,"ob_persistence":true,"schedules":[]}},"trip":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":32201,"$timestamp":1445885694252,"trips":[]}},"demand_response":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1}},"user":{"2423243":{"$version":9049,"$timestamp":1445885721137,"email":"test@yahoo.com","name":"test@yahoo.com","structures":["structure.0b47dcf0-7c13-11e5-8199-22000b420f99"],"structure_memberships":[{"structure":"structure.0b47dcf0-7c13-11e5-8199-22000b420f99","roles":["owner"]}]}},"link":{"fake3243E4FEE924":{"$version":10338,"$timestamp":1445954076171,"structure":"structure.0b47dcf0-7c13-11e5-8199-22000b420f99"}},"device_alert_dialog":{"fake3243E4FEE924":{"$version":-9248,"$timestamp":1445954076171,"dialog_data":"","dialog_id":"confirm-pairing"}},"geofence_info":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-31412,"$timestamp":1445885694252,"device_events":[],"fences":[]}},"metadata":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1356998400000,"last_ip":"127.0.0.1","last_connection":1356998400000}},"user_settings":{"2423243":{"$version":31691,"$timestamp":1445354998080,"email_verified":true,"tos_accepted_version":1434564000000,"receive_marketing_emails":true,"receive_nest_emails":true,"receive_support_emails":true,"max_structures":2,"max_thermostats":40,"max_thermostats_per_structure":20,"max_smoke_detectors_per_structure":18,"max_smoke_detectors":36,"max_wwn_devices_per_structure":10,"max_wwn_devices":20,"tos_minimum_version":1434564000000,"tos_current_version":1434564000000,"lang":"en_US"}},"schedule":{"fake3243E4FEE924":{"$version":21638,"$timestamp":1445954075940}},"structure_metadata":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-32678,"$timestamp":1445951380776,"entitlements_api_path":"/api/0.1/structure/0b47dcf0-7c13-11e5-8199-22000b420f99/entitlements?v=8a957eeb-c93a-4e47-aea4-fb31cfc65691"}},"shared":{"fake3243E4FEE924":{"$version":-13990,"$timestamp":1445956397555,"auto_away_learning":"ready","auto_away":0,"hvac_alt_heat_state":false,"compressor_lockout_enabled":false,"hvac_heat_x3_state":false,"target_temperature_type":"heat","hvac_heater_state":false,"can_heat":true,"hvac_emer_heat_state":false,"compressor_lockout_timeout":0,"hvac_cool_x2_state":false,"target_temperature_high":23.33333,"hvac_aux_heater_state":false,"hvac_heat_x2_state":false,"target_temperature_low":23.33333,"hvac_ac_state":false,"target_temperature":22.85,"hvac_fan_state":false,"target_change_pending":true,"name":"E924","current_temperature":21,"hvac_alt_heat_x2_state":false,"can_cool":true}},"safety_summary":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-21456,"$timestamp":1445885694252}}}' + http_version: '1.1' + recorded_at: Tue, 27 Oct 2015 14:34:26 GMT +recorded_with: VCR 2.9.3 diff --git a/fixtures/vcr_cassettes/NestThermostat_Nest/gets_the_pubic_ip_address.yml b/fixtures/vcr_cassettes/NestThermostat_Nest/gets_the_pubic_ip_address.yml new file mode 100644 index 0000000..6d3a879 --- /dev/null +++ b/fixtures/vcr_cassettes/NestThermostat_Nest/gets_the_pubic_ip_address.yml @@ -0,0 +1,54 @@ +--- +http_interactions: +- request: + method: get + uri: https://on6%DFn7d%AC%A0%B57%D4%F7j9ZD%5B%13g%12%AE%AA7~%FD+gwtO%12%A9%DA%CA%60&Ea%B7%DCp%05%18s%C2&%DD%F4%C2;%D9Bw%09%25I;%BC%D5x%D9:V%E99*rC%B92;4cV%5D%E7%E1%DC%C7%B2%B0%16O%94ZY%B6%20%94X%17%03%ED%1E%91%CC%09tNS(%C9%F2%20%E9%FEY%01%5C%3Cf%A4%E4@czfe09-front01-iad01.transport.home.nest.com/v2/mobile/user.2423243 + body: + encoding: US-ASCII + string: '' + headers: + host: + - czfe09-front01-iad01.transport.home.nest.com + user-agent: + - Nest/1.1.0.10 CFNetwork/548.0.4 + authorization: + - Basic b.2423243.ZKygtTfU92o5WkRbE2cSrqo3fv0rZ3d0TxKp2spgJkVht9xwBRhzwibd9MI72UJ3CSVJO7zVeNk6Vuk5KnJDuTI7NGNWXefh3MeysBZPlFpZtiCUWBcD7R6RzAl0TlMoyfIg6f5ZAVw8ZqTk + x-nl-user-id: + - '2423243' + x-nl-protocol-version: + - '1' + accept-language: + - en-us + connection: + - keep-alive + accept: + - "*/*" + response: + status: + code: 200 + message: OK + headers: + content-type: + - application/json + x-nl-defer-device-window: + - '120' + x-nl-service-timestamp: + - '1445956460390' + content-length: + - '10890' + connection: + - keep-alive + body: + encoding: UTF-8 + string: '{"user_alert_dialog":{"2423243":{"$version":-31019,"$timestamp":1445954076171,"dialog_data":"","dialog_id":"confirm-pairing"}},"buckets":{"2423243":{"$version":12532,"$timestamp":1445956458542,"buckets":["user.2423243","user_alert_dialog.2423243","message_center.2423243","user_settings.2423243","buckets.2423243","device.fake3243E4FEE924","demand_response.fake3243E4FEE924","device_alert_dialog.fake3243E4FEE924","link.fake3243E4FEE924","message.fake3243E4FEE924","metadata.fake3243E4FEE924","schedule.fake3243E4FEE924","shared.fake3243E4FEE924","track.fake3243E4FEE924","tuneups.fake3243E4FEE924","energy_latest.fake3243E4FEE924","energy_weekly.fake3243E4FEE924","diamond_sensor_event.fake3243E4FEE924","diamond_sensor_config.fake3243E4FEE924","structure.0b47dcf0-7c13-11e5-8199-22000b420f99","where.0b47dcf0-7c13-11e5-8199-22000b420f99","utility.0b47dcf0-7c13-11e5-8199-22000b420f99","structure_history.0b47dcf0-7c13-11e5-8199-22000b420f99","trip.0b47dcf0-7c13-11e5-8199-22000b420f99","structure_metadata.0b47dcf0-7c13-11e5-8199-22000b420f99","safety.0b47dcf0-7c13-11e5-8199-22000b420f99","safety_summary.0b47dcf0-7c13-11e5-8199-22000b420f99","geofence_info.0b47dcf0-7c13-11e5-8199-22000b420f99"]}},"track":{"fake3243E4FEE924":{"$version":31457,"$timestamp":1445954075890,"online":false}},"message_center":{"2423243":{"$version":-1,"$timestamp":1325379661000,"messages":[]}},"safety":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":3651,"$timestamp":1445885694252,"audio_self_test_participants":[]}},"utility":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-1,"$timestamp":1}},"where":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":25319,"$timestamp":1445885694015,"wheres":[{"where_id":"00000000-0000-0000-0000-000100000001","name":"Basement"},{"where_id":"00000000-0000-0000-0000-00010000000d","name":"Bedroom"},{"where_id":"00000000-0000-0000-0000-000100000003","name":"Den"},{"where_id":"00000000-0000-0000-0000-000100000010","name":"Dining + Room"},{"where_id":"00000000-0000-0000-0000-000100000006","name":"Downstairs"},{"where_id":"00000000-0000-0000-0000-000100000000","name":"Entryway"},{"where_id":"00000000-0000-0000-0000-00010000000b","name":"Family + Room"},{"where_id":"00000000-0000-0000-0000-000100000002","name":"Hallway"},{"where_id":"00000000-0000-0000-0000-000100000008","name":"Kids + Room"},{"where_id":"00000000-0000-0000-0000-00010000000a","name":"Kitchen"},{"where_id":"00000000-0000-0000-0000-00010000000c","name":"Living + Room"},{"where_id":"00000000-0000-0000-0000-000100000005","name":"Master Bedroom"},{"where_id":"00000000-0000-0000-0000-00010000000e","name":"Office"},{"where_id":"00000000-0000-0000-0000-00010000000f","name":"Upstairs"}]}},"structure":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-9689,"$timestamp":1445956385810,"away_timestamp":1445954700,"away":false,"location":"Palm + Harbor, FL","name":"Chrome App Structure","postal_code":"34683","topaz_away":false,"creation_time":1445885694067,"country_code":"US","away_setter":0,"topaz_hush_key":"FmyQftpkdU9eH9St4mMWhQ==","user":"user.2423243","devices":["device.fake3243E4FEE924"],"swarm":["device.fake3243E4FEE924"],"fabric_ids":[],"clutches":[],"members":[{"user":"user.2423243","roles":["owner"]}]}},"message":{"fake3243E4FEE924":{"$version":-24419,"$timestamp":1445954076171,"1":{"cmd":"register"}}},"tuneups":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1}},"device":{"fake3243E4FEE924":{"$version":-27199,"$timestamp":1445956401831,"heatpump_setback_active":false,"emer_heat_enable":false,"touched_by":{},"local_ip":"192.168.2.4","switch_system_off":false,"away_temperature_high":24.444,"cooling_source":"electric","temperature_lock_high_temp":22.222,"y2_type":"unknown","leaf_threshold_cool":0,"heater_source":"gas","fan_cooling_state":false,"note_codes":[],"compressor_lockout_leaf":-17.8,"has_x3_heat":false,"target_humidity_enabled":false,"heat_x3_source":"electric","alt_heat_delivery":"forced-air","has_x2_heat":false,"fan_mode":"auto","rssi":66,"sunlight_correction_active":false,"emer_heat_delivery":"forced-air","heatpump_savings":"off","pin_y2_description":"none","humidity_control_lockout_end_time":0,"filter_reminder_level":0,"gear_opacity":0,"filter_reminder_enabled":true,"capability_level":4,"schedule_learning_reset":false,"has_x2_cool":false,"hvac_pins":"W1,C,Rh,G","ob_orientation":"O","cooling_delivery":"unknown","range_enable":false,"auto_away_enable":true,"dual_fuel_breakpoint_override":"none","lower_safety_temp_enabled":true,"has_fan":true,"dehumidifier_state":false,"emer_heat_source":"electric","nlclient_state":"","heatpump_ready":false,"cooling_x2_delivery":"unknown","available_locales":"en_US,fr_CA,es_US,en_GB","current_version":"4.1","has_fossil_fuel":true,"learning_state":"slow","pin_ob_description":"none","pin_rh_description":"power","has_alt_heat":false,"safety_temp_activating_hvac":false,"fan_duty_cycle":900,"pin_y1_description":"none","humidifier_state":false,"gear_threshold_high":0,"backplate_serial_number":"02BA01AB241200CW","has_x2_alt_heat":false,"heat_x3_delivery":"forced-air","leaf_threshold_heat":18.334,"is_on_stand":false,"has_emer_heat":false,"learning_mode":true,"leaf_learning":"ready","has_aux_heat":false,"filter_changed_set_date":1386452016,"aux_heat_source":"electric","backplate_bsl_info":"BSL","alt_heat_x2_source":"gas","sunlight_correction_ready":true,"humidifier_type":"unknown","pin_c_description":"power","humidity_control_lockout_start_time":0,"pin_w2aux_description":"none","fan_timer_timeout":0,"country_code":"US","sunlight_correction_enabled":true,"heat_x2_delivery":"forced-air","target_humidity":35,"gear_threshold_low":0,"lower_safety_temp":4.738,"cooling_x2_source":"electric","equipment_type":"electric","heat_pump_aux_threshold":10,"alt_heat_x2_delivery":"forced-air","heat_pump_comp_threshold":-31.5,"learning_days_completed_cool":0,"backplate_bsl_version":"2.1","current_schedule_mode":"HEAT","fan_duty_end_time":68400,"hvac_wires":"Heat,Fan,Common + Wire,Rh","leaf":true,"type":"TBD","pin_g_description":"fan","click_sound":"on","away_temperature_low_enabled":true,"aux_heat_delivery":"forced-air","filter_changed_date":1387065600,"hvac_safety_shutoff_active":false,"heat_pump_comp_threshold_enabled":false,"has_dehumidifier":false,"preconditioning_ready":true,"fan_cooling_enabled":true,"leaf_away_high":28.88,"fan_cooling_readiness":"not + ready","device_locale":"en_US","temperature_scale":"F","battery_level":3.963,"error_code":"","maint_band_upper":0.39,"preconditioning_active":false,"fan_control_state":false,"away_temperature_high_enabled":false,"dehumidifier_fan_activation":false,"learning_days_completed_heat":598,"humidifier_fan_activation":false,"pin_star_description":"none","upper_safety_temp_enabled":false,"dual_fuel_selected":false,"preconditioning_enabled":false,"current_humidity":50,"dual_fuel_breakpoint":-1,"postal_code":"94602","backplate_mono_version":"4.0.20","alt_heat_source":"gas","aux_lockout_leaf":10,"has_heat_pump":false,"heater_delivery":"forced-air","away_temperature_low":12.778,"auto_away_reset":false,"radiant_control_enabled":false,"has_air_filter":true,"temperature_lock":false,"dehumidifier_type":"unknown","time_to_target_training":"training","upper_safety_temp":35,"humidity_control_lockout_enabled":false,"fan_timer_duration":900,"target_time_confidence":0,"pin_w1_description":"heat","temperature_lock_low_temp":20,"where_id":"00000000-0000-0000-0000-000100000001","forced_air":true,"temperature_lock_pin_hash":"","auto_dehum_enabled":false,"leaf_type":1,"backplate_mono_info":"TFE + (BP_D2) 4.0.20 (root@bamboo) 2014-02-03 10:06:33","has_dual_fuel":false,"star_type":"unknown","learning_time":1703,"maint_band_lower":0.39,"creation_time":1420654958512,"has_humidifier":false,"learning_days_completed_range":0,"dehumidifier_orientation_selected":"unknown","leaf_schedule_delta":1.11,"logging_priority":"informational","user_brightness":"medium","leaf_away_low":16.835,"pin_rc_description":"none","auto_dehum_state":false,"serial_number":"80C4887E69DF00D9","heat_x2_source":"electric","mac_address":"18b430093686","fan_duty_start_time":50400,"time_to_target":0,"backplate_model":"Backplate-2.2","heat_link_connection":0,"model_version":"Display-2.1","heat_pump_aux_threshold_enabled":true,"ob_persistence":true,"schedules":[]}},"trip":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":32201,"$timestamp":1445885694252,"trips":[]}},"demand_response":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1}},"user":{"2423243":{"$version":9049,"$timestamp":1445885721137,"email":"test@yahoo.com","name":"test@yahoo.com","structures":["structure.0b47dcf0-7c13-11e5-8199-22000b420f99"],"structure_memberships":[{"structure":"structure.0b47dcf0-7c13-11e5-8199-22000b420f99","roles":["owner"]}]}},"link":{"fake3243E4FEE924":{"$version":10338,"$timestamp":1445954076171,"structure":"structure.0b47dcf0-7c13-11e5-8199-22000b420f99"}},"device_alert_dialog":{"fake3243E4FEE924":{"$version":-9248,"$timestamp":1445954076171,"dialog_data":"","dialog_id":"confirm-pairing"}},"geofence_info":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-31412,"$timestamp":1445885694252,"device_events":[],"fences":[]}},"metadata":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1356998400000,"last_ip":"127.0.0.1","last_connection":1356998400000}},"user_settings":{"2423243":{"$version":31691,"$timestamp":1445354998080,"email_verified":true,"tos_accepted_version":1434564000000,"receive_marketing_emails":true,"receive_nest_emails":true,"receive_support_emails":true,"max_structures":2,"max_thermostats":40,"max_thermostats_per_structure":20,"max_smoke_detectors_per_structure":18,"max_smoke_detectors":36,"max_wwn_devices_per_structure":10,"max_wwn_devices":20,"tos_minimum_version":1434564000000,"tos_current_version":1434564000000,"lang":"en_US"}},"schedule":{"fake3243E4FEE924":{"$version":21638,"$timestamp":1445954075940}},"structure_metadata":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-32678,"$timestamp":1445951380776,"entitlements_api_path":"/api/0.1/structure/0b47dcf0-7c13-11e5-8199-22000b420f99/entitlements?v=8a957eeb-c93a-4e47-aea4-fb31cfc65691"}},"shared":{"fake3243E4FEE924":{"$version":-13990,"$timestamp":1445956397555,"auto_away_learning":"ready","auto_away":0,"hvac_alt_heat_state":false,"compressor_lockout_enabled":false,"hvac_heat_x3_state":false,"target_temperature_type":"heat","hvac_heater_state":false,"can_heat":true,"hvac_emer_heat_state":false,"compressor_lockout_timeout":0,"hvac_cool_x2_state":false,"target_temperature_high":23.33333,"hvac_aux_heater_state":false,"hvac_heat_x2_state":false,"target_temperature_low":23.33333,"hvac_ac_state":false,"target_temperature":22.85,"hvac_fan_state":false,"target_change_pending":true,"name":"E924","current_temperature":21,"hvac_alt_heat_x2_state":false,"can_cool":true}},"safety_summary":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-21456,"$timestamp":1445885694252}}}' + http_version: '1.1' + recorded_at: Tue, 27 Oct 2015 14:34:20 GMT +recorded_with: VCR 2.9.3 diff --git a/fixtures/vcr_cassettes/NestThermostat_Nest/gets_the_relative_humidity.yml b/fixtures/vcr_cassettes/NestThermostat_Nest/gets_the_relative_humidity.yml new file mode 100644 index 0000000..415c835 --- /dev/null +++ b/fixtures/vcr_cassettes/NestThermostat_Nest/gets_the_relative_humidity.yml @@ -0,0 +1,54 @@ +--- +http_interactions: +- request: + method: get + uri: https://on6%DFn7d%AC%A0%B57%D4%F7j9ZD%5B%13g%12%AE%AA7~%FD+gwtO%12%A9%DA%CA%60&Ea%B7%DCp%05%18s%C2&%DD%F4%C2;%D9Bw%09%25I;%BC%D5x%D9:V%E99*rC%B92;4cV%5D%E7%E1%DC%C7%B2%B0%16O%94ZY%B6%20%94X%17%03%ED%1E%91%CC%09tNS(%C9%F2%20%E9%FEY%01%5C%3Cf%A4%E4@czfe09-front01-iad01.transport.home.nest.com/v2/mobile/user.2423243 + body: + encoding: US-ASCII + string: '' + headers: + host: + - czfe09-front01-iad01.transport.home.nest.com + user-agent: + - Nest/1.1.0.10 CFNetwork/548.0.4 + authorization: + - Basic b.2423243.ZKygtTfU92o5WkRbE2cSrqo3fv0rZ3d0TxKp2spgJkVht9xwBRhzwibd9MI72UJ3CSVJO7zVeNk6Vuk5KnJDuTI7NGNWXefh3MeysBZPlFpZtiCUWBcD7R6RzAl0TlMoyfIg6f5ZAVw8ZqTk + x-nl-user-id: + - '2423243' + x-nl-protocol-version: + - '1' + accept-language: + - en-us + connection: + - keep-alive + accept: + - "*/*" + response: + status: + code: 200 + message: OK + headers: + content-type: + - application/json + x-nl-defer-device-window: + - '120' + x-nl-service-timestamp: + - '1445956464308' + content-length: + - '10890' + connection: + - keep-alive + body: + encoding: UTF-8 + string: '{"user_alert_dialog":{"2423243":{"$version":-31019,"$timestamp":1445954076171,"dialog_data":"","dialog_id":"confirm-pairing"}},"buckets":{"2423243":{"$version":12532,"$timestamp":1445956458542,"buckets":["user.2423243","user_alert_dialog.2423243","message_center.2423243","user_settings.2423243","buckets.2423243","device.fake3243E4FEE924","demand_response.fake3243E4FEE924","device_alert_dialog.fake3243E4FEE924","link.fake3243E4FEE924","message.fake3243E4FEE924","metadata.fake3243E4FEE924","schedule.fake3243E4FEE924","shared.fake3243E4FEE924","track.fake3243E4FEE924","tuneups.fake3243E4FEE924","energy_latest.fake3243E4FEE924","energy_weekly.fake3243E4FEE924","diamond_sensor_event.fake3243E4FEE924","diamond_sensor_config.fake3243E4FEE924","structure.0b47dcf0-7c13-11e5-8199-22000b420f99","where.0b47dcf0-7c13-11e5-8199-22000b420f99","utility.0b47dcf0-7c13-11e5-8199-22000b420f99","structure_history.0b47dcf0-7c13-11e5-8199-22000b420f99","trip.0b47dcf0-7c13-11e5-8199-22000b420f99","structure_metadata.0b47dcf0-7c13-11e5-8199-22000b420f99","safety.0b47dcf0-7c13-11e5-8199-22000b420f99","safety_summary.0b47dcf0-7c13-11e5-8199-22000b420f99","geofence_info.0b47dcf0-7c13-11e5-8199-22000b420f99"]}},"track":{"fake3243E4FEE924":{"$version":31457,"$timestamp":1445954075890,"online":false}},"message_center":{"2423243":{"$version":-1,"$timestamp":1325379661000,"messages":[]}},"safety":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":3651,"$timestamp":1445885694252,"audio_self_test_participants":[]}},"utility":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-1,"$timestamp":1}},"where":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":25319,"$timestamp":1445885694015,"wheres":[{"where_id":"00000000-0000-0000-0000-000100000001","name":"Basement"},{"where_id":"00000000-0000-0000-0000-00010000000d","name":"Bedroom"},{"where_id":"00000000-0000-0000-0000-000100000003","name":"Den"},{"where_id":"00000000-0000-0000-0000-000100000010","name":"Dining + Room"},{"where_id":"00000000-0000-0000-0000-000100000006","name":"Downstairs"},{"where_id":"00000000-0000-0000-0000-000100000000","name":"Entryway"},{"where_id":"00000000-0000-0000-0000-00010000000b","name":"Family + Room"},{"where_id":"00000000-0000-0000-0000-000100000002","name":"Hallway"},{"where_id":"00000000-0000-0000-0000-000100000008","name":"Kids + Room"},{"where_id":"00000000-0000-0000-0000-00010000000a","name":"Kitchen"},{"where_id":"00000000-0000-0000-0000-00010000000c","name":"Living + Room"},{"where_id":"00000000-0000-0000-0000-000100000005","name":"Master Bedroom"},{"where_id":"00000000-0000-0000-0000-00010000000e","name":"Office"},{"where_id":"00000000-0000-0000-0000-00010000000f","name":"Upstairs"}]}},"structure":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":15857,"$timestamp":1445956462746,"away_timestamp":1445954700,"away":false,"location":"Palm + Harbor, FL","name":"Chrome App Structure","postal_code":"34683","topaz_away":false,"creation_time":1445885694067,"country_code":"US","away_setter":0,"topaz_hush_key":"FmyQftpkdU9eH9St4mMWhQ==","user":"user.2423243","devices":["device.fake3243E4FEE924"],"swarm":["device.fake3243E4FEE924"],"fabric_ids":[],"clutches":[],"members":[{"user":"user.2423243","roles":["owner"]}]}},"message":{"fake3243E4FEE924":{"$version":-24419,"$timestamp":1445954076171,"1":{"cmd":"register"}}},"tuneups":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1}},"device":{"fake3243E4FEE924":{"$version":-27199,"$timestamp":1445956401831,"heatpump_setback_active":false,"emer_heat_enable":false,"touched_by":{},"local_ip":"192.168.2.4","switch_system_off":false,"away_temperature_high":24.444,"cooling_source":"electric","temperature_lock_high_temp":22.222,"y2_type":"unknown","leaf_threshold_cool":0,"heater_source":"gas","fan_cooling_state":false,"note_codes":[],"compressor_lockout_leaf":-17.8,"has_x3_heat":false,"target_humidity_enabled":false,"heat_x3_source":"electric","alt_heat_delivery":"forced-air","has_x2_heat":false,"fan_mode":"auto","rssi":66,"sunlight_correction_active":false,"emer_heat_delivery":"forced-air","heatpump_savings":"off","pin_y2_description":"none","humidity_control_lockout_end_time":0,"filter_reminder_level":0,"gear_opacity":0,"filter_reminder_enabled":true,"capability_level":4,"schedule_learning_reset":false,"has_x2_cool":false,"hvac_pins":"W1,C,Rh,G","ob_orientation":"O","cooling_delivery":"unknown","range_enable":false,"auto_away_enable":true,"dual_fuel_breakpoint_override":"none","lower_safety_temp_enabled":true,"has_fan":true,"dehumidifier_state":false,"emer_heat_source":"electric","nlclient_state":"","heatpump_ready":false,"cooling_x2_delivery":"unknown","available_locales":"en_US,fr_CA,es_US,en_GB","current_version":"4.1","has_fossil_fuel":true,"learning_state":"slow","pin_ob_description":"none","pin_rh_description":"power","has_alt_heat":false,"safety_temp_activating_hvac":false,"fan_duty_cycle":900,"pin_y1_description":"none","humidifier_state":false,"gear_threshold_high":0,"backplate_serial_number":"02BA01AB241200CW","has_x2_alt_heat":false,"heat_x3_delivery":"forced-air","leaf_threshold_heat":18.334,"is_on_stand":false,"has_emer_heat":false,"learning_mode":true,"leaf_learning":"ready","has_aux_heat":false,"filter_changed_set_date":1386452016,"aux_heat_source":"electric","backplate_bsl_info":"BSL","alt_heat_x2_source":"gas","sunlight_correction_ready":true,"humidifier_type":"unknown","pin_c_description":"power","humidity_control_lockout_start_time":0,"pin_w2aux_description":"none","fan_timer_timeout":0,"country_code":"US","sunlight_correction_enabled":true,"heat_x2_delivery":"forced-air","target_humidity":35,"gear_threshold_low":0,"lower_safety_temp":4.738,"cooling_x2_source":"electric","equipment_type":"electric","heat_pump_aux_threshold":10,"alt_heat_x2_delivery":"forced-air","heat_pump_comp_threshold":-31.5,"learning_days_completed_cool":0,"backplate_bsl_version":"2.1","current_schedule_mode":"HEAT","fan_duty_end_time":68400,"hvac_wires":"Heat,Fan,Common + Wire,Rh","leaf":true,"type":"TBD","pin_g_description":"fan","click_sound":"on","away_temperature_low_enabled":true,"aux_heat_delivery":"forced-air","filter_changed_date":1387065600,"hvac_safety_shutoff_active":false,"heat_pump_comp_threshold_enabled":false,"has_dehumidifier":false,"preconditioning_ready":true,"fan_cooling_enabled":true,"leaf_away_high":28.88,"fan_cooling_readiness":"not + ready","device_locale":"en_US","temperature_scale":"F","battery_level":3.963,"error_code":"","maint_band_upper":0.39,"preconditioning_active":false,"fan_control_state":false,"away_temperature_high_enabled":false,"dehumidifier_fan_activation":false,"learning_days_completed_heat":598,"humidifier_fan_activation":false,"pin_star_description":"none","upper_safety_temp_enabled":false,"dual_fuel_selected":false,"preconditioning_enabled":false,"current_humidity":50,"dual_fuel_breakpoint":-1,"postal_code":"94602","backplate_mono_version":"4.0.20","alt_heat_source":"gas","aux_lockout_leaf":10,"has_heat_pump":false,"heater_delivery":"forced-air","away_temperature_low":12.778,"auto_away_reset":false,"radiant_control_enabled":false,"has_air_filter":true,"temperature_lock":false,"dehumidifier_type":"unknown","time_to_target_training":"training","upper_safety_temp":35,"humidity_control_lockout_enabled":false,"fan_timer_duration":900,"target_time_confidence":0,"pin_w1_description":"heat","temperature_lock_low_temp":20,"where_id":"00000000-0000-0000-0000-000100000001","forced_air":true,"temperature_lock_pin_hash":"","auto_dehum_enabled":false,"leaf_type":1,"backplate_mono_info":"TFE + (BP_D2) 4.0.20 (root@bamboo) 2014-02-03 10:06:33","has_dual_fuel":false,"star_type":"unknown","learning_time":1703,"maint_band_lower":0.39,"creation_time":1420654958512,"has_humidifier":false,"learning_days_completed_range":0,"dehumidifier_orientation_selected":"unknown","leaf_schedule_delta":1.11,"logging_priority":"informational","user_brightness":"medium","leaf_away_low":16.835,"pin_rc_description":"none","auto_dehum_state":false,"serial_number":"80C4887E69DF00D9","heat_x2_source":"electric","mac_address":"18b430093686","fan_duty_start_time":50400,"time_to_target":0,"backplate_model":"Backplate-2.2","heat_link_connection":0,"model_version":"Display-2.1","heat_pump_aux_threshold_enabled":true,"ob_persistence":true,"schedules":[]}},"trip":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":32201,"$timestamp":1445885694252,"trips":[]}},"demand_response":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1}},"user":{"2423243":{"$version":9049,"$timestamp":1445885721137,"email":"test@yahoo.com","name":"test@yahoo.com","structures":["structure.0b47dcf0-7c13-11e5-8199-22000b420f99"],"structure_memberships":[{"structure":"structure.0b47dcf0-7c13-11e5-8199-22000b420f99","roles":["owner"]}]}},"link":{"fake3243E4FEE924":{"$version":10338,"$timestamp":1445954076171,"structure":"structure.0b47dcf0-7c13-11e5-8199-22000b420f99"}},"device_alert_dialog":{"fake3243E4FEE924":{"$version":-9248,"$timestamp":1445954076171,"dialog_data":"","dialog_id":"confirm-pairing"}},"geofence_info":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-31412,"$timestamp":1445885694252,"device_events":[],"fences":[]}},"metadata":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1356998400000,"last_ip":"127.0.0.1","last_connection":1356998400000}},"user_settings":{"2423243":{"$version":31691,"$timestamp":1445354998080,"email_verified":true,"tos_accepted_version":1434564000000,"receive_marketing_emails":true,"receive_nest_emails":true,"receive_support_emails":true,"max_structures":2,"max_thermostats":40,"max_thermostats_per_structure":20,"max_smoke_detectors_per_structure":18,"max_smoke_detectors":36,"max_wwn_devices_per_structure":10,"max_wwn_devices":20,"tos_minimum_version":1434564000000,"tos_current_version":1434564000000,"lang":"en_US"}},"schedule":{"fake3243E4FEE924":{"$version":21638,"$timestamp":1445954075940}},"structure_metadata":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-32678,"$timestamp":1445951380776,"entitlements_api_path":"/api/0.1/structure/0b47dcf0-7c13-11e5-8199-22000b420f99/entitlements?v=8a957eeb-c93a-4e47-aea4-fb31cfc65691"}},"shared":{"fake3243E4FEE924":{"$version":-13990,"$timestamp":1445956397555,"auto_away_learning":"ready","auto_away":0,"hvac_alt_heat_state":false,"compressor_lockout_enabled":false,"hvac_heat_x3_state":false,"target_temperature_type":"heat","hvac_heater_state":false,"can_heat":true,"hvac_emer_heat_state":false,"compressor_lockout_timeout":0,"hvac_cool_x2_state":false,"target_temperature_high":23.33333,"hvac_aux_heater_state":false,"hvac_heat_x2_state":false,"target_temperature_low":23.33333,"hvac_ac_state":false,"target_temperature":22.85,"hvac_fan_state":false,"target_change_pending":true,"name":"E924","current_temperature":21,"hvac_alt_heat_x2_state":false,"can_cool":true}},"safety_summary":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-21456,"$timestamp":1445885694252}}}' + http_version: '1.1' + recorded_at: Tue, 27 Oct 2015 14:34:24 GMT +recorded_with: VCR 2.9.3 diff --git a/fixtures/vcr_cassettes/NestThermostat_Nest/gets_the_status.yml b/fixtures/vcr_cassettes/NestThermostat_Nest/gets_the_status.yml new file mode 100644 index 0000000..22c1d74 --- /dev/null +++ b/fixtures/vcr_cassettes/NestThermostat_Nest/gets_the_status.yml @@ -0,0 +1,54 @@ +--- +http_interactions: +- request: + method: get + uri: https://on6%DFn7d%AC%A0%B57%D4%F7j9ZD%5B%13g%12%AE%AA7~%FD+gwtO%12%A9%DA%CA%60&Ea%B7%DCp%05%18s%C2&%DD%F4%C2;%D9Bw%09%25I;%BC%D5x%D9:V%E99*rC%B92;4cV%5D%E7%E1%DC%C7%B2%B0%16O%94ZY%B6%20%94X%17%03%ED%1E%91%CC%09tNS(%C9%F2%20%E9%FEY%01%5C%3Cf%A4%E4@czfe09-front01-iad01.transport.home.nest.com/v2/mobile/user.2423243 + body: + encoding: US-ASCII + string: '' + headers: + host: + - czfe09-front01-iad01.transport.home.nest.com + user-agent: + - Nest/1.1.0.10 CFNetwork/548.0.4 + authorization: + - Basic b.2423243.ZKygtTfU92o5WkRbE2cSrqo3fv0rZ3d0TxKp2spgJkVht9xwBRhzwibd9MI72UJ3CSVJO7zVeNk6Vuk5KnJDuTI7NGNWXefh3MeysBZPlFpZtiCUWBcD7R6RzAl0TlMoyfIg6f5ZAVw8ZqTk + x-nl-user-id: + - '2423243' + x-nl-protocol-version: + - '1' + accept-language: + - en-us + connection: + - keep-alive + accept: + - "*/*" + response: + status: + code: 200 + message: OK + headers: + content-type: + - application/json + x-nl-defer-device-window: + - '120' + x-nl-service-timestamp: + - '1445956459971' + content-length: + - '10890' + connection: + - keep-alive + body: + encoding: UTF-8 + string: '{"user_alert_dialog":{"2423243":{"$version":-31019,"$timestamp":1445954076171,"dialog_data":"","dialog_id":"confirm-pairing"}},"buckets":{"2423243":{"$version":12532,"$timestamp":1445956458542,"buckets":["user.2423243","user_alert_dialog.2423243","message_center.2423243","user_settings.2423243","buckets.2423243","device.fake3243E4FEE924","demand_response.fake3243E4FEE924","device_alert_dialog.fake3243E4FEE924","link.fake3243E4FEE924","message.fake3243E4FEE924","metadata.fake3243E4FEE924","schedule.fake3243E4FEE924","shared.fake3243E4FEE924","track.fake3243E4FEE924","tuneups.fake3243E4FEE924","energy_latest.fake3243E4FEE924","energy_weekly.fake3243E4FEE924","diamond_sensor_event.fake3243E4FEE924","diamond_sensor_config.fake3243E4FEE924","structure.0b47dcf0-7c13-11e5-8199-22000b420f99","where.0b47dcf0-7c13-11e5-8199-22000b420f99","utility.0b47dcf0-7c13-11e5-8199-22000b420f99","structure_history.0b47dcf0-7c13-11e5-8199-22000b420f99","trip.0b47dcf0-7c13-11e5-8199-22000b420f99","structure_metadata.0b47dcf0-7c13-11e5-8199-22000b420f99","safety.0b47dcf0-7c13-11e5-8199-22000b420f99","safety_summary.0b47dcf0-7c13-11e5-8199-22000b420f99","geofence_info.0b47dcf0-7c13-11e5-8199-22000b420f99"]}},"track":{"fake3243E4FEE924":{"$version":31457,"$timestamp":1445954075890,"online":false}},"message_center":{"2423243":{"$version":-1,"$timestamp":1325379661000,"messages":[]}},"safety":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":3651,"$timestamp":1445885694252,"audio_self_test_participants":[]}},"utility":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-1,"$timestamp":1}},"where":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":25319,"$timestamp":1445885694015,"wheres":[{"where_id":"00000000-0000-0000-0000-000100000001","name":"Basement"},{"where_id":"00000000-0000-0000-0000-00010000000d","name":"Bedroom"},{"where_id":"00000000-0000-0000-0000-000100000003","name":"Den"},{"where_id":"00000000-0000-0000-0000-000100000010","name":"Dining + Room"},{"where_id":"00000000-0000-0000-0000-000100000006","name":"Downstairs"},{"where_id":"00000000-0000-0000-0000-000100000000","name":"Entryway"},{"where_id":"00000000-0000-0000-0000-00010000000b","name":"Family + Room"},{"where_id":"00000000-0000-0000-0000-000100000002","name":"Hallway"},{"where_id":"00000000-0000-0000-0000-000100000008","name":"Kids + Room"},{"where_id":"00000000-0000-0000-0000-00010000000a","name":"Kitchen"},{"where_id":"00000000-0000-0000-0000-00010000000c","name":"Living + Room"},{"where_id":"00000000-0000-0000-0000-000100000005","name":"Master Bedroom"},{"where_id":"00000000-0000-0000-0000-00010000000e","name":"Office"},{"where_id":"00000000-0000-0000-0000-00010000000f","name":"Upstairs"}]}},"structure":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-9689,"$timestamp":1445956385810,"away_timestamp":1445954700,"away":false,"location":"Palm + Harbor, FL","name":"Chrome App Structure","postal_code":"34683","topaz_away":false,"creation_time":1445885694067,"country_code":"US","away_setter":0,"topaz_hush_key":"FmyQftpkdU9eH9St4mMWhQ==","user":"user.2423243","devices":["device.fake3243E4FEE924"],"swarm":["device.fake3243E4FEE924"],"fabric_ids":[],"clutches":[],"members":[{"user":"user.2423243","roles":["owner"]}]}},"message":{"fake3243E4FEE924":{"$version":-24419,"$timestamp":1445954076171,"1":{"cmd":"register"}}},"tuneups":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1}},"device":{"fake3243E4FEE924":{"$version":-27199,"$timestamp":1445956401831,"heatpump_setback_active":false,"emer_heat_enable":false,"touched_by":{},"local_ip":"192.168.2.4","switch_system_off":false,"away_temperature_high":24.444,"cooling_source":"electric","temperature_lock_high_temp":22.222,"y2_type":"unknown","leaf_threshold_cool":0,"heater_source":"gas","fan_cooling_state":false,"note_codes":[],"compressor_lockout_leaf":-17.8,"has_x3_heat":false,"target_humidity_enabled":false,"heat_x3_source":"electric","alt_heat_delivery":"forced-air","has_x2_heat":false,"fan_mode":"auto","rssi":66,"sunlight_correction_active":false,"emer_heat_delivery":"forced-air","heatpump_savings":"off","pin_y2_description":"none","humidity_control_lockout_end_time":0,"filter_reminder_level":0,"gear_opacity":0,"filter_reminder_enabled":true,"capability_level":4,"schedule_learning_reset":false,"has_x2_cool":false,"hvac_pins":"W1,C,Rh,G","ob_orientation":"O","cooling_delivery":"unknown","range_enable":false,"auto_away_enable":true,"dual_fuel_breakpoint_override":"none","lower_safety_temp_enabled":true,"has_fan":true,"dehumidifier_state":false,"emer_heat_source":"electric","nlclient_state":"","heatpump_ready":false,"cooling_x2_delivery":"unknown","available_locales":"en_US,fr_CA,es_US,en_GB","current_version":"4.1","has_fossil_fuel":true,"learning_state":"slow","pin_ob_description":"none","pin_rh_description":"power","has_alt_heat":false,"safety_temp_activating_hvac":false,"fan_duty_cycle":900,"pin_y1_description":"none","humidifier_state":false,"gear_threshold_high":0,"backplate_serial_number":"02BA01AB241200CW","has_x2_alt_heat":false,"heat_x3_delivery":"forced-air","leaf_threshold_heat":18.334,"is_on_stand":false,"has_emer_heat":false,"learning_mode":true,"leaf_learning":"ready","has_aux_heat":false,"filter_changed_set_date":1386452016,"aux_heat_source":"electric","backplate_bsl_info":"BSL","alt_heat_x2_source":"gas","sunlight_correction_ready":true,"humidifier_type":"unknown","pin_c_description":"power","humidity_control_lockout_start_time":0,"pin_w2aux_description":"none","fan_timer_timeout":0,"country_code":"US","sunlight_correction_enabled":true,"heat_x2_delivery":"forced-air","target_humidity":35,"gear_threshold_low":0,"lower_safety_temp":4.738,"cooling_x2_source":"electric","equipment_type":"electric","heat_pump_aux_threshold":10,"alt_heat_x2_delivery":"forced-air","heat_pump_comp_threshold":-31.5,"learning_days_completed_cool":0,"backplate_bsl_version":"2.1","current_schedule_mode":"HEAT","fan_duty_end_time":68400,"hvac_wires":"Heat,Fan,Common + Wire,Rh","leaf":true,"type":"TBD","pin_g_description":"fan","click_sound":"on","away_temperature_low_enabled":true,"aux_heat_delivery":"forced-air","filter_changed_date":1387065600,"hvac_safety_shutoff_active":false,"heat_pump_comp_threshold_enabled":false,"has_dehumidifier":false,"preconditioning_ready":true,"fan_cooling_enabled":true,"leaf_away_high":28.88,"fan_cooling_readiness":"not + ready","device_locale":"en_US","temperature_scale":"F","battery_level":3.963,"error_code":"","maint_band_upper":0.39,"preconditioning_active":false,"fan_control_state":false,"away_temperature_high_enabled":false,"dehumidifier_fan_activation":false,"learning_days_completed_heat":598,"humidifier_fan_activation":false,"pin_star_description":"none","upper_safety_temp_enabled":false,"dual_fuel_selected":false,"preconditioning_enabled":false,"current_humidity":50,"dual_fuel_breakpoint":-1,"postal_code":"94602","backplate_mono_version":"4.0.20","alt_heat_source":"gas","aux_lockout_leaf":10,"has_heat_pump":false,"heater_delivery":"forced-air","away_temperature_low":12.778,"auto_away_reset":false,"radiant_control_enabled":false,"has_air_filter":true,"temperature_lock":false,"dehumidifier_type":"unknown","time_to_target_training":"training","upper_safety_temp":35,"humidity_control_lockout_enabled":false,"fan_timer_duration":900,"target_time_confidence":0,"pin_w1_description":"heat","temperature_lock_low_temp":20,"where_id":"00000000-0000-0000-0000-000100000001","forced_air":true,"temperature_lock_pin_hash":"","auto_dehum_enabled":false,"leaf_type":1,"backplate_mono_info":"TFE + (BP_D2) 4.0.20 (root@bamboo) 2014-02-03 10:06:33","has_dual_fuel":false,"star_type":"unknown","learning_time":1703,"maint_band_lower":0.39,"creation_time":1420654958512,"has_humidifier":false,"learning_days_completed_range":0,"dehumidifier_orientation_selected":"unknown","leaf_schedule_delta":1.11,"logging_priority":"informational","user_brightness":"medium","leaf_away_low":16.835,"pin_rc_description":"none","auto_dehum_state":false,"serial_number":"80C4887E69DF00D9","heat_x2_source":"electric","mac_address":"18b430093686","fan_duty_start_time":50400,"time_to_target":0,"backplate_model":"Backplate-2.2","heat_link_connection":0,"model_version":"Display-2.1","heat_pump_aux_threshold_enabled":true,"ob_persistence":true,"schedules":[]}},"trip":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":32201,"$timestamp":1445885694252,"trips":[]}},"demand_response":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1}},"user":{"2423243":{"$version":9049,"$timestamp":1445885721137,"email":"test@yahoo.com","name":"test@yahoo.com","structures":["structure.0b47dcf0-7c13-11e5-8199-22000b420f99"],"structure_memberships":[{"structure":"structure.0b47dcf0-7c13-11e5-8199-22000b420f99","roles":["owner"]}]}},"link":{"fake3243E4FEE924":{"$version":10338,"$timestamp":1445954076171,"structure":"structure.0b47dcf0-7c13-11e5-8199-22000b420f99"}},"device_alert_dialog":{"fake3243E4FEE924":{"$version":-9248,"$timestamp":1445954076171,"dialog_data":"","dialog_id":"confirm-pairing"}},"geofence_info":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-31412,"$timestamp":1445885694252,"device_events":[],"fences":[]}},"metadata":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1356998400000,"last_ip":"127.0.0.1","last_connection":1356998400000}},"user_settings":{"2423243":{"$version":31691,"$timestamp":1445354998080,"email_verified":true,"tos_accepted_version":1434564000000,"receive_marketing_emails":true,"receive_nest_emails":true,"receive_support_emails":true,"max_structures":2,"max_thermostats":40,"max_thermostats_per_structure":20,"max_smoke_detectors_per_structure":18,"max_smoke_detectors":36,"max_wwn_devices_per_structure":10,"max_wwn_devices":20,"tos_minimum_version":1434564000000,"tos_current_version":1434564000000,"lang":"en_US"}},"schedule":{"fake3243E4FEE924":{"$version":21638,"$timestamp":1445954075940}},"structure_metadata":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-32678,"$timestamp":1445951380776,"entitlements_api_path":"/api/0.1/structure/0b47dcf0-7c13-11e5-8199-22000b420f99/entitlements?v=8a957eeb-c93a-4e47-aea4-fb31cfc65691"}},"shared":{"fake3243E4FEE924":{"$version":-13990,"$timestamp":1445956397555,"auto_away_learning":"ready","auto_away":0,"hvac_alt_heat_state":false,"compressor_lockout_enabled":false,"hvac_heat_x3_state":false,"target_temperature_type":"heat","hvac_heater_state":false,"can_heat":true,"hvac_emer_heat_state":false,"compressor_lockout_timeout":0,"hvac_cool_x2_state":false,"target_temperature_high":23.33333,"hvac_aux_heater_state":false,"hvac_heat_x2_state":false,"target_temperature_low":23.33333,"hvac_ac_state":false,"target_temperature":22.85,"hvac_fan_state":false,"target_change_pending":true,"name":"E924","current_temperature":21,"hvac_alt_heat_x2_state":false,"can_cool":true}},"safety_summary":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-21456,"$timestamp":1445885694252}}}' + http_version: '1.1' + recorded_at: Tue, 27 Oct 2015 14:34:20 GMT +recorded_with: VCR 2.9.3 diff --git a/fixtures/vcr_cassettes/NestThermostat_Nest/gets_the_target_temperature_time.yml b/fixtures/vcr_cassettes/NestThermostat_Nest/gets_the_target_temperature_time.yml new file mode 100644 index 0000000..8f48e6f --- /dev/null +++ b/fixtures/vcr_cassettes/NestThermostat_Nest/gets_the_target_temperature_time.yml @@ -0,0 +1,105 @@ +--- +http_interactions: +- request: + method: get + uri: https://on6%DFn7d%AC%A0%B57%D4%F7j9ZD%5B%13g%12%AE%AA7~%FD+gwtO%12%A9%DA%CA%60&Ea%B7%DCp%05%18s%C2&%DD%F4%C2;%D9Bw%09%25I;%BC%D5x%D9:V%E99*rC%B92;4cV%5D%E7%E1%DC%C7%B2%B0%16O%94ZY%B6%20%94X%17%03%ED%1E%91%CC%09tNS(%C9%F2%20%E9%FEY%01%5C%3Cf%A4%E4@czfe09-front01-iad01.transport.home.nest.com/v2/mobile/user.2423243 + body: + encoding: US-ASCII + string: '' + headers: + host: + - czfe09-front01-iad01.transport.home.nest.com + user-agent: + - Nest/1.1.0.10 CFNetwork/548.0.4 + authorization: + - Basic b.2423243.ZKygtTfU92o5WkRbE2cSrqo3fv0rZ3d0TxKp2spgJkVht9xwBRhzwibd9MI72UJ3CSVJO7zVeNk6Vuk5KnJDuTI7NGNWXefh3MeysBZPlFpZtiCUWBcD7R6RzAl0TlMoyfIg6f5ZAVw8ZqTk + x-nl-user-id: + - '2423243' + x-nl-protocol-version: + - '1' + accept-language: + - en-us + connection: + - keep-alive + accept: + - "*/*" + response: + status: + code: 200 + message: OK + headers: + content-type: + - application/json + x-nl-defer-device-window: + - '120' + x-nl-service-timestamp: + - '1445956472643' + content-length: + - '10890' + connection: + - keep-alive + body: + encoding: UTF-8 + string: '{"user_alert_dialog":{"2423243":{"$version":-31019,"$timestamp":1445954076171,"dialog_data":"","dialog_id":"confirm-pairing"}},"buckets":{"2423243":{"$version":12532,"$timestamp":1445956458542,"buckets":["user.2423243","user_alert_dialog.2423243","message_center.2423243","user_settings.2423243","buckets.2423243","device.fake3243E4FEE924","demand_response.fake3243E4FEE924","device_alert_dialog.fake3243E4FEE924","link.fake3243E4FEE924","message.fake3243E4FEE924","metadata.fake3243E4FEE924","schedule.fake3243E4FEE924","shared.fake3243E4FEE924","track.fake3243E4FEE924","tuneups.fake3243E4FEE924","energy_latest.fake3243E4FEE924","energy_weekly.fake3243E4FEE924","diamond_sensor_event.fake3243E4FEE924","diamond_sensor_config.fake3243E4FEE924","structure.0b47dcf0-7c13-11e5-8199-22000b420f99","where.0b47dcf0-7c13-11e5-8199-22000b420f99","utility.0b47dcf0-7c13-11e5-8199-22000b420f99","structure_history.0b47dcf0-7c13-11e5-8199-22000b420f99","trip.0b47dcf0-7c13-11e5-8199-22000b420f99","structure_metadata.0b47dcf0-7c13-11e5-8199-22000b420f99","safety.0b47dcf0-7c13-11e5-8199-22000b420f99","safety_summary.0b47dcf0-7c13-11e5-8199-22000b420f99","geofence_info.0b47dcf0-7c13-11e5-8199-22000b420f99"]}},"track":{"fake3243E4FEE924":{"$version":31457,"$timestamp":1445954075890,"online":false}},"message_center":{"2423243":{"$version":-1,"$timestamp":1325379661000,"messages":[]}},"safety":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":3651,"$timestamp":1445885694252,"audio_self_test_participants":[]}},"utility":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-1,"$timestamp":1}},"where":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":25319,"$timestamp":1445885694015,"wheres":[{"where_id":"00000000-0000-0000-0000-000100000001","name":"Basement"},{"where_id":"00000000-0000-0000-0000-00010000000d","name":"Bedroom"},{"where_id":"00000000-0000-0000-0000-000100000003","name":"Den"},{"where_id":"00000000-0000-0000-0000-000100000010","name":"Dining + Room"},{"where_id":"00000000-0000-0000-0000-000100000006","name":"Downstairs"},{"where_id":"00000000-0000-0000-0000-000100000000","name":"Entryway"},{"where_id":"00000000-0000-0000-0000-00010000000b","name":"Family + Room"},{"where_id":"00000000-0000-0000-0000-000100000002","name":"Hallway"},{"where_id":"00000000-0000-0000-0000-000100000008","name":"Kids + Room"},{"where_id":"00000000-0000-0000-0000-00010000000a","name":"Kitchen"},{"where_id":"00000000-0000-0000-0000-00010000000c","name":"Living + Room"},{"where_id":"00000000-0000-0000-0000-000100000005","name":"Master Bedroom"},{"where_id":"00000000-0000-0000-0000-00010000000e","name":"Office"},{"where_id":"00000000-0000-0000-0000-00010000000f","name":"Upstairs"}]}},"structure":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":15857,"$timestamp":1445956462746,"away_timestamp":1445954700,"away":false,"location":"Palm + Harbor, FL","name":"Chrome App Structure","postal_code":"34683","topaz_away":false,"creation_time":1445885694067,"country_code":"US","away_setter":0,"topaz_hush_key":"FmyQftpkdU9eH9St4mMWhQ==","user":"user.2423243","devices":["device.fake3243E4FEE924"],"swarm":["device.fake3243E4FEE924"],"fabric_ids":[],"clutches":[],"members":[{"user":"user.2423243","roles":["owner"]}]}},"message":{"fake3243E4FEE924":{"$version":-24419,"$timestamp":1445954076171,"1":{"cmd":"register"}}},"tuneups":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1}},"device":{"fake3243E4FEE924":{"$version":-27199,"$timestamp":1445956401831,"heatpump_setback_active":false,"emer_heat_enable":false,"touched_by":{},"local_ip":"192.168.2.4","switch_system_off":false,"away_temperature_high":24.444,"cooling_source":"electric","temperature_lock_high_temp":22.222,"y2_type":"unknown","leaf_threshold_cool":0,"heater_source":"gas","fan_cooling_state":false,"note_codes":[],"compressor_lockout_leaf":-17.8,"has_x3_heat":false,"target_humidity_enabled":false,"heat_x3_source":"electric","alt_heat_delivery":"forced-air","has_x2_heat":false,"fan_mode":"auto","rssi":66,"sunlight_correction_active":false,"emer_heat_delivery":"forced-air","heatpump_savings":"off","pin_y2_description":"none","humidity_control_lockout_end_time":0,"filter_reminder_level":0,"gear_opacity":0,"filter_reminder_enabled":true,"capability_level":4,"schedule_learning_reset":false,"has_x2_cool":false,"hvac_pins":"W1,C,Rh,G","ob_orientation":"O","cooling_delivery":"unknown","range_enable":false,"auto_away_enable":true,"dual_fuel_breakpoint_override":"none","lower_safety_temp_enabled":true,"has_fan":true,"dehumidifier_state":false,"emer_heat_source":"electric","nlclient_state":"","heatpump_ready":false,"cooling_x2_delivery":"unknown","available_locales":"en_US,fr_CA,es_US,en_GB","current_version":"4.1","has_fossil_fuel":true,"learning_state":"slow","pin_ob_description":"none","pin_rh_description":"power","has_alt_heat":false,"safety_temp_activating_hvac":false,"fan_duty_cycle":900,"pin_y1_description":"none","humidifier_state":false,"gear_threshold_high":0,"backplate_serial_number":"02BA01AB241200CW","has_x2_alt_heat":false,"heat_x3_delivery":"forced-air","leaf_threshold_heat":18.334,"is_on_stand":false,"has_emer_heat":false,"learning_mode":true,"leaf_learning":"ready","has_aux_heat":false,"filter_changed_set_date":1386452016,"aux_heat_source":"electric","backplate_bsl_info":"BSL","alt_heat_x2_source":"gas","sunlight_correction_ready":true,"humidifier_type":"unknown","pin_c_description":"power","humidity_control_lockout_start_time":0,"pin_w2aux_description":"none","fan_timer_timeout":0,"country_code":"US","sunlight_correction_enabled":true,"heat_x2_delivery":"forced-air","target_humidity":35,"gear_threshold_low":0,"lower_safety_temp":4.738,"cooling_x2_source":"electric","equipment_type":"electric","heat_pump_aux_threshold":10,"alt_heat_x2_delivery":"forced-air","heat_pump_comp_threshold":-31.5,"learning_days_completed_cool":0,"backplate_bsl_version":"2.1","current_schedule_mode":"HEAT","fan_duty_end_time":68400,"hvac_wires":"Heat,Fan,Common + Wire,Rh","leaf":true,"type":"TBD","pin_g_description":"fan","click_sound":"on","away_temperature_low_enabled":true,"aux_heat_delivery":"forced-air","filter_changed_date":1387065600,"hvac_safety_shutoff_active":false,"heat_pump_comp_threshold_enabled":false,"has_dehumidifier":false,"preconditioning_ready":true,"fan_cooling_enabled":true,"leaf_away_high":28.88,"fan_cooling_readiness":"not + ready","device_locale":"en_US","temperature_scale":"F","battery_level":3.963,"error_code":"","maint_band_upper":0.39,"preconditioning_active":false,"fan_control_state":false,"away_temperature_high_enabled":false,"dehumidifier_fan_activation":false,"learning_days_completed_heat":598,"humidifier_fan_activation":false,"pin_star_description":"none","upper_safety_temp_enabled":false,"dual_fuel_selected":false,"preconditioning_enabled":false,"current_humidity":50,"dual_fuel_breakpoint":-1,"postal_code":"94602","backplate_mono_version":"4.0.20","alt_heat_source":"gas","aux_lockout_leaf":10,"has_heat_pump":false,"heater_delivery":"forced-air","away_temperature_low":12.778,"auto_away_reset":false,"radiant_control_enabled":false,"has_air_filter":true,"temperature_lock":false,"dehumidifier_type":"unknown","time_to_target_training":"training","upper_safety_temp":35,"humidity_control_lockout_enabled":false,"fan_timer_duration":900,"target_time_confidence":0,"pin_w1_description":"heat","temperature_lock_low_temp":20,"where_id":"00000000-0000-0000-0000-000100000001","forced_air":true,"temperature_lock_pin_hash":"","auto_dehum_enabled":false,"leaf_type":1,"backplate_mono_info":"TFE + (BP_D2) 4.0.20 (root@bamboo) 2014-02-03 10:06:33","has_dual_fuel":false,"star_type":"unknown","learning_time":1703,"maint_band_lower":0.39,"creation_time":1420654958512,"has_humidifier":false,"learning_days_completed_range":0,"dehumidifier_orientation_selected":"unknown","leaf_schedule_delta":1.11,"logging_priority":"informational","user_brightness":"medium","leaf_away_low":16.835,"pin_rc_description":"none","auto_dehum_state":false,"serial_number":"80C4887E69DF00D9","heat_x2_source":"electric","mac_address":"18b430093686","fan_duty_start_time":50400,"time_to_target":0,"backplate_model":"Backplate-2.2","heat_link_connection":0,"model_version":"Display-2.1","heat_pump_aux_threshold_enabled":true,"ob_persistence":true,"schedules":[]}},"trip":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":32201,"$timestamp":1445885694252,"trips":[]}},"demand_response":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1}},"user":{"2423243":{"$version":9049,"$timestamp":1445885721137,"email":"test@yahoo.com","name":"test@yahoo.com","structures":["structure.0b47dcf0-7c13-11e5-8199-22000b420f99"],"structure_memberships":[{"structure":"structure.0b47dcf0-7c13-11e5-8199-22000b420f99","roles":["owner"]}]}},"link":{"fake3243E4FEE924":{"$version":10338,"$timestamp":1445954076171,"structure":"structure.0b47dcf0-7c13-11e5-8199-22000b420f99"}},"device_alert_dialog":{"fake3243E4FEE924":{"$version":-9248,"$timestamp":1445954076171,"dialog_data":"","dialog_id":"confirm-pairing"}},"geofence_info":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-31412,"$timestamp":1445885694252,"device_events":[],"fences":[]}},"metadata":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1356998400000,"last_ip":"127.0.0.1","last_connection":1356998400000}},"user_settings":{"2423243":{"$version":31691,"$timestamp":1445354998080,"email_verified":true,"tos_accepted_version":1434564000000,"receive_marketing_emails":true,"receive_nest_emails":true,"receive_support_emails":true,"max_structures":2,"max_thermostats":40,"max_thermostats_per_structure":20,"max_smoke_detectors_per_structure":18,"max_smoke_detectors":36,"max_wwn_devices_per_structure":10,"max_wwn_devices":20,"tos_minimum_version":1434564000000,"tos_current_version":1434564000000,"lang":"en_US"}},"schedule":{"fake3243E4FEE924":{"$version":21638,"$timestamp":1445954075940}},"structure_metadata":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-32678,"$timestamp":1445951380776,"entitlements_api_path":"/api/0.1/structure/0b47dcf0-7c13-11e5-8199-22000b420f99/entitlements?v=8a957eeb-c93a-4e47-aea4-fb31cfc65691"}},"shared":{"fake3243E4FEE924":{"$version":-22003,"$timestamp":1445956471869,"auto_away_learning":"ready","auto_away":0,"hvac_alt_heat_state":false,"compressor_lockout_enabled":false,"hvac_heat_x3_state":false,"target_temperature_type":"heat","hvac_heater_state":false,"can_heat":true,"hvac_emer_heat_state":false,"compressor_lockout_timeout":0,"hvac_cool_x2_state":false,"target_temperature_high":23.33333,"hvac_aux_heater_state":false,"hvac_heat_x2_state":false,"target_temperature_low":23.33333,"hvac_ac_state":false,"target_temperature":22.85,"hvac_fan_state":false,"target_change_pending":true,"name":"E924","current_temperature":21,"hvac_alt_heat_x2_state":false,"can_cool":true}},"safety_summary":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-21456,"$timestamp":1445885694252}}}' + http_version: '1.1' + recorded_at: Tue, 27 Oct 2015 14:34:33 GMT +- request: + method: get + uri: https://on6%DFn7d%AC%A0%B57%D4%F7j9ZD%5B%13g%12%AE%AA7~%FD+gwtO%12%A9%DA%CA%60&Ea%B7%DCp%05%18s%C2&%DD%F4%C2;%D9Bw%09%25I;%BC%D5x%D9:V%E99*rC%B92;4cV%5D%E7%E1%DC%C7%B2%B0%16O%94ZY%B6%20%94X%17%03%ED%1E%91%CC%09tNS(%C9%F2%20%E9%FEY%01%5C%3Cf%A4%E4@czfe09-front01-iad01.transport.home.nest.com/v2/mobile/user.2423243 + body: + encoding: US-ASCII + string: '' + headers: + host: + - czfe09-front01-iad01.transport.home.nest.com + user-agent: + - Nest/1.1.0.10 CFNetwork/548.0.4 + authorization: + - Basic b.2423243.ZKygtTfU92o5WkRbE2cSrqo3fv0rZ3d0TxKp2spgJkVht9xwBRhzwibd9MI72UJ3CSVJO7zVeNk6Vuk5KnJDuTI7NGNWXefh3MeysBZPlFpZtiCUWBcD7R6RzAl0TlMoyfIg6f5ZAVw8ZqTk + x-nl-user-id: + - '2423243' + x-nl-protocol-version: + - '1' + accept-language: + - en-us + connection: + - keep-alive + accept: + - "*/*" + response: + status: + code: 200 + message: OK + headers: + content-type: + - application/json + x-nl-defer-device-window: + - '120' + x-nl-service-timestamp: + - '1445956473065' + content-length: + - '10890' + connection: + - keep-alive + body: + encoding: UTF-8 + string: '{"user_alert_dialog":{"2423243":{"$version":-31019,"$timestamp":1445954076171,"dialog_data":"","dialog_id":"confirm-pairing"}},"buckets":{"2423243":{"$version":12532,"$timestamp":1445956458542,"buckets":["user.2423243","user_alert_dialog.2423243","message_center.2423243","user_settings.2423243","buckets.2423243","device.fake3243E4FEE924","demand_response.fake3243E4FEE924","device_alert_dialog.fake3243E4FEE924","link.fake3243E4FEE924","message.fake3243E4FEE924","metadata.fake3243E4FEE924","schedule.fake3243E4FEE924","shared.fake3243E4FEE924","track.fake3243E4FEE924","tuneups.fake3243E4FEE924","energy_latest.fake3243E4FEE924","energy_weekly.fake3243E4FEE924","diamond_sensor_event.fake3243E4FEE924","diamond_sensor_config.fake3243E4FEE924","structure.0b47dcf0-7c13-11e5-8199-22000b420f99","where.0b47dcf0-7c13-11e5-8199-22000b420f99","utility.0b47dcf0-7c13-11e5-8199-22000b420f99","structure_history.0b47dcf0-7c13-11e5-8199-22000b420f99","trip.0b47dcf0-7c13-11e5-8199-22000b420f99","structure_metadata.0b47dcf0-7c13-11e5-8199-22000b420f99","safety.0b47dcf0-7c13-11e5-8199-22000b420f99","safety_summary.0b47dcf0-7c13-11e5-8199-22000b420f99","geofence_info.0b47dcf0-7c13-11e5-8199-22000b420f99"]}},"track":{"fake3243E4FEE924":{"$version":31457,"$timestamp":1445954075890,"online":false}},"message_center":{"2423243":{"$version":-1,"$timestamp":1325379661000,"messages":[]}},"safety":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":3651,"$timestamp":1445885694252,"audio_self_test_participants":[]}},"utility":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-1,"$timestamp":1}},"where":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":25319,"$timestamp":1445885694015,"wheres":[{"where_id":"00000000-0000-0000-0000-000100000001","name":"Basement"},{"where_id":"00000000-0000-0000-0000-00010000000d","name":"Bedroom"},{"where_id":"00000000-0000-0000-0000-000100000003","name":"Den"},{"where_id":"00000000-0000-0000-0000-000100000010","name":"Dining + Room"},{"where_id":"00000000-0000-0000-0000-000100000006","name":"Downstairs"},{"where_id":"00000000-0000-0000-0000-000100000000","name":"Entryway"},{"where_id":"00000000-0000-0000-0000-00010000000b","name":"Family + Room"},{"where_id":"00000000-0000-0000-0000-000100000002","name":"Hallway"},{"where_id":"00000000-0000-0000-0000-000100000008","name":"Kids + Room"},{"where_id":"00000000-0000-0000-0000-00010000000a","name":"Kitchen"},{"where_id":"00000000-0000-0000-0000-00010000000c","name":"Living + Room"},{"where_id":"00000000-0000-0000-0000-000100000005","name":"Master Bedroom"},{"where_id":"00000000-0000-0000-0000-00010000000e","name":"Office"},{"where_id":"00000000-0000-0000-0000-00010000000f","name":"Upstairs"}]}},"structure":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":15857,"$timestamp":1445956462746,"away_timestamp":1445954700,"away":false,"location":"Palm + Harbor, FL","name":"Chrome App Structure","postal_code":"34683","topaz_away":false,"creation_time":1445885694067,"country_code":"US","away_setter":0,"topaz_hush_key":"FmyQftpkdU9eH9St4mMWhQ==","user":"user.2423243","devices":["device.fake3243E4FEE924"],"swarm":["device.fake3243E4FEE924"],"fabric_ids":[],"clutches":[],"members":[{"user":"user.2423243","roles":["owner"]}]}},"message":{"fake3243E4FEE924":{"$version":-24419,"$timestamp":1445954076171,"1":{"cmd":"register"}}},"tuneups":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1}},"device":{"fake3243E4FEE924":{"$version":-27199,"$timestamp":1445956401831,"heatpump_setback_active":false,"emer_heat_enable":false,"touched_by":{},"local_ip":"192.168.2.4","switch_system_off":false,"away_temperature_high":24.444,"cooling_source":"electric","temperature_lock_high_temp":22.222,"y2_type":"unknown","leaf_threshold_cool":0,"heater_source":"gas","fan_cooling_state":false,"note_codes":[],"compressor_lockout_leaf":-17.8,"has_x3_heat":false,"target_humidity_enabled":false,"heat_x3_source":"electric","alt_heat_delivery":"forced-air","has_x2_heat":false,"fan_mode":"auto","rssi":66,"sunlight_correction_active":false,"emer_heat_delivery":"forced-air","heatpump_savings":"off","pin_y2_description":"none","humidity_control_lockout_end_time":0,"filter_reminder_level":0,"gear_opacity":0,"filter_reminder_enabled":true,"capability_level":4,"schedule_learning_reset":false,"has_x2_cool":false,"hvac_pins":"W1,C,Rh,G","ob_orientation":"O","cooling_delivery":"unknown","range_enable":false,"auto_away_enable":true,"dual_fuel_breakpoint_override":"none","lower_safety_temp_enabled":true,"has_fan":true,"dehumidifier_state":false,"emer_heat_source":"electric","nlclient_state":"","heatpump_ready":false,"cooling_x2_delivery":"unknown","available_locales":"en_US,fr_CA,es_US,en_GB","current_version":"4.1","has_fossil_fuel":true,"learning_state":"slow","pin_ob_description":"none","pin_rh_description":"power","has_alt_heat":false,"safety_temp_activating_hvac":false,"fan_duty_cycle":900,"pin_y1_description":"none","humidifier_state":false,"gear_threshold_high":0,"backplate_serial_number":"02BA01AB241200CW","has_x2_alt_heat":false,"heat_x3_delivery":"forced-air","leaf_threshold_heat":18.334,"is_on_stand":false,"has_emer_heat":false,"learning_mode":true,"leaf_learning":"ready","has_aux_heat":false,"filter_changed_set_date":1386452016,"aux_heat_source":"electric","backplate_bsl_info":"BSL","alt_heat_x2_source":"gas","sunlight_correction_ready":true,"humidifier_type":"unknown","pin_c_description":"power","humidity_control_lockout_start_time":0,"pin_w2aux_description":"none","fan_timer_timeout":0,"country_code":"US","sunlight_correction_enabled":true,"heat_x2_delivery":"forced-air","target_humidity":35,"gear_threshold_low":0,"lower_safety_temp":4.738,"cooling_x2_source":"electric","equipment_type":"electric","heat_pump_aux_threshold":10,"alt_heat_x2_delivery":"forced-air","heat_pump_comp_threshold":-31.5,"learning_days_completed_cool":0,"backplate_bsl_version":"2.1","current_schedule_mode":"HEAT","fan_duty_end_time":68400,"hvac_wires":"Heat,Fan,Common + Wire,Rh","leaf":true,"type":"TBD","pin_g_description":"fan","click_sound":"on","away_temperature_low_enabled":true,"aux_heat_delivery":"forced-air","filter_changed_date":1387065600,"hvac_safety_shutoff_active":false,"heat_pump_comp_threshold_enabled":false,"has_dehumidifier":false,"preconditioning_ready":true,"fan_cooling_enabled":true,"leaf_away_high":28.88,"fan_cooling_readiness":"not + ready","device_locale":"en_US","temperature_scale":"F","battery_level":3.963,"error_code":"","maint_band_upper":0.39,"preconditioning_active":false,"fan_control_state":false,"away_temperature_high_enabled":false,"dehumidifier_fan_activation":false,"learning_days_completed_heat":598,"humidifier_fan_activation":false,"pin_star_description":"none","upper_safety_temp_enabled":false,"dual_fuel_selected":false,"preconditioning_enabled":false,"current_humidity":50,"dual_fuel_breakpoint":-1,"postal_code":"94602","backplate_mono_version":"4.0.20","alt_heat_source":"gas","aux_lockout_leaf":10,"has_heat_pump":false,"heater_delivery":"forced-air","away_temperature_low":12.778,"auto_away_reset":false,"radiant_control_enabled":false,"has_air_filter":true,"temperature_lock":false,"dehumidifier_type":"unknown","time_to_target_training":"training","upper_safety_temp":35,"humidity_control_lockout_enabled":false,"fan_timer_duration":900,"target_time_confidence":0,"pin_w1_description":"heat","temperature_lock_low_temp":20,"where_id":"00000000-0000-0000-0000-000100000001","forced_air":true,"temperature_lock_pin_hash":"","auto_dehum_enabled":false,"leaf_type":1,"backplate_mono_info":"TFE + (BP_D2) 4.0.20 (root@bamboo) 2014-02-03 10:06:33","has_dual_fuel":false,"star_type":"unknown","learning_time":1703,"maint_band_lower":0.39,"creation_time":1420654958512,"has_humidifier":false,"learning_days_completed_range":0,"dehumidifier_orientation_selected":"unknown","leaf_schedule_delta":1.11,"logging_priority":"informational","user_brightness":"medium","leaf_away_low":16.835,"pin_rc_description":"none","auto_dehum_state":false,"serial_number":"80C4887E69DF00D9","heat_x2_source":"electric","mac_address":"18b430093686","fan_duty_start_time":50400,"time_to_target":0,"backplate_model":"Backplate-2.2","heat_link_connection":0,"model_version":"Display-2.1","heat_pump_aux_threshold_enabled":true,"ob_persistence":true,"schedules":[]}},"trip":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":32201,"$timestamp":1445885694252,"trips":[]}},"demand_response":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1}},"user":{"2423243":{"$version":9049,"$timestamp":1445885721137,"email":"test@yahoo.com","name":"test@yahoo.com","structures":["structure.0b47dcf0-7c13-11e5-8199-22000b420f99"],"structure_memberships":[{"structure":"structure.0b47dcf0-7c13-11e5-8199-22000b420f99","roles":["owner"]}]}},"link":{"fake3243E4FEE924":{"$version":10338,"$timestamp":1445954076171,"structure":"structure.0b47dcf0-7c13-11e5-8199-22000b420f99"}},"device_alert_dialog":{"fake3243E4FEE924":{"$version":-9248,"$timestamp":1445954076171,"dialog_data":"","dialog_id":"confirm-pairing"}},"geofence_info":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-31412,"$timestamp":1445885694252,"device_events":[],"fences":[]}},"metadata":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1356998400000,"last_ip":"127.0.0.1","last_connection":1356998400000}},"user_settings":{"2423243":{"$version":31691,"$timestamp":1445354998080,"email_verified":true,"tos_accepted_version":1434564000000,"receive_marketing_emails":true,"receive_nest_emails":true,"receive_support_emails":true,"max_structures":2,"max_thermostats":40,"max_thermostats_per_structure":20,"max_smoke_detectors_per_structure":18,"max_smoke_detectors":36,"max_wwn_devices_per_structure":10,"max_wwn_devices":20,"tos_minimum_version":1434564000000,"tos_current_version":1434564000000,"lang":"en_US"}},"schedule":{"fake3243E4FEE924":{"$version":21638,"$timestamp":1445954075940}},"structure_metadata":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-32678,"$timestamp":1445951380776,"entitlements_api_path":"/api/0.1/structure/0b47dcf0-7c13-11e5-8199-22000b420f99/entitlements?v=8a957eeb-c93a-4e47-aea4-fb31cfc65691"}},"shared":{"fake3243E4FEE924":{"$version":-22003,"$timestamp":1445956471869,"auto_away_learning":"ready","auto_away":0,"hvac_alt_heat_state":false,"compressor_lockout_enabled":false,"hvac_heat_x3_state":false,"target_temperature_type":"heat","hvac_heater_state":false,"can_heat":true,"hvac_emer_heat_state":false,"compressor_lockout_timeout":0,"hvac_cool_x2_state":false,"target_temperature_high":23.33333,"hvac_aux_heater_state":false,"hvac_heat_x2_state":false,"target_temperature_low":23.33333,"hvac_ac_state":false,"target_temperature":22.85,"hvac_fan_state":false,"target_change_pending":true,"name":"E924","current_temperature":21,"hvac_alt_heat_x2_state":false,"can_cool":true}},"safety_summary":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-21456,"$timestamp":1445885694252}}}' + http_version: '1.1' + recorded_at: Tue, 27 Oct 2015 14:34:33 GMT +recorded_with: VCR 2.9.3 diff --git a/fixtures/vcr_cassettes/NestThermostat_Nest/gets_the_temperature.yml b/fixtures/vcr_cassettes/NestThermostat_Nest/gets_the_temperature.yml new file mode 100644 index 0000000..d6e16c0 --- /dev/null +++ b/fixtures/vcr_cassettes/NestThermostat_Nest/gets_the_temperature.yml @@ -0,0 +1,105 @@ +--- +http_interactions: +- request: + method: get + uri: https://on6%DFn7d%AC%A0%B57%D4%F7j9ZD%5B%13g%12%AE%AA7~%FD+gwtO%12%A9%DA%CA%60&Ea%B7%DCp%05%18s%C2&%DD%F4%C2;%D9Bw%09%25I;%BC%D5x%D9:V%E99*rC%B92;4cV%5D%E7%E1%DC%C7%B2%B0%16O%94ZY%B6%20%94X%17%03%ED%1E%91%CC%09tNS(%C9%F2%20%E9%FEY%01%5C%3Cf%A4%E4@czfe09-front01-iad01.transport.home.nest.com/v2/mobile/user.2423243 + body: + encoding: US-ASCII + string: '' + headers: + host: + - czfe09-front01-iad01.transport.home.nest.com + user-agent: + - Nest/1.1.0.10 CFNetwork/548.0.4 + authorization: + - Basic b.2423243.ZKygtTfU92o5WkRbE2cSrqo3fv0rZ3d0TxKp2spgJkVht9xwBRhzwibd9MI72UJ3CSVJO7zVeNk6Vuk5KnJDuTI7NGNWXefh3MeysBZPlFpZtiCUWBcD7R6RzAl0TlMoyfIg6f5ZAVw8ZqTk + x-nl-user-id: + - '2423243' + x-nl-protocol-version: + - '1' + accept-language: + - en-us + connection: + - keep-alive + accept: + - "*/*" + response: + status: + code: 200 + message: OK + headers: + content-type: + - application/json + x-nl-defer-device-window: + - '120' + x-nl-service-timestamp: + - '1445956464711' + content-length: + - '10890' + connection: + - keep-alive + body: + encoding: UTF-8 + string: '{"user_alert_dialog":{"2423243":{"$version":-31019,"$timestamp":1445954076171,"dialog_data":"","dialog_id":"confirm-pairing"}},"buckets":{"2423243":{"$version":12532,"$timestamp":1445956458542,"buckets":["user.2423243","user_alert_dialog.2423243","message_center.2423243","user_settings.2423243","buckets.2423243","device.fake3243E4FEE924","demand_response.fake3243E4FEE924","device_alert_dialog.fake3243E4FEE924","link.fake3243E4FEE924","message.fake3243E4FEE924","metadata.fake3243E4FEE924","schedule.fake3243E4FEE924","shared.fake3243E4FEE924","track.fake3243E4FEE924","tuneups.fake3243E4FEE924","energy_latest.fake3243E4FEE924","energy_weekly.fake3243E4FEE924","diamond_sensor_event.fake3243E4FEE924","diamond_sensor_config.fake3243E4FEE924","structure.0b47dcf0-7c13-11e5-8199-22000b420f99","where.0b47dcf0-7c13-11e5-8199-22000b420f99","utility.0b47dcf0-7c13-11e5-8199-22000b420f99","structure_history.0b47dcf0-7c13-11e5-8199-22000b420f99","trip.0b47dcf0-7c13-11e5-8199-22000b420f99","structure_metadata.0b47dcf0-7c13-11e5-8199-22000b420f99","safety.0b47dcf0-7c13-11e5-8199-22000b420f99","safety_summary.0b47dcf0-7c13-11e5-8199-22000b420f99","geofence_info.0b47dcf0-7c13-11e5-8199-22000b420f99"]}},"track":{"fake3243E4FEE924":{"$version":31457,"$timestamp":1445954075890,"online":false}},"message_center":{"2423243":{"$version":-1,"$timestamp":1325379661000,"messages":[]}},"safety":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":3651,"$timestamp":1445885694252,"audio_self_test_participants":[]}},"utility":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-1,"$timestamp":1}},"where":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":25319,"$timestamp":1445885694015,"wheres":[{"where_id":"00000000-0000-0000-0000-000100000001","name":"Basement"},{"where_id":"00000000-0000-0000-0000-00010000000d","name":"Bedroom"},{"where_id":"00000000-0000-0000-0000-000100000003","name":"Den"},{"where_id":"00000000-0000-0000-0000-000100000010","name":"Dining + Room"},{"where_id":"00000000-0000-0000-0000-000100000006","name":"Downstairs"},{"where_id":"00000000-0000-0000-0000-000100000000","name":"Entryway"},{"where_id":"00000000-0000-0000-0000-00010000000b","name":"Family + Room"},{"where_id":"00000000-0000-0000-0000-000100000002","name":"Hallway"},{"where_id":"00000000-0000-0000-0000-000100000008","name":"Kids + Room"},{"where_id":"00000000-0000-0000-0000-00010000000a","name":"Kitchen"},{"where_id":"00000000-0000-0000-0000-00010000000c","name":"Living + Room"},{"where_id":"00000000-0000-0000-0000-000100000005","name":"Master Bedroom"},{"where_id":"00000000-0000-0000-0000-00010000000e","name":"Office"},{"where_id":"00000000-0000-0000-0000-00010000000f","name":"Upstairs"}]}},"structure":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":15857,"$timestamp":1445956462746,"away_timestamp":1445954700,"away":false,"location":"Palm + Harbor, FL","name":"Chrome App Structure","postal_code":"34683","topaz_away":false,"creation_time":1445885694067,"country_code":"US","away_setter":0,"topaz_hush_key":"FmyQftpkdU9eH9St4mMWhQ==","user":"user.2423243","devices":["device.fake3243E4FEE924"],"swarm":["device.fake3243E4FEE924"],"fabric_ids":[],"clutches":[],"members":[{"user":"user.2423243","roles":["owner"]}]}},"message":{"fake3243E4FEE924":{"$version":-24419,"$timestamp":1445954076171,"1":{"cmd":"register"}}},"tuneups":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1}},"device":{"fake3243E4FEE924":{"$version":-27199,"$timestamp":1445956401831,"heatpump_setback_active":false,"emer_heat_enable":false,"touched_by":{},"local_ip":"192.168.2.4","switch_system_off":false,"away_temperature_high":24.444,"cooling_source":"electric","temperature_lock_high_temp":22.222,"y2_type":"unknown","leaf_threshold_cool":0,"heater_source":"gas","fan_cooling_state":false,"note_codes":[],"compressor_lockout_leaf":-17.8,"has_x3_heat":false,"target_humidity_enabled":false,"heat_x3_source":"electric","alt_heat_delivery":"forced-air","has_x2_heat":false,"fan_mode":"auto","rssi":66,"sunlight_correction_active":false,"emer_heat_delivery":"forced-air","heatpump_savings":"off","pin_y2_description":"none","humidity_control_lockout_end_time":0,"filter_reminder_level":0,"gear_opacity":0,"filter_reminder_enabled":true,"capability_level":4,"schedule_learning_reset":false,"has_x2_cool":false,"hvac_pins":"W1,C,Rh,G","ob_orientation":"O","cooling_delivery":"unknown","range_enable":false,"auto_away_enable":true,"dual_fuel_breakpoint_override":"none","lower_safety_temp_enabled":true,"has_fan":true,"dehumidifier_state":false,"emer_heat_source":"electric","nlclient_state":"","heatpump_ready":false,"cooling_x2_delivery":"unknown","available_locales":"en_US,fr_CA,es_US,en_GB","current_version":"4.1","has_fossil_fuel":true,"learning_state":"slow","pin_ob_description":"none","pin_rh_description":"power","has_alt_heat":false,"safety_temp_activating_hvac":false,"fan_duty_cycle":900,"pin_y1_description":"none","humidifier_state":false,"gear_threshold_high":0,"backplate_serial_number":"02BA01AB241200CW","has_x2_alt_heat":false,"heat_x3_delivery":"forced-air","leaf_threshold_heat":18.334,"is_on_stand":false,"has_emer_heat":false,"learning_mode":true,"leaf_learning":"ready","has_aux_heat":false,"filter_changed_set_date":1386452016,"aux_heat_source":"electric","backplate_bsl_info":"BSL","alt_heat_x2_source":"gas","sunlight_correction_ready":true,"humidifier_type":"unknown","pin_c_description":"power","humidity_control_lockout_start_time":0,"pin_w2aux_description":"none","fan_timer_timeout":0,"country_code":"US","sunlight_correction_enabled":true,"heat_x2_delivery":"forced-air","target_humidity":35,"gear_threshold_low":0,"lower_safety_temp":4.738,"cooling_x2_source":"electric","equipment_type":"electric","heat_pump_aux_threshold":10,"alt_heat_x2_delivery":"forced-air","heat_pump_comp_threshold":-31.5,"learning_days_completed_cool":0,"backplate_bsl_version":"2.1","current_schedule_mode":"HEAT","fan_duty_end_time":68400,"hvac_wires":"Heat,Fan,Common + Wire,Rh","leaf":true,"type":"TBD","pin_g_description":"fan","click_sound":"on","away_temperature_low_enabled":true,"aux_heat_delivery":"forced-air","filter_changed_date":1387065600,"hvac_safety_shutoff_active":false,"heat_pump_comp_threshold_enabled":false,"has_dehumidifier":false,"preconditioning_ready":true,"fan_cooling_enabled":true,"leaf_away_high":28.88,"fan_cooling_readiness":"not + ready","device_locale":"en_US","temperature_scale":"F","battery_level":3.963,"error_code":"","maint_band_upper":0.39,"preconditioning_active":false,"fan_control_state":false,"away_temperature_high_enabled":false,"dehumidifier_fan_activation":false,"learning_days_completed_heat":598,"humidifier_fan_activation":false,"pin_star_description":"none","upper_safety_temp_enabled":false,"dual_fuel_selected":false,"preconditioning_enabled":false,"current_humidity":50,"dual_fuel_breakpoint":-1,"postal_code":"94602","backplate_mono_version":"4.0.20","alt_heat_source":"gas","aux_lockout_leaf":10,"has_heat_pump":false,"heater_delivery":"forced-air","away_temperature_low":12.778,"auto_away_reset":false,"radiant_control_enabled":false,"has_air_filter":true,"temperature_lock":false,"dehumidifier_type":"unknown","time_to_target_training":"training","upper_safety_temp":35,"humidity_control_lockout_enabled":false,"fan_timer_duration":900,"target_time_confidence":0,"pin_w1_description":"heat","temperature_lock_low_temp":20,"where_id":"00000000-0000-0000-0000-000100000001","forced_air":true,"temperature_lock_pin_hash":"","auto_dehum_enabled":false,"leaf_type":1,"backplate_mono_info":"TFE + (BP_D2) 4.0.20 (root@bamboo) 2014-02-03 10:06:33","has_dual_fuel":false,"star_type":"unknown","learning_time":1703,"maint_band_lower":0.39,"creation_time":1420654958512,"has_humidifier":false,"learning_days_completed_range":0,"dehumidifier_orientation_selected":"unknown","leaf_schedule_delta":1.11,"logging_priority":"informational","user_brightness":"medium","leaf_away_low":16.835,"pin_rc_description":"none","auto_dehum_state":false,"serial_number":"80C4887E69DF00D9","heat_x2_source":"electric","mac_address":"18b430093686","fan_duty_start_time":50400,"time_to_target":0,"backplate_model":"Backplate-2.2","heat_link_connection":0,"model_version":"Display-2.1","heat_pump_aux_threshold_enabled":true,"ob_persistence":true,"schedules":[]}},"trip":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":32201,"$timestamp":1445885694252,"trips":[]}},"demand_response":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1}},"user":{"2423243":{"$version":9049,"$timestamp":1445885721137,"email":"test@yahoo.com","name":"test@yahoo.com","structures":["structure.0b47dcf0-7c13-11e5-8199-22000b420f99"],"structure_memberships":[{"structure":"structure.0b47dcf0-7c13-11e5-8199-22000b420f99","roles":["owner"]}]}},"link":{"fake3243E4FEE924":{"$version":10338,"$timestamp":1445954076171,"structure":"structure.0b47dcf0-7c13-11e5-8199-22000b420f99"}},"device_alert_dialog":{"fake3243E4FEE924":{"$version":-9248,"$timestamp":1445954076171,"dialog_data":"","dialog_id":"confirm-pairing"}},"geofence_info":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-31412,"$timestamp":1445885694252,"device_events":[],"fences":[]}},"metadata":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1356998400000,"last_ip":"127.0.0.1","last_connection":1356998400000}},"user_settings":{"2423243":{"$version":31691,"$timestamp":1445354998080,"email_verified":true,"tos_accepted_version":1434564000000,"receive_marketing_emails":true,"receive_nest_emails":true,"receive_support_emails":true,"max_structures":2,"max_thermostats":40,"max_thermostats_per_structure":20,"max_smoke_detectors_per_structure":18,"max_smoke_detectors":36,"max_wwn_devices_per_structure":10,"max_wwn_devices":20,"tos_minimum_version":1434564000000,"tos_current_version":1434564000000,"lang":"en_US"}},"schedule":{"fake3243E4FEE924":{"$version":21638,"$timestamp":1445954075940}},"structure_metadata":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-32678,"$timestamp":1445951380776,"entitlements_api_path":"/api/0.1/structure/0b47dcf0-7c13-11e5-8199-22000b420f99/entitlements?v=8a957eeb-c93a-4e47-aea4-fb31cfc65691"}},"shared":{"fake3243E4FEE924":{"$version":-13990,"$timestamp":1445956397555,"auto_away_learning":"ready","auto_away":0,"hvac_alt_heat_state":false,"compressor_lockout_enabled":false,"hvac_heat_x3_state":false,"target_temperature_type":"heat","hvac_heater_state":false,"can_heat":true,"hvac_emer_heat_state":false,"compressor_lockout_timeout":0,"hvac_cool_x2_state":false,"target_temperature_high":23.33333,"hvac_aux_heater_state":false,"hvac_heat_x2_state":false,"target_temperature_low":23.33333,"hvac_ac_state":false,"target_temperature":22.85,"hvac_fan_state":false,"target_change_pending":true,"name":"E924","current_temperature":21,"hvac_alt_heat_x2_state":false,"can_cool":true}},"safety_summary":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-21456,"$timestamp":1445885694252}}}' + http_version: '1.1' + recorded_at: Tue, 27 Oct 2015 14:34:25 GMT +- request: + method: get + uri: https://on6%DFn7d%AC%A0%B57%D4%F7j9ZD%5B%13g%12%AE%AA7~%FD+gwtO%12%A9%DA%CA%60&Ea%B7%DCp%05%18s%C2&%DD%F4%C2;%D9Bw%09%25I;%BC%D5x%D9:V%E99*rC%B92;4cV%5D%E7%E1%DC%C7%B2%B0%16O%94ZY%B6%20%94X%17%03%ED%1E%91%CC%09tNS(%C9%F2%20%E9%FEY%01%5C%3Cf%A4%E4@czfe09-front01-iad01.transport.home.nest.com/v2/mobile/user.2423243 + body: + encoding: US-ASCII + string: '' + headers: + host: + - czfe09-front01-iad01.transport.home.nest.com + user-agent: + - Nest/1.1.0.10 CFNetwork/548.0.4 + authorization: + - Basic b.2423243.ZKygtTfU92o5WkRbE2cSrqo3fv0rZ3d0TxKp2spgJkVht9xwBRhzwibd9MI72UJ3CSVJO7zVeNk6Vuk5KnJDuTI7NGNWXefh3MeysBZPlFpZtiCUWBcD7R6RzAl0TlMoyfIg6f5ZAVw8ZqTk + x-nl-user-id: + - '2423243' + x-nl-protocol-version: + - '1' + accept-language: + - en-us + connection: + - keep-alive + accept: + - "*/*" + response: + status: + code: 200 + message: OK + headers: + content-type: + - application/json + x-nl-defer-device-window: + - '120' + x-nl-service-timestamp: + - '1445956465083' + content-length: + - '10890' + connection: + - keep-alive + body: + encoding: UTF-8 + string: '{"user_alert_dialog":{"2423243":{"$version":-31019,"$timestamp":1445954076171,"dialog_data":"","dialog_id":"confirm-pairing"}},"buckets":{"2423243":{"$version":12532,"$timestamp":1445956458542,"buckets":["user.2423243","user_alert_dialog.2423243","message_center.2423243","user_settings.2423243","buckets.2423243","device.fake3243E4FEE924","demand_response.fake3243E4FEE924","device_alert_dialog.fake3243E4FEE924","link.fake3243E4FEE924","message.fake3243E4FEE924","metadata.fake3243E4FEE924","schedule.fake3243E4FEE924","shared.fake3243E4FEE924","track.fake3243E4FEE924","tuneups.fake3243E4FEE924","energy_latest.fake3243E4FEE924","energy_weekly.fake3243E4FEE924","diamond_sensor_event.fake3243E4FEE924","diamond_sensor_config.fake3243E4FEE924","structure.0b47dcf0-7c13-11e5-8199-22000b420f99","where.0b47dcf0-7c13-11e5-8199-22000b420f99","utility.0b47dcf0-7c13-11e5-8199-22000b420f99","structure_history.0b47dcf0-7c13-11e5-8199-22000b420f99","trip.0b47dcf0-7c13-11e5-8199-22000b420f99","structure_metadata.0b47dcf0-7c13-11e5-8199-22000b420f99","safety.0b47dcf0-7c13-11e5-8199-22000b420f99","safety_summary.0b47dcf0-7c13-11e5-8199-22000b420f99","geofence_info.0b47dcf0-7c13-11e5-8199-22000b420f99"]}},"track":{"fake3243E4FEE924":{"$version":31457,"$timestamp":1445954075890,"online":false}},"message_center":{"2423243":{"$version":-1,"$timestamp":1325379661000,"messages":[]}},"safety":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":3651,"$timestamp":1445885694252,"audio_self_test_participants":[]}},"utility":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-1,"$timestamp":1}},"where":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":25319,"$timestamp":1445885694015,"wheres":[{"where_id":"00000000-0000-0000-0000-000100000001","name":"Basement"},{"where_id":"00000000-0000-0000-0000-00010000000d","name":"Bedroom"},{"where_id":"00000000-0000-0000-0000-000100000003","name":"Den"},{"where_id":"00000000-0000-0000-0000-000100000010","name":"Dining + Room"},{"where_id":"00000000-0000-0000-0000-000100000006","name":"Downstairs"},{"where_id":"00000000-0000-0000-0000-000100000000","name":"Entryway"},{"where_id":"00000000-0000-0000-0000-00010000000b","name":"Family + Room"},{"where_id":"00000000-0000-0000-0000-000100000002","name":"Hallway"},{"where_id":"00000000-0000-0000-0000-000100000008","name":"Kids + Room"},{"where_id":"00000000-0000-0000-0000-00010000000a","name":"Kitchen"},{"where_id":"00000000-0000-0000-0000-00010000000c","name":"Living + Room"},{"where_id":"00000000-0000-0000-0000-000100000005","name":"Master Bedroom"},{"where_id":"00000000-0000-0000-0000-00010000000e","name":"Office"},{"where_id":"00000000-0000-0000-0000-00010000000f","name":"Upstairs"}]}},"structure":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":15857,"$timestamp":1445956462746,"away_timestamp":1445954700,"away":false,"location":"Palm + Harbor, FL","name":"Chrome App Structure","postal_code":"34683","topaz_away":false,"creation_time":1445885694067,"country_code":"US","away_setter":0,"topaz_hush_key":"FmyQftpkdU9eH9St4mMWhQ==","user":"user.2423243","devices":["device.fake3243E4FEE924"],"swarm":["device.fake3243E4FEE924"],"fabric_ids":[],"clutches":[],"members":[{"user":"user.2423243","roles":["owner"]}]}},"message":{"fake3243E4FEE924":{"$version":-24419,"$timestamp":1445954076171,"1":{"cmd":"register"}}},"tuneups":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1}},"device":{"fake3243E4FEE924":{"$version":-27199,"$timestamp":1445956401831,"heatpump_setback_active":false,"emer_heat_enable":false,"touched_by":{},"local_ip":"192.168.2.4","switch_system_off":false,"away_temperature_high":24.444,"cooling_source":"electric","temperature_lock_high_temp":22.222,"y2_type":"unknown","leaf_threshold_cool":0,"heater_source":"gas","fan_cooling_state":false,"note_codes":[],"compressor_lockout_leaf":-17.8,"has_x3_heat":false,"target_humidity_enabled":false,"heat_x3_source":"electric","alt_heat_delivery":"forced-air","has_x2_heat":false,"fan_mode":"auto","rssi":66,"sunlight_correction_active":false,"emer_heat_delivery":"forced-air","heatpump_savings":"off","pin_y2_description":"none","humidity_control_lockout_end_time":0,"filter_reminder_level":0,"gear_opacity":0,"filter_reminder_enabled":true,"capability_level":4,"schedule_learning_reset":false,"has_x2_cool":false,"hvac_pins":"W1,C,Rh,G","ob_orientation":"O","cooling_delivery":"unknown","range_enable":false,"auto_away_enable":true,"dual_fuel_breakpoint_override":"none","lower_safety_temp_enabled":true,"has_fan":true,"dehumidifier_state":false,"emer_heat_source":"electric","nlclient_state":"","heatpump_ready":false,"cooling_x2_delivery":"unknown","available_locales":"en_US,fr_CA,es_US,en_GB","current_version":"4.1","has_fossil_fuel":true,"learning_state":"slow","pin_ob_description":"none","pin_rh_description":"power","has_alt_heat":false,"safety_temp_activating_hvac":false,"fan_duty_cycle":900,"pin_y1_description":"none","humidifier_state":false,"gear_threshold_high":0,"backplate_serial_number":"02BA01AB241200CW","has_x2_alt_heat":false,"heat_x3_delivery":"forced-air","leaf_threshold_heat":18.334,"is_on_stand":false,"has_emer_heat":false,"learning_mode":true,"leaf_learning":"ready","has_aux_heat":false,"filter_changed_set_date":1386452016,"aux_heat_source":"electric","backplate_bsl_info":"BSL","alt_heat_x2_source":"gas","sunlight_correction_ready":true,"humidifier_type":"unknown","pin_c_description":"power","humidity_control_lockout_start_time":0,"pin_w2aux_description":"none","fan_timer_timeout":0,"country_code":"US","sunlight_correction_enabled":true,"heat_x2_delivery":"forced-air","target_humidity":35,"gear_threshold_low":0,"lower_safety_temp":4.738,"cooling_x2_source":"electric","equipment_type":"electric","heat_pump_aux_threshold":10,"alt_heat_x2_delivery":"forced-air","heat_pump_comp_threshold":-31.5,"learning_days_completed_cool":0,"backplate_bsl_version":"2.1","current_schedule_mode":"HEAT","fan_duty_end_time":68400,"hvac_wires":"Heat,Fan,Common + Wire,Rh","leaf":true,"type":"TBD","pin_g_description":"fan","click_sound":"on","away_temperature_low_enabled":true,"aux_heat_delivery":"forced-air","filter_changed_date":1387065600,"hvac_safety_shutoff_active":false,"heat_pump_comp_threshold_enabled":false,"has_dehumidifier":false,"preconditioning_ready":true,"fan_cooling_enabled":true,"leaf_away_high":28.88,"fan_cooling_readiness":"not + ready","device_locale":"en_US","temperature_scale":"F","battery_level":3.963,"error_code":"","maint_band_upper":0.39,"preconditioning_active":false,"fan_control_state":false,"away_temperature_high_enabled":false,"dehumidifier_fan_activation":false,"learning_days_completed_heat":598,"humidifier_fan_activation":false,"pin_star_description":"none","upper_safety_temp_enabled":false,"dual_fuel_selected":false,"preconditioning_enabled":false,"current_humidity":50,"dual_fuel_breakpoint":-1,"postal_code":"94602","backplate_mono_version":"4.0.20","alt_heat_source":"gas","aux_lockout_leaf":10,"has_heat_pump":false,"heater_delivery":"forced-air","away_temperature_low":12.778,"auto_away_reset":false,"radiant_control_enabled":false,"has_air_filter":true,"temperature_lock":false,"dehumidifier_type":"unknown","time_to_target_training":"training","upper_safety_temp":35,"humidity_control_lockout_enabled":false,"fan_timer_duration":900,"target_time_confidence":0,"pin_w1_description":"heat","temperature_lock_low_temp":20,"where_id":"00000000-0000-0000-0000-000100000001","forced_air":true,"temperature_lock_pin_hash":"","auto_dehum_enabled":false,"leaf_type":1,"backplate_mono_info":"TFE + (BP_D2) 4.0.20 (root@bamboo) 2014-02-03 10:06:33","has_dual_fuel":false,"star_type":"unknown","learning_time":1703,"maint_band_lower":0.39,"creation_time":1420654958512,"has_humidifier":false,"learning_days_completed_range":0,"dehumidifier_orientation_selected":"unknown","leaf_schedule_delta":1.11,"logging_priority":"informational","user_brightness":"medium","leaf_away_low":16.835,"pin_rc_description":"none","auto_dehum_state":false,"serial_number":"80C4887E69DF00D9","heat_x2_source":"electric","mac_address":"18b430093686","fan_duty_start_time":50400,"time_to_target":0,"backplate_model":"Backplate-2.2","heat_link_connection":0,"model_version":"Display-2.1","heat_pump_aux_threshold_enabled":true,"ob_persistence":true,"schedules":[]}},"trip":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":32201,"$timestamp":1445885694252,"trips":[]}},"demand_response":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1}},"user":{"2423243":{"$version":9049,"$timestamp":1445885721137,"email":"test@yahoo.com","name":"test@yahoo.com","structures":["structure.0b47dcf0-7c13-11e5-8199-22000b420f99"],"structure_memberships":[{"structure":"structure.0b47dcf0-7c13-11e5-8199-22000b420f99","roles":["owner"]}]}},"link":{"fake3243E4FEE924":{"$version":10338,"$timestamp":1445954076171,"structure":"structure.0b47dcf0-7c13-11e5-8199-22000b420f99"}},"device_alert_dialog":{"fake3243E4FEE924":{"$version":-9248,"$timestamp":1445954076171,"dialog_data":"","dialog_id":"confirm-pairing"}},"geofence_info":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-31412,"$timestamp":1445885694252,"device_events":[],"fences":[]}},"metadata":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1356998400000,"last_ip":"127.0.0.1","last_connection":1356998400000}},"user_settings":{"2423243":{"$version":31691,"$timestamp":1445354998080,"email_verified":true,"tos_accepted_version":1434564000000,"receive_marketing_emails":true,"receive_nest_emails":true,"receive_support_emails":true,"max_structures":2,"max_thermostats":40,"max_thermostats_per_structure":20,"max_smoke_detectors_per_structure":18,"max_smoke_detectors":36,"max_wwn_devices_per_structure":10,"max_wwn_devices":20,"tos_minimum_version":1434564000000,"tos_current_version":1434564000000,"lang":"en_US"}},"schedule":{"fake3243E4FEE924":{"$version":21638,"$timestamp":1445954075940}},"structure_metadata":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-32678,"$timestamp":1445951380776,"entitlements_api_path":"/api/0.1/structure/0b47dcf0-7c13-11e5-8199-22000b420f99/entitlements?v=8a957eeb-c93a-4e47-aea4-fb31cfc65691"}},"shared":{"fake3243E4FEE924":{"$version":-13990,"$timestamp":1445956397555,"auto_away_learning":"ready","auto_away":0,"hvac_alt_heat_state":false,"compressor_lockout_enabled":false,"hvac_heat_x3_state":false,"target_temperature_type":"heat","hvac_heater_state":false,"can_heat":true,"hvac_emer_heat_state":false,"compressor_lockout_timeout":0,"hvac_cool_x2_state":false,"target_temperature_high":23.33333,"hvac_aux_heater_state":false,"hvac_heat_x2_state":false,"target_temperature_low":23.33333,"hvac_ac_state":false,"target_temperature":22.85,"hvac_fan_state":false,"target_change_pending":true,"name":"E924","current_temperature":21,"hvac_alt_heat_x2_state":false,"can_cool":true}},"safety_summary":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-21456,"$timestamp":1445885694252}}}' + http_version: '1.1' + recorded_at: Tue, 27 Oct 2015 14:34:25 GMT +recorded_with: VCR 2.9.3 diff --git a/fixtures/vcr_cassettes/NestThermostat_Nest/sets_away_status.yml b/fixtures/vcr_cassettes/NestThermostat_Nest/sets_away_status.yml new file mode 100644 index 0000000..51febb3 --- /dev/null +++ b/fixtures/vcr_cassettes/NestThermostat_Nest/sets_away_status.yml @@ -0,0 +1,203 @@ +--- +http_interactions: +- request: + method: post + uri: https://on6%DFn7d%AC%A0%B57%D4%F7j9ZD%5B%13g%12%AE%AA7~%FD+gwtO%12%A9%DA%CA%60&Ea%B7%DCp%05%18s%C2&%DD%F4%C2;%D9Bw%09%25I;%BC%D5x%D9:V%E99*rC%B92;4cV%5D%E7%E1%DC%C7%B2%B0%16O%94ZY%B6%20%94X%17%03%ED%1E%91%CC%09tNS(%C9%F2%20%E9%FEY%01%5C%3Cf%A4%E4@czfe09-front01-iad01.transport.home.nest.com/v2/put/structure.0b47dcf0-7c13-11e5-8199-22000b420f99 + body: + encoding: UTF-8 + string: '{"away_timestamp":1445954700,"away":true,"away_setter":0}' + headers: + host: + - czfe09-front01-iad01.transport.home.nest.com + user-agent: + - Nest/1.1.0.10 CFNetwork/548.0.4 + authorization: + - Basic b.2423243.ZKygtTfU92o5WkRbE2cSrqo3fv0rZ3d0TxKp2spgJkVht9xwBRhzwibd9MI72UJ3CSVJO7zVeNk6Vuk5KnJDuTI7NGNWXefh3MeysBZPlFpZtiCUWBcD7R6RzAl0TlMoyfIg6f5ZAVw8ZqTk + x-nl-user-id: + - '2423243' + x-nl-protocol-version: + - '1' + accept-language: + - en-us + connection: + - keep-alive + accept: + - "*/*" + response: + status: + code: 200 + message: OK + headers: + content-type: + - application/json + x-nl-defer-device-window: + - '120' + x-nl-skv-key: + - structure.0b47dcf0-7c13-11e5-8199-22000b420f99 + x-nl-skv-version: + - '8775' + x-nl-skv-timestamp: + - '1445956461970' + x-nl-service-timestamp: + - '1445956462040' + content-length: + - '0' + connection: + - keep-alive + body: + encoding: UTF-8 + string: '' + http_version: '1.1' + recorded_at: Tue, 27 Oct 2015 14:05:00 GMT +- request: + method: get + uri: https://on6%DFn7d%AC%A0%B57%D4%F7j9ZD%5B%13g%12%AE%AA7~%FD+gwtO%12%A9%DA%CA%60&Ea%B7%DCp%05%18s%C2&%DD%F4%C2;%D9Bw%09%25I;%BC%D5x%D9:V%E99*rC%B92;4cV%5D%E7%E1%DC%C7%B2%B0%16O%94ZY%B6%20%94X%17%03%ED%1E%91%CC%09tNS(%C9%F2%20%E9%FEY%01%5C%3Cf%A4%E4@czfe09-front01-iad01.transport.home.nest.com/v2/mobile/user.2423243 + body: + encoding: US-ASCII + string: '' + headers: + host: + - czfe09-front01-iad01.transport.home.nest.com + user-agent: + - Nest/1.1.0.10 CFNetwork/548.0.4 + authorization: + - Basic b.2423243.ZKygtTfU92o5WkRbE2cSrqo3fv0rZ3d0TxKp2spgJkVht9xwBRhzwibd9MI72UJ3CSVJO7zVeNk6Vuk5KnJDuTI7NGNWXefh3MeysBZPlFpZtiCUWBcD7R6RzAl0TlMoyfIg6f5ZAVw8ZqTk + x-nl-user-id: + - '2423243' + x-nl-protocol-version: + - '1' + accept-language: + - en-us + connection: + - keep-alive + accept: + - "*/*" + response: + status: + code: 200 + message: OK + headers: + content-type: + - application/json + x-nl-defer-device-window: + - '120' + x-nl-service-timestamp: + - '1445956462424' + content-length: + - '10888' + connection: + - keep-alive + body: + encoding: UTF-8 + string: '{"user_alert_dialog":{"2423243":{"$version":-31019,"$timestamp":1445954076171,"dialog_data":"","dialog_id":"confirm-pairing"}},"buckets":{"2423243":{"$version":12532,"$timestamp":1445956458542,"buckets":["user.2423243","user_alert_dialog.2423243","message_center.2423243","user_settings.2423243","buckets.2423243","device.fake3243E4FEE924","demand_response.fake3243E4FEE924","device_alert_dialog.fake3243E4FEE924","link.fake3243E4FEE924","message.fake3243E4FEE924","metadata.fake3243E4FEE924","schedule.fake3243E4FEE924","shared.fake3243E4FEE924","track.fake3243E4FEE924","tuneups.fake3243E4FEE924","energy_latest.fake3243E4FEE924","energy_weekly.fake3243E4FEE924","diamond_sensor_event.fake3243E4FEE924","diamond_sensor_config.fake3243E4FEE924","structure.0b47dcf0-7c13-11e5-8199-22000b420f99","where.0b47dcf0-7c13-11e5-8199-22000b420f99","utility.0b47dcf0-7c13-11e5-8199-22000b420f99","structure_history.0b47dcf0-7c13-11e5-8199-22000b420f99","trip.0b47dcf0-7c13-11e5-8199-22000b420f99","structure_metadata.0b47dcf0-7c13-11e5-8199-22000b420f99","safety.0b47dcf0-7c13-11e5-8199-22000b420f99","safety_summary.0b47dcf0-7c13-11e5-8199-22000b420f99","geofence_info.0b47dcf0-7c13-11e5-8199-22000b420f99"]}},"track":{"fake3243E4FEE924":{"$version":31457,"$timestamp":1445954075890,"online":false}},"message_center":{"2423243":{"$version":-1,"$timestamp":1325379661000,"messages":[]}},"safety":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":3651,"$timestamp":1445885694252,"audio_self_test_participants":[]}},"utility":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-1,"$timestamp":1}},"where":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":25319,"$timestamp":1445885694015,"wheres":[{"where_id":"00000000-0000-0000-0000-000100000001","name":"Basement"},{"where_id":"00000000-0000-0000-0000-00010000000d","name":"Bedroom"},{"where_id":"00000000-0000-0000-0000-000100000003","name":"Den"},{"where_id":"00000000-0000-0000-0000-000100000010","name":"Dining + Room"},{"where_id":"00000000-0000-0000-0000-000100000006","name":"Downstairs"},{"where_id":"00000000-0000-0000-0000-000100000000","name":"Entryway"},{"where_id":"00000000-0000-0000-0000-00010000000b","name":"Family + Room"},{"where_id":"00000000-0000-0000-0000-000100000002","name":"Hallway"},{"where_id":"00000000-0000-0000-0000-000100000008","name":"Kids + Room"},{"where_id":"00000000-0000-0000-0000-00010000000a","name":"Kitchen"},{"where_id":"00000000-0000-0000-0000-00010000000c","name":"Living + Room"},{"where_id":"00000000-0000-0000-0000-000100000005","name":"Master Bedroom"},{"where_id":"00000000-0000-0000-0000-00010000000e","name":"Office"},{"where_id":"00000000-0000-0000-0000-00010000000f","name":"Upstairs"}]}},"structure":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":8775,"$timestamp":1445956461970,"away_timestamp":1445954700,"away":true,"location":"Palm + Harbor, FL","postal_code":"34683","name":"Chrome App Structure","topaz_away":false,"creation_time":1445885694067,"country_code":"US","topaz_hush_key":"FmyQftpkdU9eH9St4mMWhQ==","away_setter":0,"user":"user.2423243","devices":["device.fake3243E4FEE924"],"swarm":["device.fake3243E4FEE924"],"fabric_ids":[],"clutches":[],"members":[{"user":"user.2423243","roles":["owner"]}]}},"message":{"fake3243E4FEE924":{"$version":-24419,"$timestamp":1445954076171,"1":{"cmd":"register"}}},"tuneups":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1}},"device":{"fake3243E4FEE924":{"$version":-27199,"$timestamp":1445956401831,"heatpump_setback_active":false,"emer_heat_enable":false,"touched_by":{},"local_ip":"192.168.2.4","switch_system_off":false,"away_temperature_high":24.444,"cooling_source":"electric","temperature_lock_high_temp":22.222,"y2_type":"unknown","leaf_threshold_cool":0,"heater_source":"gas","fan_cooling_state":false,"note_codes":[],"compressor_lockout_leaf":-17.8,"has_x3_heat":false,"target_humidity_enabled":false,"heat_x3_source":"electric","alt_heat_delivery":"forced-air","has_x2_heat":false,"fan_mode":"auto","rssi":66,"sunlight_correction_active":false,"emer_heat_delivery":"forced-air","heatpump_savings":"off","pin_y2_description":"none","humidity_control_lockout_end_time":0,"filter_reminder_level":0,"gear_opacity":0,"filter_reminder_enabled":true,"capability_level":4,"schedule_learning_reset":false,"has_x2_cool":false,"hvac_pins":"W1,C,Rh,G","ob_orientation":"O","cooling_delivery":"unknown","range_enable":false,"auto_away_enable":true,"dual_fuel_breakpoint_override":"none","lower_safety_temp_enabled":true,"has_fan":true,"dehumidifier_state":false,"emer_heat_source":"electric","nlclient_state":"","heatpump_ready":false,"cooling_x2_delivery":"unknown","available_locales":"en_US,fr_CA,es_US,en_GB","current_version":"4.1","has_fossil_fuel":true,"learning_state":"slow","pin_ob_description":"none","pin_rh_description":"power","has_alt_heat":false,"safety_temp_activating_hvac":false,"fan_duty_cycle":900,"pin_y1_description":"none","humidifier_state":false,"gear_threshold_high":0,"backplate_serial_number":"02BA01AB241200CW","has_x2_alt_heat":false,"heat_x3_delivery":"forced-air","leaf_threshold_heat":18.334,"is_on_stand":false,"has_emer_heat":false,"learning_mode":true,"leaf_learning":"ready","has_aux_heat":false,"filter_changed_set_date":1386452016,"aux_heat_source":"electric","backplate_bsl_info":"BSL","alt_heat_x2_source":"gas","sunlight_correction_ready":true,"humidifier_type":"unknown","pin_c_description":"power","humidity_control_lockout_start_time":0,"pin_w2aux_description":"none","fan_timer_timeout":0,"country_code":"US","sunlight_correction_enabled":true,"heat_x2_delivery":"forced-air","target_humidity":35,"gear_threshold_low":0,"lower_safety_temp":4.738,"cooling_x2_source":"electric","equipment_type":"electric","heat_pump_aux_threshold":10,"alt_heat_x2_delivery":"forced-air","heat_pump_comp_threshold":-31.5,"learning_days_completed_cool":0,"backplate_bsl_version":"2.1","current_schedule_mode":"HEAT","fan_duty_end_time":68400,"hvac_wires":"Heat,Fan,Common + Wire,Rh","leaf":true,"type":"TBD","pin_g_description":"fan","click_sound":"on","away_temperature_low_enabled":true,"aux_heat_delivery":"forced-air","filter_changed_date":1387065600,"hvac_safety_shutoff_active":false,"heat_pump_comp_threshold_enabled":false,"has_dehumidifier":false,"preconditioning_ready":true,"fan_cooling_enabled":true,"leaf_away_high":28.88,"fan_cooling_readiness":"not + ready","device_locale":"en_US","temperature_scale":"F","battery_level":3.963,"error_code":"","maint_band_upper":0.39,"preconditioning_active":false,"fan_control_state":false,"away_temperature_high_enabled":false,"dehumidifier_fan_activation":false,"learning_days_completed_heat":598,"humidifier_fan_activation":false,"pin_star_description":"none","upper_safety_temp_enabled":false,"dual_fuel_selected":false,"preconditioning_enabled":false,"current_humidity":50,"dual_fuel_breakpoint":-1,"postal_code":"94602","backplate_mono_version":"4.0.20","alt_heat_source":"gas","aux_lockout_leaf":10,"has_heat_pump":false,"heater_delivery":"forced-air","away_temperature_low":12.778,"auto_away_reset":false,"radiant_control_enabled":false,"has_air_filter":true,"temperature_lock":false,"dehumidifier_type":"unknown","time_to_target_training":"training","upper_safety_temp":35,"humidity_control_lockout_enabled":false,"fan_timer_duration":900,"target_time_confidence":0,"pin_w1_description":"heat","temperature_lock_low_temp":20,"where_id":"00000000-0000-0000-0000-000100000001","forced_air":true,"temperature_lock_pin_hash":"","auto_dehum_enabled":false,"leaf_type":1,"backplate_mono_info":"TFE + (BP_D2) 4.0.20 (root@bamboo) 2014-02-03 10:06:33","has_dual_fuel":false,"star_type":"unknown","learning_time":1703,"maint_band_lower":0.39,"creation_time":1420654958512,"has_humidifier":false,"learning_days_completed_range":0,"dehumidifier_orientation_selected":"unknown","leaf_schedule_delta":1.11,"logging_priority":"informational","user_brightness":"medium","leaf_away_low":16.835,"pin_rc_description":"none","auto_dehum_state":false,"serial_number":"80C4887E69DF00D9","heat_x2_source":"electric","mac_address":"18b430093686","fan_duty_start_time":50400,"time_to_target":0,"backplate_model":"Backplate-2.2","heat_link_connection":0,"model_version":"Display-2.1","heat_pump_aux_threshold_enabled":true,"ob_persistence":true,"schedules":[]}},"trip":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":32201,"$timestamp":1445885694252,"trips":[]}},"demand_response":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1}},"user":{"2423243":{"$version":9049,"$timestamp":1445885721137,"email":"test@yahoo.com","name":"test@yahoo.com","structures":["structure.0b47dcf0-7c13-11e5-8199-22000b420f99"],"structure_memberships":[{"structure":"structure.0b47dcf0-7c13-11e5-8199-22000b420f99","roles":["owner"]}]}},"link":{"fake3243E4FEE924":{"$version":10338,"$timestamp":1445954076171,"structure":"structure.0b47dcf0-7c13-11e5-8199-22000b420f99"}},"device_alert_dialog":{"fake3243E4FEE924":{"$version":-9248,"$timestamp":1445954076171,"dialog_data":"","dialog_id":"confirm-pairing"}},"geofence_info":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-31412,"$timestamp":1445885694252,"device_events":[],"fences":[]}},"metadata":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1356998400000,"last_ip":"127.0.0.1","last_connection":1356998400000}},"user_settings":{"2423243":{"$version":31691,"$timestamp":1445354998080,"email_verified":true,"tos_accepted_version":1434564000000,"receive_marketing_emails":true,"receive_nest_emails":true,"receive_support_emails":true,"max_structures":2,"max_thermostats":40,"max_thermostats_per_structure":20,"max_smoke_detectors_per_structure":18,"max_smoke_detectors":36,"max_wwn_devices_per_structure":10,"max_wwn_devices":20,"tos_minimum_version":1434564000000,"tos_current_version":1434564000000,"lang":"en_US"}},"schedule":{"fake3243E4FEE924":{"$version":21638,"$timestamp":1445954075940}},"structure_metadata":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-32678,"$timestamp":1445951380776,"entitlements_api_path":"/api/0.1/structure/0b47dcf0-7c13-11e5-8199-22000b420f99/entitlements?v=8a957eeb-c93a-4e47-aea4-fb31cfc65691"}},"shared":{"fake3243E4FEE924":{"$version":-13990,"$timestamp":1445956397555,"auto_away_learning":"ready","auto_away":0,"hvac_alt_heat_state":false,"compressor_lockout_enabled":false,"hvac_heat_x3_state":false,"target_temperature_type":"heat","hvac_heater_state":false,"can_heat":true,"hvac_emer_heat_state":false,"compressor_lockout_timeout":0,"hvac_cool_x2_state":false,"target_temperature_high":23.33333,"hvac_aux_heater_state":false,"hvac_heat_x2_state":false,"target_temperature_low":23.33333,"hvac_ac_state":false,"target_temperature":22.85,"hvac_fan_state":false,"target_change_pending":true,"name":"E924","current_temperature":21,"hvac_alt_heat_x2_state":false,"can_cool":true}},"safety_summary":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-21456,"$timestamp":1445885694252}}}' + http_version: '1.1' + recorded_at: Tue, 27 Oct 2015 14:05:00 GMT +- request: + method: post + uri: https://on6%DFn7d%AC%A0%B57%D4%F7j9ZD%5B%13g%12%AE%AA7~%FD+gwtO%12%A9%DA%CA%60&Ea%B7%DCp%05%18s%C2&%DD%F4%C2;%D9Bw%09%25I;%BC%D5x%D9:V%E99*rC%B92;4cV%5D%E7%E1%DC%C7%B2%B0%16O%94ZY%B6%20%94X%17%03%ED%1E%91%CC%09tNS(%C9%F2%20%E9%FEY%01%5C%3Cf%A4%E4@czfe09-front01-iad01.transport.home.nest.com/v2/put/structure.0b47dcf0-7c13-11e5-8199-22000b420f99 + body: + encoding: UTF-8 + string: '{"away_timestamp":1445954700,"away":false,"away_setter":0}' + headers: + host: + - czfe09-front01-iad01.transport.home.nest.com + user-agent: + - Nest/1.1.0.10 CFNetwork/548.0.4 + authorization: + - Basic b.2423243.ZKygtTfU92o5WkRbE2cSrqo3fv0rZ3d0TxKp2spgJkVht9xwBRhzwibd9MI72UJ3CSVJO7zVeNk6Vuk5KnJDuTI7NGNWXefh3MeysBZPlFpZtiCUWBcD7R6RzAl0TlMoyfIg6f5ZAVw8ZqTk + x-nl-user-id: + - '2423243' + x-nl-protocol-version: + - '1' + accept-language: + - en-us + connection: + - keep-alive + accept: + - "*/*" + response: + status: + code: 200 + message: OK + headers: + content-type: + - application/json + x-nl-defer-device-window: + - '120' + x-nl-skv-key: + - structure.0b47dcf0-7c13-11e5-8199-22000b420f99 + x-nl-skv-version: + - '15857' + x-nl-skv-timestamp: + - '1445956462746' + x-nl-service-timestamp: + - '1445956462788' + content-length: + - '0' + connection: + - keep-alive + body: + encoding: UTF-8 + string: '' + http_version: '1.1' + recorded_at: Tue, 27 Oct 2015 14:05:00 GMT +- request: + method: get + uri: https://on6%DFn7d%AC%A0%B57%D4%F7j9ZD%5B%13g%12%AE%AA7~%FD+gwtO%12%A9%DA%CA%60&Ea%B7%DCp%05%18s%C2&%DD%F4%C2;%D9Bw%09%25I;%BC%D5x%D9:V%E99*rC%B92;4cV%5D%E7%E1%DC%C7%B2%B0%16O%94ZY%B6%20%94X%17%03%ED%1E%91%CC%09tNS(%C9%F2%20%E9%FEY%01%5C%3Cf%A4%E4@czfe09-front01-iad01.transport.home.nest.com/v2/mobile/user.2423243 + body: + encoding: US-ASCII + string: '' + headers: + host: + - czfe09-front01-iad01.transport.home.nest.com + user-agent: + - Nest/1.1.0.10 CFNetwork/548.0.4 + authorization: + - Basic b.2423243.ZKygtTfU92o5WkRbE2cSrqo3fv0rZ3d0TxKp2spgJkVht9xwBRhzwibd9MI72UJ3CSVJO7zVeNk6Vuk5KnJDuTI7NGNWXefh3MeysBZPlFpZtiCUWBcD7R6RzAl0TlMoyfIg6f5ZAVw8ZqTk + x-nl-user-id: + - '2423243' + x-nl-protocol-version: + - '1' + accept-language: + - en-us + connection: + - keep-alive + accept: + - "*/*" + response: + status: + code: 200 + message: OK + headers: + content-type: + - application/json + x-nl-defer-device-window: + - '120' + x-nl-service-timestamp: + - '1445956463174' + content-length: + - '10890' + connection: + - keep-alive + body: + encoding: UTF-8 + string: '{"user_alert_dialog":{"2423243":{"$version":-31019,"$timestamp":1445954076171,"dialog_data":"","dialog_id":"confirm-pairing"}},"buckets":{"2423243":{"$version":12532,"$timestamp":1445956458542,"buckets":["user.2423243","user_alert_dialog.2423243","message_center.2423243","user_settings.2423243","buckets.2423243","device.fake3243E4FEE924","demand_response.fake3243E4FEE924","device_alert_dialog.fake3243E4FEE924","link.fake3243E4FEE924","message.fake3243E4FEE924","metadata.fake3243E4FEE924","schedule.fake3243E4FEE924","shared.fake3243E4FEE924","track.fake3243E4FEE924","tuneups.fake3243E4FEE924","energy_latest.fake3243E4FEE924","energy_weekly.fake3243E4FEE924","diamond_sensor_event.fake3243E4FEE924","diamond_sensor_config.fake3243E4FEE924","structure.0b47dcf0-7c13-11e5-8199-22000b420f99","where.0b47dcf0-7c13-11e5-8199-22000b420f99","utility.0b47dcf0-7c13-11e5-8199-22000b420f99","structure_history.0b47dcf0-7c13-11e5-8199-22000b420f99","trip.0b47dcf0-7c13-11e5-8199-22000b420f99","structure_metadata.0b47dcf0-7c13-11e5-8199-22000b420f99","safety.0b47dcf0-7c13-11e5-8199-22000b420f99","safety_summary.0b47dcf0-7c13-11e5-8199-22000b420f99","geofence_info.0b47dcf0-7c13-11e5-8199-22000b420f99"]}},"track":{"fake3243E4FEE924":{"$version":31457,"$timestamp":1445954075890,"online":false}},"message_center":{"2423243":{"$version":-1,"$timestamp":1325379661000,"messages":[]}},"safety":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":3651,"$timestamp":1445885694252,"audio_self_test_participants":[]}},"utility":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-1,"$timestamp":1}},"where":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":25319,"$timestamp":1445885694015,"wheres":[{"where_id":"00000000-0000-0000-0000-000100000001","name":"Basement"},{"where_id":"00000000-0000-0000-0000-00010000000d","name":"Bedroom"},{"where_id":"00000000-0000-0000-0000-000100000003","name":"Den"},{"where_id":"00000000-0000-0000-0000-000100000010","name":"Dining + Room"},{"where_id":"00000000-0000-0000-0000-000100000006","name":"Downstairs"},{"where_id":"00000000-0000-0000-0000-000100000000","name":"Entryway"},{"where_id":"00000000-0000-0000-0000-00010000000b","name":"Family + Room"},{"where_id":"00000000-0000-0000-0000-000100000002","name":"Hallway"},{"where_id":"00000000-0000-0000-0000-000100000008","name":"Kids + Room"},{"where_id":"00000000-0000-0000-0000-00010000000a","name":"Kitchen"},{"where_id":"00000000-0000-0000-0000-00010000000c","name":"Living + Room"},{"where_id":"00000000-0000-0000-0000-000100000005","name":"Master Bedroom"},{"where_id":"00000000-0000-0000-0000-00010000000e","name":"Office"},{"where_id":"00000000-0000-0000-0000-00010000000f","name":"Upstairs"}]}},"structure":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":15857,"$timestamp":1445956462746,"away_timestamp":1445954700,"away":false,"location":"Palm + Harbor, FL","name":"Chrome App Structure","postal_code":"34683","topaz_away":false,"creation_time":1445885694067,"country_code":"US","away_setter":0,"topaz_hush_key":"FmyQftpkdU9eH9St4mMWhQ==","user":"user.2423243","devices":["device.fake3243E4FEE924"],"swarm":["device.fake3243E4FEE924"],"fabric_ids":[],"clutches":[],"members":[{"user":"user.2423243","roles":["owner"]}]}},"message":{"fake3243E4FEE924":{"$version":-24419,"$timestamp":1445954076171,"1":{"cmd":"register"}}},"tuneups":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1}},"device":{"fake3243E4FEE924":{"$version":-27199,"$timestamp":1445956401831,"heatpump_setback_active":false,"emer_heat_enable":false,"touched_by":{},"local_ip":"192.168.2.4","switch_system_off":false,"away_temperature_high":24.444,"cooling_source":"electric","temperature_lock_high_temp":22.222,"y2_type":"unknown","leaf_threshold_cool":0,"heater_source":"gas","fan_cooling_state":false,"note_codes":[],"compressor_lockout_leaf":-17.8,"has_x3_heat":false,"target_humidity_enabled":false,"heat_x3_source":"electric","alt_heat_delivery":"forced-air","has_x2_heat":false,"fan_mode":"auto","rssi":66,"sunlight_correction_active":false,"emer_heat_delivery":"forced-air","heatpump_savings":"off","pin_y2_description":"none","humidity_control_lockout_end_time":0,"filter_reminder_level":0,"gear_opacity":0,"filter_reminder_enabled":true,"capability_level":4,"schedule_learning_reset":false,"has_x2_cool":false,"hvac_pins":"W1,C,Rh,G","ob_orientation":"O","cooling_delivery":"unknown","range_enable":false,"auto_away_enable":true,"dual_fuel_breakpoint_override":"none","lower_safety_temp_enabled":true,"has_fan":true,"dehumidifier_state":false,"emer_heat_source":"electric","nlclient_state":"","heatpump_ready":false,"cooling_x2_delivery":"unknown","available_locales":"en_US,fr_CA,es_US,en_GB","current_version":"4.1","has_fossil_fuel":true,"learning_state":"slow","pin_ob_description":"none","pin_rh_description":"power","has_alt_heat":false,"safety_temp_activating_hvac":false,"fan_duty_cycle":900,"pin_y1_description":"none","humidifier_state":false,"gear_threshold_high":0,"backplate_serial_number":"02BA01AB241200CW","has_x2_alt_heat":false,"heat_x3_delivery":"forced-air","leaf_threshold_heat":18.334,"is_on_stand":false,"has_emer_heat":false,"learning_mode":true,"leaf_learning":"ready","has_aux_heat":false,"filter_changed_set_date":1386452016,"aux_heat_source":"electric","backplate_bsl_info":"BSL","alt_heat_x2_source":"gas","sunlight_correction_ready":true,"humidifier_type":"unknown","pin_c_description":"power","humidity_control_lockout_start_time":0,"pin_w2aux_description":"none","fan_timer_timeout":0,"country_code":"US","sunlight_correction_enabled":true,"heat_x2_delivery":"forced-air","target_humidity":35,"gear_threshold_low":0,"lower_safety_temp":4.738,"cooling_x2_source":"electric","equipment_type":"electric","heat_pump_aux_threshold":10,"alt_heat_x2_delivery":"forced-air","heat_pump_comp_threshold":-31.5,"learning_days_completed_cool":0,"backplate_bsl_version":"2.1","current_schedule_mode":"HEAT","fan_duty_end_time":68400,"hvac_wires":"Heat,Fan,Common + Wire,Rh","leaf":true,"type":"TBD","pin_g_description":"fan","click_sound":"on","away_temperature_low_enabled":true,"aux_heat_delivery":"forced-air","filter_changed_date":1387065600,"hvac_safety_shutoff_active":false,"heat_pump_comp_threshold_enabled":false,"has_dehumidifier":false,"preconditioning_ready":true,"fan_cooling_enabled":true,"leaf_away_high":28.88,"fan_cooling_readiness":"not + ready","device_locale":"en_US","temperature_scale":"F","battery_level":3.963,"error_code":"","maint_band_upper":0.39,"preconditioning_active":false,"fan_control_state":false,"away_temperature_high_enabled":false,"dehumidifier_fan_activation":false,"learning_days_completed_heat":598,"humidifier_fan_activation":false,"pin_star_description":"none","upper_safety_temp_enabled":false,"dual_fuel_selected":false,"preconditioning_enabled":false,"current_humidity":50,"dual_fuel_breakpoint":-1,"postal_code":"94602","backplate_mono_version":"4.0.20","alt_heat_source":"gas","aux_lockout_leaf":10,"has_heat_pump":false,"heater_delivery":"forced-air","away_temperature_low":12.778,"auto_away_reset":false,"radiant_control_enabled":false,"has_air_filter":true,"temperature_lock":false,"dehumidifier_type":"unknown","time_to_target_training":"training","upper_safety_temp":35,"humidity_control_lockout_enabled":false,"fan_timer_duration":900,"target_time_confidence":0,"pin_w1_description":"heat","temperature_lock_low_temp":20,"where_id":"00000000-0000-0000-0000-000100000001","forced_air":true,"temperature_lock_pin_hash":"","auto_dehum_enabled":false,"leaf_type":1,"backplate_mono_info":"TFE + (BP_D2) 4.0.20 (root@bamboo) 2014-02-03 10:06:33","has_dual_fuel":false,"star_type":"unknown","learning_time":1703,"maint_band_lower":0.39,"creation_time":1420654958512,"has_humidifier":false,"learning_days_completed_range":0,"dehumidifier_orientation_selected":"unknown","leaf_schedule_delta":1.11,"logging_priority":"informational","user_brightness":"medium","leaf_away_low":16.835,"pin_rc_description":"none","auto_dehum_state":false,"serial_number":"80C4887E69DF00D9","heat_x2_source":"electric","mac_address":"18b430093686","fan_duty_start_time":50400,"time_to_target":0,"backplate_model":"Backplate-2.2","heat_link_connection":0,"model_version":"Display-2.1","heat_pump_aux_threshold_enabled":true,"ob_persistence":true,"schedules":[]}},"trip":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":32201,"$timestamp":1445885694252,"trips":[]}},"demand_response":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1}},"user":{"2423243":{"$version":9049,"$timestamp":1445885721137,"email":"test@yahoo.com","name":"test@yahoo.com","structures":["structure.0b47dcf0-7c13-11e5-8199-22000b420f99"],"structure_memberships":[{"structure":"structure.0b47dcf0-7c13-11e5-8199-22000b420f99","roles":["owner"]}]}},"link":{"fake3243E4FEE924":{"$version":10338,"$timestamp":1445954076171,"structure":"structure.0b47dcf0-7c13-11e5-8199-22000b420f99"}},"device_alert_dialog":{"fake3243E4FEE924":{"$version":-9248,"$timestamp":1445954076171,"dialog_data":"","dialog_id":"confirm-pairing"}},"geofence_info":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-31412,"$timestamp":1445885694252,"device_events":[],"fences":[]}},"metadata":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1356998400000,"last_ip":"127.0.0.1","last_connection":1356998400000}},"user_settings":{"2423243":{"$version":31691,"$timestamp":1445354998080,"email_verified":true,"tos_accepted_version":1434564000000,"receive_marketing_emails":true,"receive_nest_emails":true,"receive_support_emails":true,"max_structures":2,"max_thermostats":40,"max_thermostats_per_structure":20,"max_smoke_detectors_per_structure":18,"max_smoke_detectors":36,"max_wwn_devices_per_structure":10,"max_wwn_devices":20,"tos_minimum_version":1434564000000,"tos_current_version":1434564000000,"lang":"en_US"}},"schedule":{"fake3243E4FEE924":{"$version":21638,"$timestamp":1445954075940}},"structure_metadata":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-32678,"$timestamp":1445951380776,"entitlements_api_path":"/api/0.1/structure/0b47dcf0-7c13-11e5-8199-22000b420f99/entitlements?v=8a957eeb-c93a-4e47-aea4-fb31cfc65691"}},"shared":{"fake3243E4FEE924":{"$version":-13990,"$timestamp":1445956397555,"auto_away_learning":"ready","auto_away":0,"hvac_alt_heat_state":false,"compressor_lockout_enabled":false,"hvac_heat_x3_state":false,"target_temperature_type":"heat","hvac_heater_state":false,"can_heat":true,"hvac_emer_heat_state":false,"compressor_lockout_timeout":0,"hvac_cool_x2_state":false,"target_temperature_high":23.33333,"hvac_aux_heater_state":false,"hvac_heat_x2_state":false,"target_temperature_low":23.33333,"hvac_ac_state":false,"target_temperature":22.85,"hvac_fan_state":false,"target_change_pending":true,"name":"E924","current_temperature":21,"hvac_alt_heat_x2_state":false,"can_cool":true}},"safety_summary":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-21456,"$timestamp":1445885694252}}}' + http_version: '1.1' + recorded_at: Tue, 27 Oct 2015 14:05:00 GMT +recorded_with: VCR 2.9.3 diff --git a/fixtures/vcr_cassettes/NestThermostat_Nest/sets_the_fan_mode.yml b/fixtures/vcr_cassettes/NestThermostat_Nest/sets_the_fan_mode.yml new file mode 100644 index 0000000..9727d0b --- /dev/null +++ b/fixtures/vcr_cassettes/NestThermostat_Nest/sets_the_fan_mode.yml @@ -0,0 +1,203 @@ +--- +http_interactions: +- request: + method: post + uri: https://on6%DFn7d%AC%A0%B57%D4%F7j9ZD%5B%13g%12%AE%AA7~%FD+gwtO%12%A9%DA%CA%60&Ea%B7%DCp%05%18s%C2&%DD%F4%C2;%D9Bw%09%25I;%BC%D5x%D9:V%E99*rC%B92;4cV%5D%E7%E1%DC%C7%B2%B0%16O%94ZY%B6%20%94X%17%03%ED%1E%91%CC%09tNS(%C9%F2%20%E9%FEY%01%5C%3Cf%A4%E4@czfe09-front01-iad01.transport.home.nest.com/v2/put/device.fake3243E4FEE924 + body: + encoding: UTF-8 + string: '{"fan_mode":"on"}' + headers: + host: + - czfe09-front01-iad01.transport.home.nest.com + user-agent: + - Nest/1.1.0.10 CFNetwork/548.0.4 + authorization: + - Basic b.2423243.ZKygtTfU92o5WkRbE2cSrqo3fv0rZ3d0TxKp2spgJkVht9xwBRhzwibd9MI72UJ3CSVJO7zVeNk6Vuk5KnJDuTI7NGNWXefh3MeysBZPlFpZtiCUWBcD7R6RzAl0TlMoyfIg6f5ZAVw8ZqTk + x-nl-user-id: + - '2423243' + x-nl-protocol-version: + - '1' + accept-language: + - en-us + connection: + - keep-alive + accept: + - "*/*" + response: + status: + code: 200 + message: OK + headers: + content-type: + - application/json + x-nl-defer-device-window: + - '120' + x-nl-skv-key: + - device.fake3243E4FEE924 + x-nl-skv-version: + - "-21452" + x-nl-skv-timestamp: + - '1445956473847' + x-nl-service-timestamp: + - '1445956473889' + content-length: + - '0' + connection: + - keep-alive + body: + encoding: UTF-8 + string: '' + http_version: '1.1' + recorded_at: Tue, 27 Oct 2015 14:34:34 GMT +- request: + method: get + uri: https://on6%DFn7d%AC%A0%B57%D4%F7j9ZD%5B%13g%12%AE%AA7~%FD+gwtO%12%A9%DA%CA%60&Ea%B7%DCp%05%18s%C2&%DD%F4%C2;%D9Bw%09%25I;%BC%D5x%D9:V%E99*rC%B92;4cV%5D%E7%E1%DC%C7%B2%B0%16O%94ZY%B6%20%94X%17%03%ED%1E%91%CC%09tNS(%C9%F2%20%E9%FEY%01%5C%3Cf%A4%E4@czfe09-front01-iad01.transport.home.nest.com/v2/mobile/user.2423243 + body: + encoding: US-ASCII + string: '' + headers: + host: + - czfe09-front01-iad01.transport.home.nest.com + user-agent: + - Nest/1.1.0.10 CFNetwork/548.0.4 + authorization: + - Basic b.2423243.ZKygtTfU92o5WkRbE2cSrqo3fv0rZ3d0TxKp2spgJkVht9xwBRhzwibd9MI72UJ3CSVJO7zVeNk6Vuk5KnJDuTI7NGNWXefh3MeysBZPlFpZtiCUWBcD7R6RzAl0TlMoyfIg6f5ZAVw8ZqTk + x-nl-user-id: + - '2423243' + x-nl-protocol-version: + - '1' + accept-language: + - en-us + connection: + - keep-alive + accept: + - "*/*" + response: + status: + code: 200 + message: OK + headers: + content-type: + - application/json + x-nl-defer-device-window: + - '120' + x-nl-service-timestamp: + - '1445956474297' + content-length: + - '10888' + connection: + - keep-alive + body: + encoding: UTF-8 + string: '{"user_alert_dialog":{"2423243":{"$version":-31019,"$timestamp":1445954076171,"dialog_data":"","dialog_id":"confirm-pairing"}},"buckets":{"2423243":{"$version":12532,"$timestamp":1445956458542,"buckets":["user.2423243","user_alert_dialog.2423243","message_center.2423243","user_settings.2423243","buckets.2423243","device.fake3243E4FEE924","demand_response.fake3243E4FEE924","device_alert_dialog.fake3243E4FEE924","link.fake3243E4FEE924","message.fake3243E4FEE924","metadata.fake3243E4FEE924","schedule.fake3243E4FEE924","shared.fake3243E4FEE924","track.fake3243E4FEE924","tuneups.fake3243E4FEE924","energy_latest.fake3243E4FEE924","energy_weekly.fake3243E4FEE924","diamond_sensor_event.fake3243E4FEE924","diamond_sensor_config.fake3243E4FEE924","structure.0b47dcf0-7c13-11e5-8199-22000b420f99","where.0b47dcf0-7c13-11e5-8199-22000b420f99","utility.0b47dcf0-7c13-11e5-8199-22000b420f99","structure_history.0b47dcf0-7c13-11e5-8199-22000b420f99","trip.0b47dcf0-7c13-11e5-8199-22000b420f99","structure_metadata.0b47dcf0-7c13-11e5-8199-22000b420f99","safety.0b47dcf0-7c13-11e5-8199-22000b420f99","safety_summary.0b47dcf0-7c13-11e5-8199-22000b420f99","geofence_info.0b47dcf0-7c13-11e5-8199-22000b420f99"]}},"track":{"fake3243E4FEE924":{"$version":31457,"$timestamp":1445954075890,"online":false}},"message_center":{"2423243":{"$version":-1,"$timestamp":1325379661000,"messages":[]}},"safety":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":3651,"$timestamp":1445885694252,"audio_self_test_participants":[]}},"utility":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-1,"$timestamp":1}},"where":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":25319,"$timestamp":1445885694015,"wheres":[{"where_id":"00000000-0000-0000-0000-000100000001","name":"Basement"},{"where_id":"00000000-0000-0000-0000-00010000000d","name":"Bedroom"},{"where_id":"00000000-0000-0000-0000-000100000003","name":"Den"},{"where_id":"00000000-0000-0000-0000-000100000010","name":"Dining + Room"},{"where_id":"00000000-0000-0000-0000-000100000006","name":"Downstairs"},{"where_id":"00000000-0000-0000-0000-000100000000","name":"Entryway"},{"where_id":"00000000-0000-0000-0000-00010000000b","name":"Family + Room"},{"where_id":"00000000-0000-0000-0000-000100000002","name":"Hallway"},{"where_id":"00000000-0000-0000-0000-000100000008","name":"Kids + Room"},{"where_id":"00000000-0000-0000-0000-00010000000a","name":"Kitchen"},{"where_id":"00000000-0000-0000-0000-00010000000c","name":"Living + Room"},{"where_id":"00000000-0000-0000-0000-000100000005","name":"Master Bedroom"},{"where_id":"00000000-0000-0000-0000-00010000000e","name":"Office"},{"where_id":"00000000-0000-0000-0000-00010000000f","name":"Upstairs"}]}},"structure":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":15857,"$timestamp":1445956462746,"away_timestamp":1445954700,"away":false,"location":"Palm + Harbor, FL","name":"Chrome App Structure","postal_code":"34683","topaz_away":false,"creation_time":1445885694067,"country_code":"US","away_setter":0,"topaz_hush_key":"FmyQftpkdU9eH9St4mMWhQ==","user":"user.2423243","devices":["device.fake3243E4FEE924"],"swarm":["device.fake3243E4FEE924"],"fabric_ids":[],"clutches":[],"members":[{"user":"user.2423243","roles":["owner"]}]}},"message":{"fake3243E4FEE924":{"$version":-24419,"$timestamp":1445954076171,"1":{"cmd":"register"}}},"tuneups":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1}},"device":{"fake3243E4FEE924":{"$version":-21452,"$timestamp":1445956473847,"heatpump_setback_active":false,"touched_by":{},"emer_heat_enable":false,"switch_system_off":false,"local_ip":"192.168.2.4","away_temperature_high":24.444,"y2_type":"unknown","temperature_lock_high_temp":22.222,"cooling_source":"electric","leaf_threshold_cool":0,"fan_cooling_state":false,"heater_source":"gas","note_codes":[],"compressor_lockout_leaf":-17.8,"has_x3_heat":false,"target_humidity_enabled":false,"heat_x3_source":"electric","alt_heat_delivery":"forced-air","has_x2_heat":false,"fan_mode":"on","rssi":66,"sunlight_correction_active":false,"emer_heat_delivery":"forced-air","pin_y2_description":"none","heatpump_savings":"off","humidity_control_lockout_end_time":0,"filter_reminder_level":0,"gear_opacity":0,"filter_reminder_enabled":true,"capability_level":4,"schedule_learning_reset":false,"has_x2_cool":false,"ob_orientation":"O","hvac_pins":"W1,C,Rh,G","cooling_delivery":"unknown","range_enable":false,"dual_fuel_breakpoint_override":"none","auto_away_enable":true,"lower_safety_temp_enabled":true,"has_fan":true,"dehumidifier_state":false,"nlclient_state":"","emer_heat_source":"electric","heatpump_ready":false,"cooling_x2_delivery":"unknown","available_locales":"en_US,fr_CA,es_US,en_GB","current_version":"4.1","has_fossil_fuel":true,"learning_state":"slow","pin_ob_description":"none","pin_rh_description":"power","has_alt_heat":false,"safety_temp_activating_hvac":false,"fan_duty_cycle":900,"pin_y1_description":"none","humidifier_state":false,"gear_threshold_high":0,"backplate_serial_number":"02BA01AB241200CW","has_x2_alt_heat":false,"heat_x3_delivery":"forced-air","leaf_threshold_heat":18.334,"is_on_stand":false,"has_emer_heat":false,"learning_mode":true,"leaf_learning":"ready","has_aux_heat":false,"filter_changed_set_date":1386452016,"aux_heat_source":"electric","backplate_bsl_info":"BSL","alt_heat_x2_source":"gas","sunlight_correction_ready":true,"humidifier_type":"unknown","pin_c_description":"power","humidity_control_lockout_start_time":0,"pin_w2aux_description":"none","fan_timer_timeout":0,"country_code":"US","sunlight_correction_enabled":true,"heat_x2_delivery":"forced-air","target_humidity":35,"gear_threshold_low":0,"lower_safety_temp":4.738,"cooling_x2_source":"electric","equipment_type":"electric","heat_pump_aux_threshold":10,"alt_heat_x2_delivery":"forced-air","heat_pump_comp_threshold":-31.5,"learning_days_completed_cool":0,"backplate_bsl_version":"2.1","current_schedule_mode":"HEAT","fan_duty_end_time":68400,"hvac_wires":"Heat,Fan,Common + Wire,Rh","leaf":true,"type":"TBD","pin_g_description":"fan","click_sound":"on","aux_heat_delivery":"forced-air","away_temperature_low_enabled":true,"filter_changed_date":1387065600,"hvac_safety_shutoff_active":false,"heat_pump_comp_threshold_enabled":false,"preconditioning_ready":true,"has_dehumidifier":false,"fan_cooling_enabled":true,"leaf_away_high":28.88,"fan_cooling_readiness":"not + ready","temperature_scale":"F","device_locale":"en_US","preconditioning_active":false,"maint_band_upper":0.39,"error_code":"","battery_level":3.963,"fan_control_state":false,"away_temperature_high_enabled":false,"learning_days_completed_heat":598,"dehumidifier_fan_activation":false,"humidifier_fan_activation":false,"upper_safety_temp_enabled":false,"pin_star_description":"none","preconditioning_enabled":false,"dual_fuel_selected":false,"dual_fuel_breakpoint":-1,"current_humidity":50,"postal_code":"94602","alt_heat_source":"gas","backplate_mono_version":"4.0.20","aux_lockout_leaf":10,"has_heat_pump":false,"heater_delivery":"forced-air","radiant_control_enabled":false,"auto_away_reset":false,"away_temperature_low":12.778,"temperature_lock":false,"has_air_filter":true,"upper_safety_temp":35,"time_to_target_training":"training","dehumidifier_type":"unknown","humidity_control_lockout_enabled":false,"target_time_confidence":0,"fan_timer_duration":900,"where_id":"00000000-0000-0000-0000-000100000001","temperature_lock_low_temp":20,"pin_w1_description":"heat","forced_air":true,"temperature_lock_pin_hash":"","auto_dehum_enabled":false,"leaf_type":1,"backplate_mono_info":"TFE + (BP_D2) 4.0.20 (root@bamboo) 2014-02-03 10:06:33","star_type":"unknown","has_dual_fuel":false,"creation_time":1420654958512,"maint_band_lower":0.39,"learning_time":1703,"has_humidifier":false,"learning_days_completed_range":0,"dehumidifier_orientation_selected":"unknown","leaf_schedule_delta":1.11,"logging_priority":"informational","user_brightness":"medium","leaf_away_low":16.835,"pin_rc_description":"none","serial_number":"80C4887E69DF00D9","auto_dehum_state":false,"mac_address":"18b430093686","heat_x2_source":"electric","fan_duty_start_time":50400,"time_to_target":0,"backplate_model":"Backplate-2.2","heat_link_connection":0,"model_version":"Display-2.1","heat_pump_aux_threshold_enabled":true,"ob_persistence":true,"schedules":[]}},"trip":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":32201,"$timestamp":1445885694252,"trips":[]}},"demand_response":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1}},"user":{"2423243":{"$version":9049,"$timestamp":1445885721137,"email":"test@yahoo.com","name":"test@yahoo.com","structures":["structure.0b47dcf0-7c13-11e5-8199-22000b420f99"],"structure_memberships":[{"structure":"structure.0b47dcf0-7c13-11e5-8199-22000b420f99","roles":["owner"]}]}},"link":{"fake3243E4FEE924":{"$version":10338,"$timestamp":1445954076171,"structure":"structure.0b47dcf0-7c13-11e5-8199-22000b420f99"}},"device_alert_dialog":{"fake3243E4FEE924":{"$version":-9248,"$timestamp":1445954076171,"dialog_data":"","dialog_id":"confirm-pairing"}},"geofence_info":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-31412,"$timestamp":1445885694252,"device_events":[],"fences":[]}},"metadata":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1356998400000,"last_ip":"127.0.0.1","last_connection":1356998400000}},"user_settings":{"2423243":{"$version":31691,"$timestamp":1445354998080,"email_verified":true,"tos_accepted_version":1434564000000,"receive_marketing_emails":true,"receive_nest_emails":true,"receive_support_emails":true,"max_structures":2,"max_thermostats":40,"max_thermostats_per_structure":20,"max_smoke_detectors_per_structure":18,"max_smoke_detectors":36,"max_wwn_devices_per_structure":10,"max_wwn_devices":20,"tos_minimum_version":1434564000000,"tos_current_version":1434564000000,"lang":"en_US"}},"schedule":{"fake3243E4FEE924":{"$version":21638,"$timestamp":1445954075940}},"structure_metadata":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-32678,"$timestamp":1445951380776,"entitlements_api_path":"/api/0.1/structure/0b47dcf0-7c13-11e5-8199-22000b420f99/entitlements?v=8a957eeb-c93a-4e47-aea4-fb31cfc65691"}},"shared":{"fake3243E4FEE924":{"$version":-22003,"$timestamp":1445956471869,"auto_away_learning":"ready","auto_away":0,"hvac_alt_heat_state":false,"compressor_lockout_enabled":false,"hvac_heat_x3_state":false,"target_temperature_type":"heat","hvac_heater_state":false,"can_heat":true,"hvac_emer_heat_state":false,"compressor_lockout_timeout":0,"hvac_cool_x2_state":false,"target_temperature_high":23.33333,"hvac_aux_heater_state":false,"hvac_heat_x2_state":false,"target_temperature_low":23.33333,"hvac_ac_state":false,"target_temperature":22.85,"hvac_fan_state":false,"target_change_pending":true,"name":"E924","current_temperature":21,"hvac_alt_heat_x2_state":false,"can_cool":true}},"safety_summary":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-21456,"$timestamp":1445885694252}}}' + http_version: '1.1' + recorded_at: Tue, 27 Oct 2015 14:34:34 GMT +- request: + method: post + uri: https://on6%DFn7d%AC%A0%B57%D4%F7j9ZD%5B%13g%12%AE%AA7~%FD+gwtO%12%A9%DA%CA%60&Ea%B7%DCp%05%18s%C2&%DD%F4%C2;%D9Bw%09%25I;%BC%D5x%D9:V%E99*rC%B92;4cV%5D%E7%E1%DC%C7%B2%B0%16O%94ZY%B6%20%94X%17%03%ED%1E%91%CC%09tNS(%C9%F2%20%E9%FEY%01%5C%3Cf%A4%E4@czfe09-front01-iad01.transport.home.nest.com/v2/put/device.fake3243E4FEE924 + body: + encoding: UTF-8 + string: '{"fan_mode":"auto"}' + headers: + host: + - czfe09-front01-iad01.transport.home.nest.com + user-agent: + - Nest/1.1.0.10 CFNetwork/548.0.4 + authorization: + - Basic b.2423243.ZKygtTfU92o5WkRbE2cSrqo3fv0rZ3d0TxKp2spgJkVht9xwBRhzwibd9MI72UJ3CSVJO7zVeNk6Vuk5KnJDuTI7NGNWXefh3MeysBZPlFpZtiCUWBcD7R6RzAl0TlMoyfIg6f5ZAVw8ZqTk + x-nl-user-id: + - '2423243' + x-nl-protocol-version: + - '1' + accept-language: + - en-us + connection: + - keep-alive + accept: + - "*/*" + response: + status: + code: 200 + message: OK + headers: + content-type: + - application/json + x-nl-defer-device-window: + - '120' + x-nl-skv-key: + - device.fake3243E4FEE924 + x-nl-skv-version: + - "-4559" + x-nl-skv-timestamp: + - '1445956474596' + x-nl-service-timestamp: + - '1445956474624' + content-length: + - '0' + connection: + - keep-alive + body: + encoding: UTF-8 + string: '' + http_version: '1.1' + recorded_at: Tue, 27 Oct 2015 14:34:35 GMT +- request: + method: get + uri: https://on6%DFn7d%AC%A0%B57%D4%F7j9ZD%5B%13g%12%AE%AA7~%FD+gwtO%12%A9%DA%CA%60&Ea%B7%DCp%05%18s%C2&%DD%F4%C2;%D9Bw%09%25I;%BC%D5x%D9:V%E99*rC%B92;4cV%5D%E7%E1%DC%C7%B2%B0%16O%94ZY%B6%20%94X%17%03%ED%1E%91%CC%09tNS(%C9%F2%20%E9%FEY%01%5C%3Cf%A4%E4@czfe09-front01-iad01.transport.home.nest.com/v2/mobile/user.2423243 + body: + encoding: US-ASCII + string: '' + headers: + host: + - czfe09-front01-iad01.transport.home.nest.com + user-agent: + - Nest/1.1.0.10 CFNetwork/548.0.4 + authorization: + - Basic b.2423243.ZKygtTfU92o5WkRbE2cSrqo3fv0rZ3d0TxKp2spgJkVht9xwBRhzwibd9MI72UJ3CSVJO7zVeNk6Vuk5KnJDuTI7NGNWXefh3MeysBZPlFpZtiCUWBcD7R6RzAl0TlMoyfIg6f5ZAVw8ZqTk + x-nl-user-id: + - '2423243' + x-nl-protocol-version: + - '1' + accept-language: + - en-us + connection: + - keep-alive + accept: + - "*/*" + response: + status: + code: 200 + message: OK + headers: + content-type: + - application/json + x-nl-defer-device-window: + - '120' + x-nl-service-timestamp: + - '1445956474978' + content-length: + - '10889' + connection: + - keep-alive + body: + encoding: UTF-8 + string: '{"user_alert_dialog":{"2423243":{"$version":-31019,"$timestamp":1445954076171,"dialog_data":"","dialog_id":"confirm-pairing"}},"buckets":{"2423243":{"$version":12532,"$timestamp":1445956458542,"buckets":["user.2423243","user_alert_dialog.2423243","message_center.2423243","user_settings.2423243","buckets.2423243","device.fake3243E4FEE924","demand_response.fake3243E4FEE924","device_alert_dialog.fake3243E4FEE924","link.fake3243E4FEE924","message.fake3243E4FEE924","metadata.fake3243E4FEE924","schedule.fake3243E4FEE924","shared.fake3243E4FEE924","track.fake3243E4FEE924","tuneups.fake3243E4FEE924","energy_latest.fake3243E4FEE924","energy_weekly.fake3243E4FEE924","diamond_sensor_event.fake3243E4FEE924","diamond_sensor_config.fake3243E4FEE924","structure.0b47dcf0-7c13-11e5-8199-22000b420f99","where.0b47dcf0-7c13-11e5-8199-22000b420f99","utility.0b47dcf0-7c13-11e5-8199-22000b420f99","structure_history.0b47dcf0-7c13-11e5-8199-22000b420f99","trip.0b47dcf0-7c13-11e5-8199-22000b420f99","structure_metadata.0b47dcf0-7c13-11e5-8199-22000b420f99","safety.0b47dcf0-7c13-11e5-8199-22000b420f99","safety_summary.0b47dcf0-7c13-11e5-8199-22000b420f99","geofence_info.0b47dcf0-7c13-11e5-8199-22000b420f99"]}},"track":{"fake3243E4FEE924":{"$version":31457,"$timestamp":1445954075890,"online":false}},"message_center":{"2423243":{"$version":-1,"$timestamp":1325379661000,"messages":[]}},"safety":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":3651,"$timestamp":1445885694252,"audio_self_test_participants":[]}},"utility":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-1,"$timestamp":1}},"where":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":25319,"$timestamp":1445885694015,"wheres":[{"where_id":"00000000-0000-0000-0000-000100000001","name":"Basement"},{"where_id":"00000000-0000-0000-0000-00010000000d","name":"Bedroom"},{"where_id":"00000000-0000-0000-0000-000100000003","name":"Den"},{"where_id":"00000000-0000-0000-0000-000100000010","name":"Dining + Room"},{"where_id":"00000000-0000-0000-0000-000100000006","name":"Downstairs"},{"where_id":"00000000-0000-0000-0000-000100000000","name":"Entryway"},{"where_id":"00000000-0000-0000-0000-00010000000b","name":"Family + Room"},{"where_id":"00000000-0000-0000-0000-000100000002","name":"Hallway"},{"where_id":"00000000-0000-0000-0000-000100000008","name":"Kids + Room"},{"where_id":"00000000-0000-0000-0000-00010000000a","name":"Kitchen"},{"where_id":"00000000-0000-0000-0000-00010000000c","name":"Living + Room"},{"where_id":"00000000-0000-0000-0000-000100000005","name":"Master Bedroom"},{"where_id":"00000000-0000-0000-0000-00010000000e","name":"Office"},{"where_id":"00000000-0000-0000-0000-00010000000f","name":"Upstairs"}]}},"structure":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":15857,"$timestamp":1445956462746,"away_timestamp":1445954700,"away":false,"location":"Palm + Harbor, FL","name":"Chrome App Structure","postal_code":"34683","topaz_away":false,"creation_time":1445885694067,"country_code":"US","away_setter":0,"topaz_hush_key":"FmyQftpkdU9eH9St4mMWhQ==","user":"user.2423243","devices":["device.fake3243E4FEE924"],"swarm":["device.fake3243E4FEE924"],"fabric_ids":[],"clutches":[],"members":[{"user":"user.2423243","roles":["owner"]}]}},"message":{"fake3243E4FEE924":{"$version":-24419,"$timestamp":1445954076171,"1":{"cmd":"register"}}},"tuneups":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1}},"device":{"fake3243E4FEE924":{"$version":-4559,"$timestamp":1445956474596,"heatpump_setback_active":false,"emer_heat_enable":false,"touched_by":{},"local_ip":"192.168.2.4","switch_system_off":false,"away_temperature_high":24.444,"cooling_source":"electric","temperature_lock_high_temp":22.222,"y2_type":"unknown","leaf_threshold_cool":0,"heater_source":"gas","fan_cooling_state":false,"note_codes":[],"compressor_lockout_leaf":-17.8,"has_x3_heat":false,"target_humidity_enabled":false,"heat_x3_source":"electric","alt_heat_delivery":"forced-air","has_x2_heat":false,"fan_mode":"auto","rssi":66,"sunlight_correction_active":false,"emer_heat_delivery":"forced-air","heatpump_savings":"off","pin_y2_description":"none","humidity_control_lockout_end_time":0,"filter_reminder_level":0,"gear_opacity":0,"filter_reminder_enabled":true,"capability_level":4,"schedule_learning_reset":false,"has_x2_cool":false,"hvac_pins":"W1,C,Rh,G","ob_orientation":"O","cooling_delivery":"unknown","range_enable":false,"auto_away_enable":true,"dual_fuel_breakpoint_override":"none","lower_safety_temp_enabled":true,"has_fan":true,"dehumidifier_state":false,"emer_heat_source":"electric","nlclient_state":"","heatpump_ready":false,"cooling_x2_delivery":"unknown","available_locales":"en_US,fr_CA,es_US,en_GB","current_version":"4.1","has_fossil_fuel":true,"learning_state":"slow","pin_ob_description":"none","pin_rh_description":"power","has_alt_heat":false,"safety_temp_activating_hvac":false,"fan_duty_cycle":900,"pin_y1_description":"none","humidifier_state":false,"gear_threshold_high":0,"backplate_serial_number":"02BA01AB241200CW","has_x2_alt_heat":false,"heat_x3_delivery":"forced-air","leaf_threshold_heat":18.334,"is_on_stand":false,"has_emer_heat":false,"learning_mode":true,"leaf_learning":"ready","has_aux_heat":false,"filter_changed_set_date":1386452016,"aux_heat_source":"electric","backplate_bsl_info":"BSL","alt_heat_x2_source":"gas","sunlight_correction_ready":true,"humidifier_type":"unknown","pin_c_description":"power","humidity_control_lockout_start_time":0,"pin_w2aux_description":"none","fan_timer_timeout":0,"country_code":"US","sunlight_correction_enabled":true,"heat_x2_delivery":"forced-air","target_humidity":35,"gear_threshold_low":0,"lower_safety_temp":4.738,"cooling_x2_source":"electric","equipment_type":"electric","heat_pump_aux_threshold":10,"alt_heat_x2_delivery":"forced-air","heat_pump_comp_threshold":-31.5,"learning_days_completed_cool":0,"backplate_bsl_version":"2.1","current_schedule_mode":"HEAT","fan_duty_end_time":68400,"hvac_wires":"Heat,Fan,Common + Wire,Rh","leaf":true,"type":"TBD","pin_g_description":"fan","click_sound":"on","away_temperature_low_enabled":true,"aux_heat_delivery":"forced-air","filter_changed_date":1387065600,"hvac_safety_shutoff_active":false,"heat_pump_comp_threshold_enabled":false,"has_dehumidifier":false,"preconditioning_ready":true,"fan_cooling_enabled":true,"leaf_away_high":28.88,"fan_cooling_readiness":"not + ready","device_locale":"en_US","temperature_scale":"F","battery_level":3.963,"error_code":"","maint_band_upper":0.39,"preconditioning_active":false,"fan_control_state":false,"away_temperature_high_enabled":false,"dehumidifier_fan_activation":false,"learning_days_completed_heat":598,"humidifier_fan_activation":false,"pin_star_description":"none","upper_safety_temp_enabled":false,"dual_fuel_selected":false,"preconditioning_enabled":false,"current_humidity":50,"dual_fuel_breakpoint":-1,"postal_code":"94602","backplate_mono_version":"4.0.20","alt_heat_source":"gas","aux_lockout_leaf":10,"has_heat_pump":false,"heater_delivery":"forced-air","away_temperature_low":12.778,"auto_away_reset":false,"radiant_control_enabled":false,"has_air_filter":true,"temperature_lock":false,"dehumidifier_type":"unknown","time_to_target_training":"training","upper_safety_temp":35,"humidity_control_lockout_enabled":false,"fan_timer_duration":900,"target_time_confidence":0,"pin_w1_description":"heat","temperature_lock_low_temp":20,"where_id":"00000000-0000-0000-0000-000100000001","forced_air":true,"temperature_lock_pin_hash":"","auto_dehum_enabled":false,"leaf_type":1,"backplate_mono_info":"TFE + (BP_D2) 4.0.20 (root@bamboo) 2014-02-03 10:06:33","has_dual_fuel":false,"star_type":"unknown","learning_time":1703,"maint_band_lower":0.39,"creation_time":1420654958512,"has_humidifier":false,"learning_days_completed_range":0,"dehumidifier_orientation_selected":"unknown","leaf_schedule_delta":1.11,"logging_priority":"informational","user_brightness":"medium","leaf_away_low":16.835,"pin_rc_description":"none","auto_dehum_state":false,"serial_number":"80C4887E69DF00D9","heat_x2_source":"electric","mac_address":"18b430093686","fan_duty_start_time":50400,"time_to_target":0,"backplate_model":"Backplate-2.2","heat_link_connection":0,"model_version":"Display-2.1","heat_pump_aux_threshold_enabled":true,"ob_persistence":true,"schedules":[]}},"trip":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":32201,"$timestamp":1445885694252,"trips":[]}},"demand_response":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1}},"user":{"2423243":{"$version":9049,"$timestamp":1445885721137,"email":"test@yahoo.com","name":"test@yahoo.com","structures":["structure.0b47dcf0-7c13-11e5-8199-22000b420f99"],"structure_memberships":[{"structure":"structure.0b47dcf0-7c13-11e5-8199-22000b420f99","roles":["owner"]}]}},"link":{"fake3243E4FEE924":{"$version":10338,"$timestamp":1445954076171,"structure":"structure.0b47dcf0-7c13-11e5-8199-22000b420f99"}},"device_alert_dialog":{"fake3243E4FEE924":{"$version":-9248,"$timestamp":1445954076171,"dialog_data":"","dialog_id":"confirm-pairing"}},"geofence_info":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-31412,"$timestamp":1445885694252,"device_events":[],"fences":[]}},"metadata":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1356998400000,"last_ip":"127.0.0.1","last_connection":1356998400000}},"user_settings":{"2423243":{"$version":31691,"$timestamp":1445354998080,"email_verified":true,"tos_accepted_version":1434564000000,"receive_marketing_emails":true,"receive_nest_emails":true,"receive_support_emails":true,"max_structures":2,"max_thermostats":40,"max_thermostats_per_structure":20,"max_smoke_detectors_per_structure":18,"max_smoke_detectors":36,"max_wwn_devices_per_structure":10,"max_wwn_devices":20,"tos_minimum_version":1434564000000,"tos_current_version":1434564000000,"lang":"en_US"}},"schedule":{"fake3243E4FEE924":{"$version":21638,"$timestamp":1445954075940}},"structure_metadata":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-32678,"$timestamp":1445951380776,"entitlements_api_path":"/api/0.1/structure/0b47dcf0-7c13-11e5-8199-22000b420f99/entitlements?v=8a957eeb-c93a-4e47-aea4-fb31cfc65691"}},"shared":{"fake3243E4FEE924":{"$version":-22003,"$timestamp":1445956471869,"auto_away_learning":"ready","auto_away":0,"hvac_alt_heat_state":false,"compressor_lockout_enabled":false,"hvac_heat_x3_state":false,"target_temperature_type":"heat","hvac_heater_state":false,"can_heat":true,"hvac_emer_heat_state":false,"compressor_lockout_timeout":0,"hvac_cool_x2_state":false,"target_temperature_high":23.33333,"hvac_aux_heater_state":false,"hvac_heat_x2_state":false,"target_temperature_low":23.33333,"hvac_ac_state":false,"target_temperature":22.85,"hvac_fan_state":false,"target_change_pending":true,"name":"E924","current_temperature":21,"hvac_alt_heat_x2_state":false,"can_cool":true}},"safety_summary":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-21456,"$timestamp":1445885694252}}}' + http_version: '1.1' + recorded_at: Tue, 27 Oct 2015 14:34:35 GMT +recorded_with: VCR 2.9.3 diff --git a/fixtures/vcr_cassettes/NestThermostat_Nest/sets_the_high_temperature.yml b/fixtures/vcr_cassettes/NestThermostat_Nest/sets_the_high_temperature.yml new file mode 100644 index 0000000..4ea35f1 --- /dev/null +++ b/fixtures/vcr_cassettes/NestThermostat_Nest/sets_the_high_temperature.yml @@ -0,0 +1,203 @@ +--- +http_interactions: +- request: + method: post + uri: https://on6%DFn7d%AC%A0%B57%D4%F7j9ZD%5B%13g%12%AE%AA7~%FD+gwtO%12%A9%DA%CA%60&Ea%B7%DCp%05%18s%C2&%DD%F4%C2;%D9Bw%09%25I;%BC%D5x%D9:V%E99*rC%B92;4cV%5D%E7%E1%DC%C7%B2%B0%16O%94ZY%B6%20%94X%17%03%ED%1E%91%CC%09tNS(%C9%F2%20%E9%FEY%01%5C%3Cf%A4%E4@czfe09-front01-iad01.transport.home.nest.com/v2/put/shared.fake3243E4FEE924 + body: + encoding: UTF-8 + string: '{"target_change_pending":true,"target_temperature_high":22.77778}' + headers: + host: + - czfe09-front01-iad01.transport.home.nest.com + user-agent: + - Nest/1.1.0.10 CFNetwork/548.0.4 + authorization: + - Basic b.2423243.ZKygtTfU92o5WkRbE2cSrqo3fv0rZ3d0TxKp2spgJkVht9xwBRhzwibd9MI72UJ3CSVJO7zVeNk6Vuk5KnJDuTI7NGNWXefh3MeysBZPlFpZtiCUWBcD7R6RzAl0TlMoyfIg6f5ZAVw8ZqTk + x-nl-user-id: + - '2423243' + x-nl-protocol-version: + - '1' + accept-language: + - en-us + connection: + - keep-alive + accept: + - "*/*" + response: + status: + code: 200 + message: OK + headers: + content-type: + - application/json + x-nl-defer-device-window: + - '120' + x-nl-skv-key: + - shared.fake3243E4FEE924 + x-nl-skv-version: + - "-32666" + x-nl-skv-timestamp: + - '1445956469726' + x-nl-service-timestamp: + - '1445956469752' + content-length: + - '0' + connection: + - keep-alive + body: + encoding: UTF-8 + string: '' + http_version: '1.1' + recorded_at: Tue, 27 Oct 2015 14:34:30 GMT +- request: + method: get + uri: https://on6%DFn7d%AC%A0%B57%D4%F7j9ZD%5B%13g%12%AE%AA7~%FD+gwtO%12%A9%DA%CA%60&Ea%B7%DCp%05%18s%C2&%DD%F4%C2;%D9Bw%09%25I;%BC%D5x%D9:V%E99*rC%B92;4cV%5D%E7%E1%DC%C7%B2%B0%16O%94ZY%B6%20%94X%17%03%ED%1E%91%CC%09tNS(%C9%F2%20%E9%FEY%01%5C%3Cf%A4%E4@czfe09-front01-iad01.transport.home.nest.com/v2/mobile/user.2423243 + body: + encoding: US-ASCII + string: '' + headers: + host: + - czfe09-front01-iad01.transport.home.nest.com + user-agent: + - Nest/1.1.0.10 CFNetwork/548.0.4 + authorization: + - Basic b.2423243.ZKygtTfU92o5WkRbE2cSrqo3fv0rZ3d0TxKp2spgJkVht9xwBRhzwibd9MI72UJ3CSVJO7zVeNk6Vuk5KnJDuTI7NGNWXefh3MeysBZPlFpZtiCUWBcD7R6RzAl0TlMoyfIg6f5ZAVw8ZqTk + x-nl-user-id: + - '2423243' + x-nl-protocol-version: + - '1' + accept-language: + - en-us + connection: + - keep-alive + accept: + - "*/*" + response: + status: + code: 200 + message: OK + headers: + content-type: + - application/json + x-nl-defer-device-window: + - '120' + x-nl-service-timestamp: + - '1445956470117' + content-length: + - '10893' + connection: + - keep-alive + body: + encoding: UTF-8 + string: '{"user_alert_dialog":{"2423243":{"$version":-31019,"$timestamp":1445954076171,"dialog_data":"","dialog_id":"confirm-pairing"}},"buckets":{"2423243":{"$version":12532,"$timestamp":1445956458542,"buckets":["user.2423243","user_alert_dialog.2423243","message_center.2423243","user_settings.2423243","buckets.2423243","device.fake3243E4FEE924","demand_response.fake3243E4FEE924","device_alert_dialog.fake3243E4FEE924","link.fake3243E4FEE924","message.fake3243E4FEE924","metadata.fake3243E4FEE924","schedule.fake3243E4FEE924","shared.fake3243E4FEE924","track.fake3243E4FEE924","tuneups.fake3243E4FEE924","energy_latest.fake3243E4FEE924","energy_weekly.fake3243E4FEE924","diamond_sensor_event.fake3243E4FEE924","diamond_sensor_config.fake3243E4FEE924","structure.0b47dcf0-7c13-11e5-8199-22000b420f99","where.0b47dcf0-7c13-11e5-8199-22000b420f99","utility.0b47dcf0-7c13-11e5-8199-22000b420f99","structure_history.0b47dcf0-7c13-11e5-8199-22000b420f99","trip.0b47dcf0-7c13-11e5-8199-22000b420f99","structure_metadata.0b47dcf0-7c13-11e5-8199-22000b420f99","safety.0b47dcf0-7c13-11e5-8199-22000b420f99","safety_summary.0b47dcf0-7c13-11e5-8199-22000b420f99","geofence_info.0b47dcf0-7c13-11e5-8199-22000b420f99"]}},"track":{"fake3243E4FEE924":{"$version":31457,"$timestamp":1445954075890,"online":false}},"message_center":{"2423243":{"$version":-1,"$timestamp":1325379661000,"messages":[]}},"safety":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":3651,"$timestamp":1445885694252,"audio_self_test_participants":[]}},"utility":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-1,"$timestamp":1}},"where":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":25319,"$timestamp":1445885694015,"wheres":[{"where_id":"00000000-0000-0000-0000-000100000001","name":"Basement"},{"where_id":"00000000-0000-0000-0000-00010000000d","name":"Bedroom"},{"where_id":"00000000-0000-0000-0000-000100000003","name":"Den"},{"where_id":"00000000-0000-0000-0000-000100000010","name":"Dining + Room"},{"where_id":"00000000-0000-0000-0000-000100000006","name":"Downstairs"},{"where_id":"00000000-0000-0000-0000-000100000000","name":"Entryway"},{"where_id":"00000000-0000-0000-0000-00010000000b","name":"Family + Room"},{"where_id":"00000000-0000-0000-0000-000100000002","name":"Hallway"},{"where_id":"00000000-0000-0000-0000-000100000008","name":"Kids + Room"},{"where_id":"00000000-0000-0000-0000-00010000000a","name":"Kitchen"},{"where_id":"00000000-0000-0000-0000-00010000000c","name":"Living + Room"},{"where_id":"00000000-0000-0000-0000-000100000005","name":"Master Bedroom"},{"where_id":"00000000-0000-0000-0000-00010000000e","name":"Office"},{"where_id":"00000000-0000-0000-0000-00010000000f","name":"Upstairs"}]}},"structure":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":15857,"$timestamp":1445956462746,"away_timestamp":1445954700,"away":false,"location":"Palm + Harbor, FL","name":"Chrome App Structure","postal_code":"34683","topaz_away":false,"creation_time":1445885694067,"country_code":"US","away_setter":0,"topaz_hush_key":"FmyQftpkdU9eH9St4mMWhQ==","user":"user.2423243","devices":["device.fake3243E4FEE924"],"swarm":["device.fake3243E4FEE924"],"fabric_ids":[],"clutches":[],"members":[{"user":"user.2423243","roles":["owner"]}]}},"message":{"fake3243E4FEE924":{"$version":-24419,"$timestamp":1445954076171,"1":{"cmd":"register"}}},"tuneups":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1}},"device":{"fake3243E4FEE924":{"$version":-27199,"$timestamp":1445956401831,"heatpump_setback_active":false,"emer_heat_enable":false,"touched_by":{},"local_ip":"192.168.2.4","switch_system_off":false,"away_temperature_high":24.444,"cooling_source":"electric","temperature_lock_high_temp":22.222,"y2_type":"unknown","leaf_threshold_cool":0,"heater_source":"gas","fan_cooling_state":false,"note_codes":[],"compressor_lockout_leaf":-17.8,"has_x3_heat":false,"target_humidity_enabled":false,"heat_x3_source":"electric","alt_heat_delivery":"forced-air","has_x2_heat":false,"fan_mode":"auto","rssi":66,"sunlight_correction_active":false,"emer_heat_delivery":"forced-air","heatpump_savings":"off","pin_y2_description":"none","humidity_control_lockout_end_time":0,"filter_reminder_level":0,"gear_opacity":0,"filter_reminder_enabled":true,"capability_level":4,"schedule_learning_reset":false,"has_x2_cool":false,"hvac_pins":"W1,C,Rh,G","ob_orientation":"O","cooling_delivery":"unknown","range_enable":false,"auto_away_enable":true,"dual_fuel_breakpoint_override":"none","lower_safety_temp_enabled":true,"has_fan":true,"dehumidifier_state":false,"emer_heat_source":"electric","nlclient_state":"","heatpump_ready":false,"cooling_x2_delivery":"unknown","available_locales":"en_US,fr_CA,es_US,en_GB","current_version":"4.1","has_fossil_fuel":true,"learning_state":"slow","pin_ob_description":"none","pin_rh_description":"power","has_alt_heat":false,"safety_temp_activating_hvac":false,"fan_duty_cycle":900,"pin_y1_description":"none","humidifier_state":false,"gear_threshold_high":0,"backplate_serial_number":"02BA01AB241200CW","has_x2_alt_heat":false,"heat_x3_delivery":"forced-air","leaf_threshold_heat":18.334,"is_on_stand":false,"has_emer_heat":false,"learning_mode":true,"leaf_learning":"ready","has_aux_heat":false,"filter_changed_set_date":1386452016,"aux_heat_source":"electric","backplate_bsl_info":"BSL","alt_heat_x2_source":"gas","sunlight_correction_ready":true,"humidifier_type":"unknown","pin_c_description":"power","humidity_control_lockout_start_time":0,"pin_w2aux_description":"none","fan_timer_timeout":0,"country_code":"US","sunlight_correction_enabled":true,"heat_x2_delivery":"forced-air","target_humidity":35,"gear_threshold_low":0,"lower_safety_temp":4.738,"cooling_x2_source":"electric","equipment_type":"electric","heat_pump_aux_threshold":10,"alt_heat_x2_delivery":"forced-air","heat_pump_comp_threshold":-31.5,"learning_days_completed_cool":0,"backplate_bsl_version":"2.1","current_schedule_mode":"HEAT","fan_duty_end_time":68400,"hvac_wires":"Heat,Fan,Common + Wire,Rh","leaf":true,"type":"TBD","pin_g_description":"fan","click_sound":"on","away_temperature_low_enabled":true,"aux_heat_delivery":"forced-air","filter_changed_date":1387065600,"hvac_safety_shutoff_active":false,"heat_pump_comp_threshold_enabled":false,"has_dehumidifier":false,"preconditioning_ready":true,"fan_cooling_enabled":true,"leaf_away_high":28.88,"fan_cooling_readiness":"not + ready","device_locale":"en_US","temperature_scale":"F","battery_level":3.963,"error_code":"","maint_band_upper":0.39,"preconditioning_active":false,"fan_control_state":false,"away_temperature_high_enabled":false,"dehumidifier_fan_activation":false,"learning_days_completed_heat":598,"humidifier_fan_activation":false,"pin_star_description":"none","upper_safety_temp_enabled":false,"dual_fuel_selected":false,"preconditioning_enabled":false,"current_humidity":50,"dual_fuel_breakpoint":-1,"postal_code":"94602","backplate_mono_version":"4.0.20","alt_heat_source":"gas","aux_lockout_leaf":10,"has_heat_pump":false,"heater_delivery":"forced-air","away_temperature_low":12.778,"auto_away_reset":false,"radiant_control_enabled":false,"has_air_filter":true,"temperature_lock":false,"dehumidifier_type":"unknown","time_to_target_training":"training","upper_safety_temp":35,"humidity_control_lockout_enabled":false,"fan_timer_duration":900,"target_time_confidence":0,"pin_w1_description":"heat","temperature_lock_low_temp":20,"where_id":"00000000-0000-0000-0000-000100000001","forced_air":true,"temperature_lock_pin_hash":"","auto_dehum_enabled":false,"leaf_type":1,"backplate_mono_info":"TFE + (BP_D2) 4.0.20 (root@bamboo) 2014-02-03 10:06:33","has_dual_fuel":false,"star_type":"unknown","learning_time":1703,"maint_band_lower":0.39,"creation_time":1420654958512,"has_humidifier":false,"learning_days_completed_range":0,"dehumidifier_orientation_selected":"unknown","leaf_schedule_delta":1.11,"logging_priority":"informational","user_brightness":"medium","leaf_away_low":16.835,"pin_rc_description":"none","auto_dehum_state":false,"serial_number":"80C4887E69DF00D9","heat_x2_source":"electric","mac_address":"18b430093686","fan_duty_start_time":50400,"time_to_target":0,"backplate_model":"Backplate-2.2","heat_link_connection":0,"model_version":"Display-2.1","heat_pump_aux_threshold_enabled":true,"ob_persistence":true,"schedules":[]}},"trip":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":32201,"$timestamp":1445885694252,"trips":[]}},"demand_response":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1}},"user":{"2423243":{"$version":9049,"$timestamp":1445885721137,"email":"test@yahoo.com","name":"test@yahoo.com","structures":["structure.0b47dcf0-7c13-11e5-8199-22000b420f99"],"structure_memberships":[{"structure":"structure.0b47dcf0-7c13-11e5-8199-22000b420f99","roles":["owner"]}]}},"link":{"fake3243E4FEE924":{"$version":10338,"$timestamp":1445954076171,"structure":"structure.0b47dcf0-7c13-11e5-8199-22000b420f99"}},"device_alert_dialog":{"fake3243E4FEE924":{"$version":-9248,"$timestamp":1445954076171,"dialog_data":"","dialog_id":"confirm-pairing"}},"geofence_info":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-31412,"$timestamp":1445885694252,"device_events":[],"fences":[]}},"metadata":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1356998400000,"last_ip":"127.0.0.1","last_connection":1356998400000}},"user_settings":{"2423243":{"$version":31691,"$timestamp":1445354998080,"email_verified":true,"tos_accepted_version":1434564000000,"receive_marketing_emails":true,"receive_nest_emails":true,"receive_support_emails":true,"max_structures":2,"max_thermostats":40,"max_thermostats_per_structure":20,"max_smoke_detectors_per_structure":18,"max_smoke_detectors":36,"max_wwn_devices_per_structure":10,"max_wwn_devices":20,"tos_minimum_version":1434564000000,"tos_current_version":1434564000000,"lang":"en_US"}},"schedule":{"fake3243E4FEE924":{"$version":21638,"$timestamp":1445954075940}},"structure_metadata":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-32678,"$timestamp":1445951380776,"entitlements_api_path":"/api/0.1/structure/0b47dcf0-7c13-11e5-8199-22000b420f99/entitlements?v=8a957eeb-c93a-4e47-aea4-fb31cfc65691"}},"shared":{"fake3243E4FEE924":{"$version":-32666,"$timestamp":1445956469726,"auto_away_learning":"ready","auto_away":0,"hvac_alt_heat_state":false,"compressor_lockout_enabled":false,"hvac_heat_x3_state":false,"target_temperature_type":"heat","hvac_heater_state":false,"can_heat":true,"hvac_emer_heat_state":false,"compressor_lockout_timeout":0,"hvac_cool_x2_state":false,"target_temperature_high":22.77778,"hvac_aux_heater_state":false,"hvac_heat_x2_state":false,"target_temperature_low":23.33333,"target_temperature":22.77778,"hvac_ac_state":false,"hvac_fan_state":false,"target_change_pending":true,"name":"E924","current_temperature":21,"hvac_alt_heat_x2_state":false,"can_cool":true}},"safety_summary":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-21456,"$timestamp":1445885694252}}}' + http_version: '1.1' + recorded_at: Tue, 27 Oct 2015 14:34:30 GMT +- request: + method: post + uri: https://on6%DFn7d%AC%A0%B57%D4%F7j9ZD%5B%13g%12%AE%AA7~%FD+gwtO%12%A9%DA%CA%60&Ea%B7%DCp%05%18s%C2&%DD%F4%C2;%D9Bw%09%25I;%BC%D5x%D9:V%E99*rC%B92;4cV%5D%E7%E1%DC%C7%B2%B0%16O%94ZY%B6%20%94X%17%03%ED%1E%91%CC%09tNS(%C9%F2%20%E9%FEY%01%5C%3Cf%A4%E4@czfe09-front01-iad01.transport.home.nest.com/v2/put/shared.fake3243E4FEE924 + body: + encoding: UTF-8 + string: '{"target_change_pending":true,"target_temperature_high":23.33333}' + headers: + host: + - czfe09-front01-iad01.transport.home.nest.com + user-agent: + - Nest/1.1.0.10 CFNetwork/548.0.4 + authorization: + - Basic b.2423243.ZKygtTfU92o5WkRbE2cSrqo3fv0rZ3d0TxKp2spgJkVht9xwBRhzwibd9MI72UJ3CSVJO7zVeNk6Vuk5KnJDuTI7NGNWXefh3MeysBZPlFpZtiCUWBcD7R6RzAl0TlMoyfIg6f5ZAVw8ZqTk + x-nl-user-id: + - '2423243' + x-nl-protocol-version: + - '1' + accept-language: + - en-us + connection: + - keep-alive + accept: + - "*/*" + response: + status: + code: 200 + message: OK + headers: + content-type: + - application/json + x-nl-defer-device-window: + - '120' + x-nl-skv-key: + - shared.fake3243E4FEE924 + x-nl-skv-version: + - "-19993" + x-nl-skv-timestamp: + - '1445956470423' + x-nl-service-timestamp: + - '1445956470442' + content-length: + - '0' + connection: + - keep-alive + body: + encoding: UTF-8 + string: '' + http_version: '1.1' + recorded_at: Tue, 27 Oct 2015 14:34:30 GMT +- request: + method: get + uri: https://on6%DFn7d%AC%A0%B57%D4%F7j9ZD%5B%13g%12%AE%AA7~%FD+gwtO%12%A9%DA%CA%60&Ea%B7%DCp%05%18s%C2&%DD%F4%C2;%D9Bw%09%25I;%BC%D5x%D9:V%E99*rC%B92;4cV%5D%E7%E1%DC%C7%B2%B0%16O%94ZY%B6%20%94X%17%03%ED%1E%91%CC%09tNS(%C9%F2%20%E9%FEY%01%5C%3Cf%A4%E4@czfe09-front01-iad01.transport.home.nest.com/v2/mobile/user.2423243 + body: + encoding: US-ASCII + string: '' + headers: + host: + - czfe09-front01-iad01.transport.home.nest.com + user-agent: + - Nest/1.1.0.10 CFNetwork/548.0.4 + authorization: + - Basic b.2423243.ZKygtTfU92o5WkRbE2cSrqo3fv0rZ3d0TxKp2spgJkVht9xwBRhzwibd9MI72UJ3CSVJO7zVeNk6Vuk5KnJDuTI7NGNWXefh3MeysBZPlFpZtiCUWBcD7R6RzAl0TlMoyfIg6f5ZAVw8ZqTk + x-nl-user-id: + - '2423243' + x-nl-protocol-version: + - '1' + accept-language: + - en-us + connection: + - keep-alive + accept: + - "*/*" + response: + status: + code: 200 + message: OK + headers: + content-type: + - application/json + x-nl-defer-device-window: + - '120' + x-nl-service-timestamp: + - '1445956470822' + content-length: + - '10893' + connection: + - keep-alive + body: + encoding: UTF-8 + string: '{"user_alert_dialog":{"2423243":{"$version":-31019,"$timestamp":1445954076171,"dialog_data":"","dialog_id":"confirm-pairing"}},"buckets":{"2423243":{"$version":12532,"$timestamp":1445956458542,"buckets":["user.2423243","user_alert_dialog.2423243","message_center.2423243","user_settings.2423243","buckets.2423243","device.fake3243E4FEE924","demand_response.fake3243E4FEE924","device_alert_dialog.fake3243E4FEE924","link.fake3243E4FEE924","message.fake3243E4FEE924","metadata.fake3243E4FEE924","schedule.fake3243E4FEE924","shared.fake3243E4FEE924","track.fake3243E4FEE924","tuneups.fake3243E4FEE924","energy_latest.fake3243E4FEE924","energy_weekly.fake3243E4FEE924","diamond_sensor_event.fake3243E4FEE924","diamond_sensor_config.fake3243E4FEE924","structure.0b47dcf0-7c13-11e5-8199-22000b420f99","where.0b47dcf0-7c13-11e5-8199-22000b420f99","utility.0b47dcf0-7c13-11e5-8199-22000b420f99","structure_history.0b47dcf0-7c13-11e5-8199-22000b420f99","trip.0b47dcf0-7c13-11e5-8199-22000b420f99","structure_metadata.0b47dcf0-7c13-11e5-8199-22000b420f99","safety.0b47dcf0-7c13-11e5-8199-22000b420f99","safety_summary.0b47dcf0-7c13-11e5-8199-22000b420f99","geofence_info.0b47dcf0-7c13-11e5-8199-22000b420f99"]}},"track":{"fake3243E4FEE924":{"$version":31457,"$timestamp":1445954075890,"online":false}},"message_center":{"2423243":{"$version":-1,"$timestamp":1325379661000,"messages":[]}},"safety":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":3651,"$timestamp":1445885694252,"audio_self_test_participants":[]}},"utility":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-1,"$timestamp":1}},"where":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":25319,"$timestamp":1445885694015,"wheres":[{"where_id":"00000000-0000-0000-0000-000100000001","name":"Basement"},{"where_id":"00000000-0000-0000-0000-00010000000d","name":"Bedroom"},{"where_id":"00000000-0000-0000-0000-000100000003","name":"Den"},{"where_id":"00000000-0000-0000-0000-000100000010","name":"Dining + Room"},{"where_id":"00000000-0000-0000-0000-000100000006","name":"Downstairs"},{"where_id":"00000000-0000-0000-0000-000100000000","name":"Entryway"},{"where_id":"00000000-0000-0000-0000-00010000000b","name":"Family + Room"},{"where_id":"00000000-0000-0000-0000-000100000002","name":"Hallway"},{"where_id":"00000000-0000-0000-0000-000100000008","name":"Kids + Room"},{"where_id":"00000000-0000-0000-0000-00010000000a","name":"Kitchen"},{"where_id":"00000000-0000-0000-0000-00010000000c","name":"Living + Room"},{"where_id":"00000000-0000-0000-0000-000100000005","name":"Master Bedroom"},{"where_id":"00000000-0000-0000-0000-00010000000e","name":"Office"},{"where_id":"00000000-0000-0000-0000-00010000000f","name":"Upstairs"}]}},"structure":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":15857,"$timestamp":1445956462746,"away_timestamp":1445954700,"away":false,"location":"Palm + Harbor, FL","name":"Chrome App Structure","postal_code":"34683","topaz_away":false,"creation_time":1445885694067,"country_code":"US","away_setter":0,"topaz_hush_key":"FmyQftpkdU9eH9St4mMWhQ==","user":"user.2423243","devices":["device.fake3243E4FEE924"],"swarm":["device.fake3243E4FEE924"],"fabric_ids":[],"clutches":[],"members":[{"user":"user.2423243","roles":["owner"]}]}},"message":{"fake3243E4FEE924":{"$version":-24419,"$timestamp":1445954076171,"1":{"cmd":"register"}}},"tuneups":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1}},"device":{"fake3243E4FEE924":{"$version":-27199,"$timestamp":1445956401831,"heatpump_setback_active":false,"emer_heat_enable":false,"touched_by":{},"local_ip":"192.168.2.4","switch_system_off":false,"away_temperature_high":24.444,"cooling_source":"electric","temperature_lock_high_temp":22.222,"y2_type":"unknown","leaf_threshold_cool":0,"heater_source":"gas","fan_cooling_state":false,"note_codes":[],"compressor_lockout_leaf":-17.8,"has_x3_heat":false,"target_humidity_enabled":false,"heat_x3_source":"electric","alt_heat_delivery":"forced-air","has_x2_heat":false,"fan_mode":"auto","rssi":66,"sunlight_correction_active":false,"emer_heat_delivery":"forced-air","heatpump_savings":"off","pin_y2_description":"none","humidity_control_lockout_end_time":0,"filter_reminder_level":0,"gear_opacity":0,"filter_reminder_enabled":true,"capability_level":4,"schedule_learning_reset":false,"has_x2_cool":false,"hvac_pins":"W1,C,Rh,G","ob_orientation":"O","cooling_delivery":"unknown","range_enable":false,"auto_away_enable":true,"dual_fuel_breakpoint_override":"none","lower_safety_temp_enabled":true,"has_fan":true,"dehumidifier_state":false,"emer_heat_source":"electric","nlclient_state":"","heatpump_ready":false,"cooling_x2_delivery":"unknown","available_locales":"en_US,fr_CA,es_US,en_GB","current_version":"4.1","has_fossil_fuel":true,"learning_state":"slow","pin_ob_description":"none","pin_rh_description":"power","has_alt_heat":false,"safety_temp_activating_hvac":false,"fan_duty_cycle":900,"pin_y1_description":"none","humidifier_state":false,"gear_threshold_high":0,"backplate_serial_number":"02BA01AB241200CW","has_x2_alt_heat":false,"heat_x3_delivery":"forced-air","leaf_threshold_heat":18.334,"is_on_stand":false,"has_emer_heat":false,"learning_mode":true,"leaf_learning":"ready","has_aux_heat":false,"filter_changed_set_date":1386452016,"aux_heat_source":"electric","backplate_bsl_info":"BSL","alt_heat_x2_source":"gas","sunlight_correction_ready":true,"humidifier_type":"unknown","pin_c_description":"power","humidity_control_lockout_start_time":0,"pin_w2aux_description":"none","fan_timer_timeout":0,"country_code":"US","sunlight_correction_enabled":true,"heat_x2_delivery":"forced-air","target_humidity":35,"gear_threshold_low":0,"lower_safety_temp":4.738,"cooling_x2_source":"electric","equipment_type":"electric","heat_pump_aux_threshold":10,"alt_heat_x2_delivery":"forced-air","heat_pump_comp_threshold":-31.5,"learning_days_completed_cool":0,"backplate_bsl_version":"2.1","current_schedule_mode":"HEAT","fan_duty_end_time":68400,"hvac_wires":"Heat,Fan,Common + Wire,Rh","leaf":true,"type":"TBD","pin_g_description":"fan","click_sound":"on","away_temperature_low_enabled":true,"aux_heat_delivery":"forced-air","filter_changed_date":1387065600,"hvac_safety_shutoff_active":false,"heat_pump_comp_threshold_enabled":false,"has_dehumidifier":false,"preconditioning_ready":true,"fan_cooling_enabled":true,"leaf_away_high":28.88,"fan_cooling_readiness":"not + ready","device_locale":"en_US","temperature_scale":"F","battery_level":3.963,"error_code":"","maint_band_upper":0.39,"preconditioning_active":false,"fan_control_state":false,"away_temperature_high_enabled":false,"dehumidifier_fan_activation":false,"learning_days_completed_heat":598,"humidifier_fan_activation":false,"pin_star_description":"none","upper_safety_temp_enabled":false,"dual_fuel_selected":false,"preconditioning_enabled":false,"current_humidity":50,"dual_fuel_breakpoint":-1,"postal_code":"94602","backplate_mono_version":"4.0.20","alt_heat_source":"gas","aux_lockout_leaf":10,"has_heat_pump":false,"heater_delivery":"forced-air","away_temperature_low":12.778,"auto_away_reset":false,"radiant_control_enabled":false,"has_air_filter":true,"temperature_lock":false,"dehumidifier_type":"unknown","time_to_target_training":"training","upper_safety_temp":35,"humidity_control_lockout_enabled":false,"fan_timer_duration":900,"target_time_confidence":0,"pin_w1_description":"heat","temperature_lock_low_temp":20,"where_id":"00000000-0000-0000-0000-000100000001","forced_air":true,"temperature_lock_pin_hash":"","auto_dehum_enabled":false,"leaf_type":1,"backplate_mono_info":"TFE + (BP_D2) 4.0.20 (root@bamboo) 2014-02-03 10:06:33","has_dual_fuel":false,"star_type":"unknown","learning_time":1703,"maint_band_lower":0.39,"creation_time":1420654958512,"has_humidifier":false,"learning_days_completed_range":0,"dehumidifier_orientation_selected":"unknown","leaf_schedule_delta":1.11,"logging_priority":"informational","user_brightness":"medium","leaf_away_low":16.835,"pin_rc_description":"none","auto_dehum_state":false,"serial_number":"80C4887E69DF00D9","heat_x2_source":"electric","mac_address":"18b430093686","fan_duty_start_time":50400,"time_to_target":0,"backplate_model":"Backplate-2.2","heat_link_connection":0,"model_version":"Display-2.1","heat_pump_aux_threshold_enabled":true,"ob_persistence":true,"schedules":[]}},"trip":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":32201,"$timestamp":1445885694252,"trips":[]}},"demand_response":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1}},"user":{"2423243":{"$version":9049,"$timestamp":1445885721137,"email":"test@yahoo.com","name":"test@yahoo.com","structures":["structure.0b47dcf0-7c13-11e5-8199-22000b420f99"],"structure_memberships":[{"structure":"structure.0b47dcf0-7c13-11e5-8199-22000b420f99","roles":["owner"]}]}},"link":{"fake3243E4FEE924":{"$version":10338,"$timestamp":1445954076171,"structure":"structure.0b47dcf0-7c13-11e5-8199-22000b420f99"}},"device_alert_dialog":{"fake3243E4FEE924":{"$version":-9248,"$timestamp":1445954076171,"dialog_data":"","dialog_id":"confirm-pairing"}},"geofence_info":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-31412,"$timestamp":1445885694252,"device_events":[],"fences":[]}},"metadata":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1356998400000,"last_ip":"127.0.0.1","last_connection":1356998400000}},"user_settings":{"2423243":{"$version":31691,"$timestamp":1445354998080,"email_verified":true,"tos_accepted_version":1434564000000,"receive_marketing_emails":true,"receive_nest_emails":true,"receive_support_emails":true,"max_structures":2,"max_thermostats":40,"max_thermostats_per_structure":20,"max_smoke_detectors_per_structure":18,"max_smoke_detectors":36,"max_wwn_devices_per_structure":10,"max_wwn_devices":20,"tos_minimum_version":1434564000000,"tos_current_version":1434564000000,"lang":"en_US"}},"schedule":{"fake3243E4FEE924":{"$version":21638,"$timestamp":1445954075940}},"structure_metadata":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-32678,"$timestamp":1445951380776,"entitlements_api_path":"/api/0.1/structure/0b47dcf0-7c13-11e5-8199-22000b420f99/entitlements?v=8a957eeb-c93a-4e47-aea4-fb31cfc65691"}},"shared":{"fake3243E4FEE924":{"$version":-19993,"$timestamp":1445956470423,"auto_away_learning":"ready","auto_away":0,"hvac_alt_heat_state":false,"compressor_lockout_enabled":false,"hvac_heat_x3_state":false,"target_temperature_type":"heat","hvac_heater_state":false,"can_heat":true,"hvac_emer_heat_state":false,"compressor_lockout_timeout":0,"hvac_cool_x2_state":false,"target_temperature_high":23.33333,"hvac_aux_heater_state":false,"hvac_heat_x2_state":false,"target_temperature_low":23.33333,"hvac_ac_state":false,"target_temperature":22.77778,"hvac_fan_state":false,"target_change_pending":true,"name":"E924","current_temperature":21,"hvac_alt_heat_x2_state":false,"can_cool":true}},"safety_summary":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-21456,"$timestamp":1445885694252}}}' + http_version: '1.1' + recorded_at: Tue, 27 Oct 2015 14:34:31 GMT +recorded_with: VCR 2.9.3 diff --git a/fixtures/vcr_cassettes/NestThermostat_Nest/sets_the_low_temperature.yml b/fixtures/vcr_cassettes/NestThermostat_Nest/sets_the_low_temperature.yml new file mode 100644 index 0000000..35c0c58 --- /dev/null +++ b/fixtures/vcr_cassettes/NestThermostat_Nest/sets_the_low_temperature.yml @@ -0,0 +1,203 @@ +--- +http_interactions: +- request: + method: post + uri: https://on6%DFn7d%AC%A0%B57%D4%F7j9ZD%5B%13g%12%AE%AA7~%FD+gwtO%12%A9%DA%CA%60&Ea%B7%DCp%05%18s%C2&%DD%F4%C2;%D9Bw%09%25I;%BC%D5x%D9:V%E99*rC%B92;4cV%5D%E7%E1%DC%C7%B2%B0%16O%94ZY%B6%20%94X%17%03%ED%1E%91%CC%09tNS(%C9%F2%20%E9%FEY%01%5C%3Cf%A4%E4@czfe09-front01-iad01.transport.home.nest.com/v2/put/shared.fake3243E4FEE924 + body: + encoding: UTF-8 + string: '{"target_change_pending":true,"target_temperature_low":22.77778}' + headers: + host: + - czfe09-front01-iad01.transport.home.nest.com + user-agent: + - Nest/1.1.0.10 CFNetwork/548.0.4 + authorization: + - Basic b.2423243.ZKygtTfU92o5WkRbE2cSrqo3fv0rZ3d0TxKp2spgJkVht9xwBRhzwibd9MI72UJ3CSVJO7zVeNk6Vuk5KnJDuTI7NGNWXefh3MeysBZPlFpZtiCUWBcD7R6RzAl0TlMoyfIg6f5ZAVw8ZqTk + x-nl-user-id: + - '2423243' + x-nl-protocol-version: + - '1' + accept-language: + - en-us + connection: + - keep-alive + accept: + - "*/*" + response: + status: + code: 200 + message: OK + headers: + content-type: + - application/json + x-nl-defer-device-window: + - '120' + x-nl-skv-key: + - shared.fake3243E4FEE924 + x-nl-skv-version: + - "-17300" + x-nl-skv-timestamp: + - '1445956468338' + x-nl-service-timestamp: + - '1445956468354' + content-length: + - '0' + connection: + - keep-alive + body: + encoding: UTF-8 + string: '' + http_version: '1.1' + recorded_at: Tue, 27 Oct 2015 14:34:28 GMT +- request: + method: get + uri: https://on6%DFn7d%AC%A0%B57%D4%F7j9ZD%5B%13g%12%AE%AA7~%FD+gwtO%12%A9%DA%CA%60&Ea%B7%DCp%05%18s%C2&%DD%F4%C2;%D9Bw%09%25I;%BC%D5x%D9:V%E99*rC%B92;4cV%5D%E7%E1%DC%C7%B2%B0%16O%94ZY%B6%20%94X%17%03%ED%1E%91%CC%09tNS(%C9%F2%20%E9%FEY%01%5C%3Cf%A4%E4@czfe09-front01-iad01.transport.home.nest.com/v2/mobile/user.2423243 + body: + encoding: US-ASCII + string: '' + headers: + host: + - czfe09-front01-iad01.transport.home.nest.com + user-agent: + - Nest/1.1.0.10 CFNetwork/548.0.4 + authorization: + - Basic b.2423243.ZKygtTfU92o5WkRbE2cSrqo3fv0rZ3d0TxKp2spgJkVht9xwBRhzwibd9MI72UJ3CSVJO7zVeNk6Vuk5KnJDuTI7NGNWXefh3MeysBZPlFpZtiCUWBcD7R6RzAl0TlMoyfIg6f5ZAVw8ZqTk + x-nl-user-id: + - '2423243' + x-nl-protocol-version: + - '1' + accept-language: + - en-us + connection: + - keep-alive + accept: + - "*/*" + response: + status: + code: 200 + message: OK + headers: + content-type: + - application/json + x-nl-defer-device-window: + - '120' + x-nl-service-timestamp: + - '1445956468694' + content-length: + - '10893' + connection: + - keep-alive + body: + encoding: UTF-8 + string: '{"user_alert_dialog":{"2423243":{"$version":-31019,"$timestamp":1445954076171,"dialog_data":"","dialog_id":"confirm-pairing"}},"buckets":{"2423243":{"$version":12532,"$timestamp":1445956458542,"buckets":["user.2423243","user_alert_dialog.2423243","message_center.2423243","user_settings.2423243","buckets.2423243","device.fake3243E4FEE924","demand_response.fake3243E4FEE924","device_alert_dialog.fake3243E4FEE924","link.fake3243E4FEE924","message.fake3243E4FEE924","metadata.fake3243E4FEE924","schedule.fake3243E4FEE924","shared.fake3243E4FEE924","track.fake3243E4FEE924","tuneups.fake3243E4FEE924","energy_latest.fake3243E4FEE924","energy_weekly.fake3243E4FEE924","diamond_sensor_event.fake3243E4FEE924","diamond_sensor_config.fake3243E4FEE924","structure.0b47dcf0-7c13-11e5-8199-22000b420f99","where.0b47dcf0-7c13-11e5-8199-22000b420f99","utility.0b47dcf0-7c13-11e5-8199-22000b420f99","structure_history.0b47dcf0-7c13-11e5-8199-22000b420f99","trip.0b47dcf0-7c13-11e5-8199-22000b420f99","structure_metadata.0b47dcf0-7c13-11e5-8199-22000b420f99","safety.0b47dcf0-7c13-11e5-8199-22000b420f99","safety_summary.0b47dcf0-7c13-11e5-8199-22000b420f99","geofence_info.0b47dcf0-7c13-11e5-8199-22000b420f99"]}},"track":{"fake3243E4FEE924":{"$version":31457,"$timestamp":1445954075890,"online":false}},"message_center":{"2423243":{"$version":-1,"$timestamp":1325379661000,"messages":[]}},"safety":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":3651,"$timestamp":1445885694252,"audio_self_test_participants":[]}},"utility":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-1,"$timestamp":1}},"where":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":25319,"$timestamp":1445885694015,"wheres":[{"where_id":"00000000-0000-0000-0000-000100000001","name":"Basement"},{"where_id":"00000000-0000-0000-0000-00010000000d","name":"Bedroom"},{"where_id":"00000000-0000-0000-0000-000100000003","name":"Den"},{"where_id":"00000000-0000-0000-0000-000100000010","name":"Dining + Room"},{"where_id":"00000000-0000-0000-0000-000100000006","name":"Downstairs"},{"where_id":"00000000-0000-0000-0000-000100000000","name":"Entryway"},{"where_id":"00000000-0000-0000-0000-00010000000b","name":"Family + Room"},{"where_id":"00000000-0000-0000-0000-000100000002","name":"Hallway"},{"where_id":"00000000-0000-0000-0000-000100000008","name":"Kids + Room"},{"where_id":"00000000-0000-0000-0000-00010000000a","name":"Kitchen"},{"where_id":"00000000-0000-0000-0000-00010000000c","name":"Living + Room"},{"where_id":"00000000-0000-0000-0000-000100000005","name":"Master Bedroom"},{"where_id":"00000000-0000-0000-0000-00010000000e","name":"Office"},{"where_id":"00000000-0000-0000-0000-00010000000f","name":"Upstairs"}]}},"structure":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":15857,"$timestamp":1445956462746,"away_timestamp":1445954700,"away":false,"location":"Palm + Harbor, FL","name":"Chrome App Structure","postal_code":"34683","topaz_away":false,"creation_time":1445885694067,"country_code":"US","away_setter":0,"topaz_hush_key":"FmyQftpkdU9eH9St4mMWhQ==","user":"user.2423243","devices":["device.fake3243E4FEE924"],"swarm":["device.fake3243E4FEE924"],"fabric_ids":[],"clutches":[],"members":[{"user":"user.2423243","roles":["owner"]}]}},"message":{"fake3243E4FEE924":{"$version":-24419,"$timestamp":1445954076171,"1":{"cmd":"register"}}},"tuneups":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1}},"device":{"fake3243E4FEE924":{"$version":-27199,"$timestamp":1445956401831,"heatpump_setback_active":false,"emer_heat_enable":false,"touched_by":{},"local_ip":"192.168.2.4","switch_system_off":false,"away_temperature_high":24.444,"cooling_source":"electric","temperature_lock_high_temp":22.222,"y2_type":"unknown","leaf_threshold_cool":0,"heater_source":"gas","fan_cooling_state":false,"note_codes":[],"compressor_lockout_leaf":-17.8,"has_x3_heat":false,"target_humidity_enabled":false,"heat_x3_source":"electric","alt_heat_delivery":"forced-air","has_x2_heat":false,"fan_mode":"auto","rssi":66,"sunlight_correction_active":false,"emer_heat_delivery":"forced-air","heatpump_savings":"off","pin_y2_description":"none","humidity_control_lockout_end_time":0,"filter_reminder_level":0,"gear_opacity":0,"filter_reminder_enabled":true,"capability_level":4,"schedule_learning_reset":false,"has_x2_cool":false,"hvac_pins":"W1,C,Rh,G","ob_orientation":"O","cooling_delivery":"unknown","range_enable":false,"auto_away_enable":true,"dual_fuel_breakpoint_override":"none","lower_safety_temp_enabled":true,"has_fan":true,"dehumidifier_state":false,"emer_heat_source":"electric","nlclient_state":"","heatpump_ready":false,"cooling_x2_delivery":"unknown","available_locales":"en_US,fr_CA,es_US,en_GB","current_version":"4.1","has_fossil_fuel":true,"learning_state":"slow","pin_ob_description":"none","pin_rh_description":"power","has_alt_heat":false,"safety_temp_activating_hvac":false,"fan_duty_cycle":900,"pin_y1_description":"none","humidifier_state":false,"gear_threshold_high":0,"backplate_serial_number":"02BA01AB241200CW","has_x2_alt_heat":false,"heat_x3_delivery":"forced-air","leaf_threshold_heat":18.334,"is_on_stand":false,"has_emer_heat":false,"learning_mode":true,"leaf_learning":"ready","has_aux_heat":false,"filter_changed_set_date":1386452016,"aux_heat_source":"electric","backplate_bsl_info":"BSL","alt_heat_x2_source":"gas","sunlight_correction_ready":true,"humidifier_type":"unknown","pin_c_description":"power","humidity_control_lockout_start_time":0,"pin_w2aux_description":"none","fan_timer_timeout":0,"country_code":"US","sunlight_correction_enabled":true,"heat_x2_delivery":"forced-air","target_humidity":35,"gear_threshold_low":0,"lower_safety_temp":4.738,"cooling_x2_source":"electric","equipment_type":"electric","heat_pump_aux_threshold":10,"alt_heat_x2_delivery":"forced-air","heat_pump_comp_threshold":-31.5,"learning_days_completed_cool":0,"backplate_bsl_version":"2.1","current_schedule_mode":"HEAT","fan_duty_end_time":68400,"hvac_wires":"Heat,Fan,Common + Wire,Rh","leaf":true,"type":"TBD","pin_g_description":"fan","click_sound":"on","away_temperature_low_enabled":true,"aux_heat_delivery":"forced-air","filter_changed_date":1387065600,"hvac_safety_shutoff_active":false,"heat_pump_comp_threshold_enabled":false,"has_dehumidifier":false,"preconditioning_ready":true,"fan_cooling_enabled":true,"leaf_away_high":28.88,"fan_cooling_readiness":"not + ready","device_locale":"en_US","temperature_scale":"F","battery_level":3.963,"error_code":"","maint_band_upper":0.39,"preconditioning_active":false,"fan_control_state":false,"away_temperature_high_enabled":false,"dehumidifier_fan_activation":false,"learning_days_completed_heat":598,"humidifier_fan_activation":false,"pin_star_description":"none","upper_safety_temp_enabled":false,"dual_fuel_selected":false,"preconditioning_enabled":false,"current_humidity":50,"dual_fuel_breakpoint":-1,"postal_code":"94602","backplate_mono_version":"4.0.20","alt_heat_source":"gas","aux_lockout_leaf":10,"has_heat_pump":false,"heater_delivery":"forced-air","away_temperature_low":12.778,"auto_away_reset":false,"radiant_control_enabled":false,"has_air_filter":true,"temperature_lock":false,"dehumidifier_type":"unknown","time_to_target_training":"training","upper_safety_temp":35,"humidity_control_lockout_enabled":false,"fan_timer_duration":900,"target_time_confidence":0,"pin_w1_description":"heat","temperature_lock_low_temp":20,"where_id":"00000000-0000-0000-0000-000100000001","forced_air":true,"temperature_lock_pin_hash":"","auto_dehum_enabled":false,"leaf_type":1,"backplate_mono_info":"TFE + (BP_D2) 4.0.20 (root@bamboo) 2014-02-03 10:06:33","has_dual_fuel":false,"star_type":"unknown","learning_time":1703,"maint_band_lower":0.39,"creation_time":1420654958512,"has_humidifier":false,"learning_days_completed_range":0,"dehumidifier_orientation_selected":"unknown","leaf_schedule_delta":1.11,"logging_priority":"informational","user_brightness":"medium","leaf_away_low":16.835,"pin_rc_description":"none","auto_dehum_state":false,"serial_number":"80C4887E69DF00D9","heat_x2_source":"electric","mac_address":"18b430093686","fan_duty_start_time":50400,"time_to_target":0,"backplate_model":"Backplate-2.2","heat_link_connection":0,"model_version":"Display-2.1","heat_pump_aux_threshold_enabled":true,"ob_persistence":true,"schedules":[]}},"trip":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":32201,"$timestamp":1445885694252,"trips":[]}},"demand_response":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1}},"user":{"2423243":{"$version":9049,"$timestamp":1445885721137,"email":"test@yahoo.com","name":"test@yahoo.com","structures":["structure.0b47dcf0-7c13-11e5-8199-22000b420f99"],"structure_memberships":[{"structure":"structure.0b47dcf0-7c13-11e5-8199-22000b420f99","roles":["owner"]}]}},"link":{"fake3243E4FEE924":{"$version":10338,"$timestamp":1445954076171,"structure":"structure.0b47dcf0-7c13-11e5-8199-22000b420f99"}},"device_alert_dialog":{"fake3243E4FEE924":{"$version":-9248,"$timestamp":1445954076171,"dialog_data":"","dialog_id":"confirm-pairing"}},"geofence_info":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-31412,"$timestamp":1445885694252,"device_events":[],"fences":[]}},"metadata":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1356998400000,"last_ip":"127.0.0.1","last_connection":1356998400000}},"user_settings":{"2423243":{"$version":31691,"$timestamp":1445354998080,"email_verified":true,"tos_accepted_version":1434564000000,"receive_marketing_emails":true,"receive_nest_emails":true,"receive_support_emails":true,"max_structures":2,"max_thermostats":40,"max_thermostats_per_structure":20,"max_smoke_detectors_per_structure":18,"max_smoke_detectors":36,"max_wwn_devices_per_structure":10,"max_wwn_devices":20,"tos_minimum_version":1434564000000,"tos_current_version":1434564000000,"lang":"en_US"}},"schedule":{"fake3243E4FEE924":{"$version":21638,"$timestamp":1445954075940}},"structure_metadata":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-32678,"$timestamp":1445951380776,"entitlements_api_path":"/api/0.1/structure/0b47dcf0-7c13-11e5-8199-22000b420f99/entitlements?v=8a957eeb-c93a-4e47-aea4-fb31cfc65691"}},"shared":{"fake3243E4FEE924":{"$version":-17300,"$timestamp":1445956468338,"auto_away_learning":"ready","auto_away":0,"hvac_alt_heat_state":false,"compressor_lockout_enabled":false,"hvac_heat_x3_state":false,"target_temperature_type":"heat","hvac_heater_state":false,"can_heat":true,"hvac_emer_heat_state":false,"compressor_lockout_timeout":0,"hvac_cool_x2_state":false,"target_temperature_high":23.33333,"hvac_aux_heater_state":false,"hvac_heat_x2_state":false,"target_temperature_low":22.77778,"target_temperature":22.77778,"hvac_ac_state":false,"hvac_fan_state":false,"target_change_pending":true,"name":"E924","current_temperature":21,"hvac_alt_heat_x2_state":false,"can_cool":true}},"safety_summary":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-21456,"$timestamp":1445885694252}}}' + http_version: '1.1' + recorded_at: Tue, 27 Oct 2015 14:34:29 GMT +- request: + method: post + uri: https://on6%DFn7d%AC%A0%B57%D4%F7j9ZD%5B%13g%12%AE%AA7~%FD+gwtO%12%A9%DA%CA%60&Ea%B7%DCp%05%18s%C2&%DD%F4%C2;%D9Bw%09%25I;%BC%D5x%D9:V%E99*rC%B92;4cV%5D%E7%E1%DC%C7%B2%B0%16O%94ZY%B6%20%94X%17%03%ED%1E%91%CC%09tNS(%C9%F2%20%E9%FEY%01%5C%3Cf%A4%E4@czfe09-front01-iad01.transport.home.nest.com/v2/put/shared.fake3243E4FEE924 + body: + encoding: UTF-8 + string: '{"target_change_pending":true,"target_temperature_low":23.33333}' + headers: + host: + - czfe09-front01-iad01.transport.home.nest.com + user-agent: + - Nest/1.1.0.10 CFNetwork/548.0.4 + authorization: + - Basic b.2423243.ZKygtTfU92o5WkRbE2cSrqo3fv0rZ3d0TxKp2spgJkVht9xwBRhzwibd9MI72UJ3CSVJO7zVeNk6Vuk5KnJDuTI7NGNWXefh3MeysBZPlFpZtiCUWBcD7R6RzAl0TlMoyfIg6f5ZAVw8ZqTk + x-nl-user-id: + - '2423243' + x-nl-protocol-version: + - '1' + accept-language: + - en-us + connection: + - keep-alive + accept: + - "*/*" + response: + status: + code: 200 + message: OK + headers: + content-type: + - application/json + x-nl-defer-device-window: + - '120' + x-nl-skv-key: + - shared.fake3243E4FEE924 + x-nl-skv-version: + - "-4168" + x-nl-skv-timestamp: + - '1445956469012' + x-nl-service-timestamp: + - '1445956469025' + content-length: + - '0' + connection: + - keep-alive + body: + encoding: UTF-8 + string: '' + http_version: '1.1' + recorded_at: Tue, 27 Oct 2015 14:34:29 GMT +- request: + method: get + uri: https://on6%DFn7d%AC%A0%B57%D4%F7j9ZD%5B%13g%12%AE%AA7~%FD+gwtO%12%A9%DA%CA%60&Ea%B7%DCp%05%18s%C2&%DD%F4%C2;%D9Bw%09%25I;%BC%D5x%D9:V%E99*rC%B92;4cV%5D%E7%E1%DC%C7%B2%B0%16O%94ZY%B6%20%94X%17%03%ED%1E%91%CC%09tNS(%C9%F2%20%E9%FEY%01%5C%3Cf%A4%E4@czfe09-front01-iad01.transport.home.nest.com/v2/mobile/user.2423243 + body: + encoding: US-ASCII + string: '' + headers: + host: + - czfe09-front01-iad01.transport.home.nest.com + user-agent: + - Nest/1.1.0.10 CFNetwork/548.0.4 + authorization: + - Basic b.2423243.ZKygtTfU92o5WkRbE2cSrqo3fv0rZ3d0TxKp2spgJkVht9xwBRhzwibd9MI72UJ3CSVJO7zVeNk6Vuk5KnJDuTI7NGNWXefh3MeysBZPlFpZtiCUWBcD7R6RzAl0TlMoyfIg6f5ZAVw8ZqTk + x-nl-user-id: + - '2423243' + x-nl-protocol-version: + - '1' + accept-language: + - en-us + connection: + - keep-alive + accept: + - "*/*" + response: + status: + code: 200 + message: OK + headers: + content-type: + - application/json + x-nl-defer-device-window: + - '120' + x-nl-service-timestamp: + - '1445956469380' + content-length: + - '10892' + connection: + - keep-alive + body: + encoding: UTF-8 + string: '{"user_alert_dialog":{"2423243":{"$version":-31019,"$timestamp":1445954076171,"dialog_data":"","dialog_id":"confirm-pairing"}},"buckets":{"2423243":{"$version":12532,"$timestamp":1445956458542,"buckets":["user.2423243","user_alert_dialog.2423243","message_center.2423243","user_settings.2423243","buckets.2423243","device.fake3243E4FEE924","demand_response.fake3243E4FEE924","device_alert_dialog.fake3243E4FEE924","link.fake3243E4FEE924","message.fake3243E4FEE924","metadata.fake3243E4FEE924","schedule.fake3243E4FEE924","shared.fake3243E4FEE924","track.fake3243E4FEE924","tuneups.fake3243E4FEE924","energy_latest.fake3243E4FEE924","energy_weekly.fake3243E4FEE924","diamond_sensor_event.fake3243E4FEE924","diamond_sensor_config.fake3243E4FEE924","structure.0b47dcf0-7c13-11e5-8199-22000b420f99","where.0b47dcf0-7c13-11e5-8199-22000b420f99","utility.0b47dcf0-7c13-11e5-8199-22000b420f99","structure_history.0b47dcf0-7c13-11e5-8199-22000b420f99","trip.0b47dcf0-7c13-11e5-8199-22000b420f99","structure_metadata.0b47dcf0-7c13-11e5-8199-22000b420f99","safety.0b47dcf0-7c13-11e5-8199-22000b420f99","safety_summary.0b47dcf0-7c13-11e5-8199-22000b420f99","geofence_info.0b47dcf0-7c13-11e5-8199-22000b420f99"]}},"track":{"fake3243E4FEE924":{"$version":31457,"$timestamp":1445954075890,"online":false}},"message_center":{"2423243":{"$version":-1,"$timestamp":1325379661000,"messages":[]}},"safety":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":3651,"$timestamp":1445885694252,"audio_self_test_participants":[]}},"utility":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-1,"$timestamp":1}},"where":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":25319,"$timestamp":1445885694015,"wheres":[{"where_id":"00000000-0000-0000-0000-000100000001","name":"Basement"},{"where_id":"00000000-0000-0000-0000-00010000000d","name":"Bedroom"},{"where_id":"00000000-0000-0000-0000-000100000003","name":"Den"},{"where_id":"00000000-0000-0000-0000-000100000010","name":"Dining + Room"},{"where_id":"00000000-0000-0000-0000-000100000006","name":"Downstairs"},{"where_id":"00000000-0000-0000-0000-000100000000","name":"Entryway"},{"where_id":"00000000-0000-0000-0000-00010000000b","name":"Family + Room"},{"where_id":"00000000-0000-0000-0000-000100000002","name":"Hallway"},{"where_id":"00000000-0000-0000-0000-000100000008","name":"Kids + Room"},{"where_id":"00000000-0000-0000-0000-00010000000a","name":"Kitchen"},{"where_id":"00000000-0000-0000-0000-00010000000c","name":"Living + Room"},{"where_id":"00000000-0000-0000-0000-000100000005","name":"Master Bedroom"},{"where_id":"00000000-0000-0000-0000-00010000000e","name":"Office"},{"where_id":"00000000-0000-0000-0000-00010000000f","name":"Upstairs"}]}},"structure":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":15857,"$timestamp":1445956462746,"away_timestamp":1445954700,"away":false,"location":"Palm + Harbor, FL","name":"Chrome App Structure","postal_code":"34683","topaz_away":false,"creation_time":1445885694067,"country_code":"US","away_setter":0,"topaz_hush_key":"FmyQftpkdU9eH9St4mMWhQ==","user":"user.2423243","devices":["device.fake3243E4FEE924"],"swarm":["device.fake3243E4FEE924"],"fabric_ids":[],"clutches":[],"members":[{"user":"user.2423243","roles":["owner"]}]}},"message":{"fake3243E4FEE924":{"$version":-24419,"$timestamp":1445954076171,"1":{"cmd":"register"}}},"tuneups":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1}},"device":{"fake3243E4FEE924":{"$version":-27199,"$timestamp":1445956401831,"heatpump_setback_active":false,"emer_heat_enable":false,"touched_by":{},"local_ip":"192.168.2.4","switch_system_off":false,"away_temperature_high":24.444,"cooling_source":"electric","temperature_lock_high_temp":22.222,"y2_type":"unknown","leaf_threshold_cool":0,"heater_source":"gas","fan_cooling_state":false,"note_codes":[],"compressor_lockout_leaf":-17.8,"has_x3_heat":false,"target_humidity_enabled":false,"heat_x3_source":"electric","alt_heat_delivery":"forced-air","has_x2_heat":false,"fan_mode":"auto","rssi":66,"sunlight_correction_active":false,"emer_heat_delivery":"forced-air","heatpump_savings":"off","pin_y2_description":"none","humidity_control_lockout_end_time":0,"filter_reminder_level":0,"gear_opacity":0,"filter_reminder_enabled":true,"capability_level":4,"schedule_learning_reset":false,"has_x2_cool":false,"hvac_pins":"W1,C,Rh,G","ob_orientation":"O","cooling_delivery":"unknown","range_enable":false,"auto_away_enable":true,"dual_fuel_breakpoint_override":"none","lower_safety_temp_enabled":true,"has_fan":true,"dehumidifier_state":false,"emer_heat_source":"electric","nlclient_state":"","heatpump_ready":false,"cooling_x2_delivery":"unknown","available_locales":"en_US,fr_CA,es_US,en_GB","current_version":"4.1","has_fossil_fuel":true,"learning_state":"slow","pin_ob_description":"none","pin_rh_description":"power","has_alt_heat":false,"safety_temp_activating_hvac":false,"fan_duty_cycle":900,"pin_y1_description":"none","humidifier_state":false,"gear_threshold_high":0,"backplate_serial_number":"02BA01AB241200CW","has_x2_alt_heat":false,"heat_x3_delivery":"forced-air","leaf_threshold_heat":18.334,"is_on_stand":false,"has_emer_heat":false,"learning_mode":true,"leaf_learning":"ready","has_aux_heat":false,"filter_changed_set_date":1386452016,"aux_heat_source":"electric","backplate_bsl_info":"BSL","alt_heat_x2_source":"gas","sunlight_correction_ready":true,"humidifier_type":"unknown","pin_c_description":"power","humidity_control_lockout_start_time":0,"pin_w2aux_description":"none","fan_timer_timeout":0,"country_code":"US","sunlight_correction_enabled":true,"heat_x2_delivery":"forced-air","target_humidity":35,"gear_threshold_low":0,"lower_safety_temp":4.738,"cooling_x2_source":"electric","equipment_type":"electric","heat_pump_aux_threshold":10,"alt_heat_x2_delivery":"forced-air","heat_pump_comp_threshold":-31.5,"learning_days_completed_cool":0,"backplate_bsl_version":"2.1","current_schedule_mode":"HEAT","fan_duty_end_time":68400,"hvac_wires":"Heat,Fan,Common + Wire,Rh","leaf":true,"type":"TBD","pin_g_description":"fan","click_sound":"on","away_temperature_low_enabled":true,"aux_heat_delivery":"forced-air","filter_changed_date":1387065600,"hvac_safety_shutoff_active":false,"heat_pump_comp_threshold_enabled":false,"has_dehumidifier":false,"preconditioning_ready":true,"fan_cooling_enabled":true,"leaf_away_high":28.88,"fan_cooling_readiness":"not + ready","device_locale":"en_US","temperature_scale":"F","battery_level":3.963,"error_code":"","maint_band_upper":0.39,"preconditioning_active":false,"fan_control_state":false,"away_temperature_high_enabled":false,"dehumidifier_fan_activation":false,"learning_days_completed_heat":598,"humidifier_fan_activation":false,"pin_star_description":"none","upper_safety_temp_enabled":false,"dual_fuel_selected":false,"preconditioning_enabled":false,"current_humidity":50,"dual_fuel_breakpoint":-1,"postal_code":"94602","backplate_mono_version":"4.0.20","alt_heat_source":"gas","aux_lockout_leaf":10,"has_heat_pump":false,"heater_delivery":"forced-air","away_temperature_low":12.778,"auto_away_reset":false,"radiant_control_enabled":false,"has_air_filter":true,"temperature_lock":false,"dehumidifier_type":"unknown","time_to_target_training":"training","upper_safety_temp":35,"humidity_control_lockout_enabled":false,"fan_timer_duration":900,"target_time_confidence":0,"pin_w1_description":"heat","temperature_lock_low_temp":20,"where_id":"00000000-0000-0000-0000-000100000001","forced_air":true,"temperature_lock_pin_hash":"","auto_dehum_enabled":false,"leaf_type":1,"backplate_mono_info":"TFE + (BP_D2) 4.0.20 (root@bamboo) 2014-02-03 10:06:33","has_dual_fuel":false,"star_type":"unknown","learning_time":1703,"maint_band_lower":0.39,"creation_time":1420654958512,"has_humidifier":false,"learning_days_completed_range":0,"dehumidifier_orientation_selected":"unknown","leaf_schedule_delta":1.11,"logging_priority":"informational","user_brightness":"medium","leaf_away_low":16.835,"pin_rc_description":"none","auto_dehum_state":false,"serial_number":"80C4887E69DF00D9","heat_x2_source":"electric","mac_address":"18b430093686","fan_duty_start_time":50400,"time_to_target":0,"backplate_model":"Backplate-2.2","heat_link_connection":0,"model_version":"Display-2.1","heat_pump_aux_threshold_enabled":true,"ob_persistence":true,"schedules":[]}},"trip":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":32201,"$timestamp":1445885694252,"trips":[]}},"demand_response":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1}},"user":{"2423243":{"$version":9049,"$timestamp":1445885721137,"email":"test@yahoo.com","name":"test@yahoo.com","structures":["structure.0b47dcf0-7c13-11e5-8199-22000b420f99"],"structure_memberships":[{"structure":"structure.0b47dcf0-7c13-11e5-8199-22000b420f99","roles":["owner"]}]}},"link":{"fake3243E4FEE924":{"$version":10338,"$timestamp":1445954076171,"structure":"structure.0b47dcf0-7c13-11e5-8199-22000b420f99"}},"device_alert_dialog":{"fake3243E4FEE924":{"$version":-9248,"$timestamp":1445954076171,"dialog_data":"","dialog_id":"confirm-pairing"}},"geofence_info":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-31412,"$timestamp":1445885694252,"device_events":[],"fences":[]}},"metadata":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1356998400000,"last_ip":"127.0.0.1","last_connection":1356998400000}},"user_settings":{"2423243":{"$version":31691,"$timestamp":1445354998080,"email_verified":true,"tos_accepted_version":1434564000000,"receive_marketing_emails":true,"receive_nest_emails":true,"receive_support_emails":true,"max_structures":2,"max_thermostats":40,"max_thermostats_per_structure":20,"max_smoke_detectors_per_structure":18,"max_smoke_detectors":36,"max_wwn_devices_per_structure":10,"max_wwn_devices":20,"tos_minimum_version":1434564000000,"tos_current_version":1434564000000,"lang":"en_US"}},"schedule":{"fake3243E4FEE924":{"$version":21638,"$timestamp":1445954075940}},"structure_metadata":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-32678,"$timestamp":1445951380776,"entitlements_api_path":"/api/0.1/structure/0b47dcf0-7c13-11e5-8199-22000b420f99/entitlements?v=8a957eeb-c93a-4e47-aea4-fb31cfc65691"}},"shared":{"fake3243E4FEE924":{"$version":-4168,"$timestamp":1445956469012,"auto_away_learning":"ready","auto_away":0,"hvac_alt_heat_state":false,"compressor_lockout_enabled":false,"hvac_heat_x3_state":false,"target_temperature_type":"heat","hvac_heater_state":false,"can_heat":true,"hvac_emer_heat_state":false,"compressor_lockout_timeout":0,"hvac_cool_x2_state":false,"target_temperature_high":23.33333,"hvac_aux_heater_state":false,"hvac_heat_x2_state":false,"target_temperature_low":23.33333,"hvac_ac_state":false,"target_temperature":22.77778,"hvac_fan_state":false,"target_change_pending":true,"name":"E924","current_temperature":21,"hvac_alt_heat_x2_state":false,"can_cool":true}},"safety_summary":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-21456,"$timestamp":1445885694252}}}' + http_version: '1.1' + recorded_at: Tue, 27 Oct 2015 14:34:29 GMT +recorded_with: VCR 2.9.3 diff --git a/fixtures/vcr_cassettes/NestThermostat_Nest/sets_the_temperature.yml b/fixtures/vcr_cassettes/NestThermostat_Nest/sets_the_temperature.yml new file mode 100644 index 0000000..128bd53 --- /dev/null +++ b/fixtures/vcr_cassettes/NestThermostat_Nest/sets_the_temperature.yml @@ -0,0 +1,203 @@ +--- +http_interactions: +- request: + method: post + uri: https://on6%DFn7d%AC%A0%B57%D4%F7j9ZD%5B%13g%12%AE%AA7~%FD+gwtO%12%A9%DA%CA%60&Ea%B7%DCp%05%18s%C2&%DD%F4%C2;%D9Bw%09%25I;%BC%D5x%D9:V%E99*rC%B92;4cV%5D%E7%E1%DC%C7%B2%B0%16O%94ZY%B6%20%94X%17%03%ED%1E%91%CC%09tNS(%C9%F2%20%E9%FEY%01%5C%3Cf%A4%E4@czfe09-front01-iad01.transport.home.nest.com/v2/put/shared.fake3243E4FEE924 + body: + encoding: UTF-8 + string: '{"target_change_pending":true,"target_temperature":23.33333}' + headers: + host: + - czfe09-front01-iad01.transport.home.nest.com + user-agent: + - Nest/1.1.0.10 CFNetwork/548.0.4 + authorization: + - Basic b.2423243.ZKygtTfU92o5WkRbE2cSrqo3fv0rZ3d0TxKp2spgJkVht9xwBRhzwibd9MI72UJ3CSVJO7zVeNk6Vuk5KnJDuTI7NGNWXefh3MeysBZPlFpZtiCUWBcD7R6RzAl0TlMoyfIg6f5ZAVw8ZqTk + x-nl-user-id: + - '2423243' + x-nl-protocol-version: + - '1' + accept-language: + - en-us + connection: + - keep-alive + accept: + - "*/*" + response: + status: + code: 200 + message: OK + headers: + content-type: + - application/json + x-nl-defer-device-window: + - '120' + x-nl-skv-key: + - shared.fake3243E4FEE924 + x-nl-skv-version: + - '23406' + x-nl-skv-timestamp: + - '1445956466947' + x-nl-service-timestamp: + - '1445956466966' + content-length: + - '0' + connection: + - keep-alive + body: + encoding: UTF-8 + string: '' + http_version: '1.1' + recorded_at: Tue, 27 Oct 2015 14:34:27 GMT +- request: + method: get + uri: https://on6%DFn7d%AC%A0%B57%D4%F7j9ZD%5B%13g%12%AE%AA7~%FD+gwtO%12%A9%DA%CA%60&Ea%B7%DCp%05%18s%C2&%DD%F4%C2;%D9Bw%09%25I;%BC%D5x%D9:V%E99*rC%B92;4cV%5D%E7%E1%DC%C7%B2%B0%16O%94ZY%B6%20%94X%17%03%ED%1E%91%CC%09tNS(%C9%F2%20%E9%FEY%01%5C%3Cf%A4%E4@czfe09-front01-iad01.transport.home.nest.com/v2/mobile/user.2423243 + body: + encoding: US-ASCII + string: '' + headers: + host: + - czfe09-front01-iad01.transport.home.nest.com + user-agent: + - Nest/1.1.0.10 CFNetwork/548.0.4 + authorization: + - Basic b.2423243.ZKygtTfU92o5WkRbE2cSrqo3fv0rZ3d0TxKp2spgJkVht9xwBRhzwibd9MI72UJ3CSVJO7zVeNk6Vuk5KnJDuTI7NGNWXefh3MeysBZPlFpZtiCUWBcD7R6RzAl0TlMoyfIg6f5ZAVw8ZqTk + x-nl-user-id: + - '2423243' + x-nl-protocol-version: + - '1' + accept-language: + - en-us + connection: + - keep-alive + accept: + - "*/*" + response: + status: + code: 200 + message: OK + headers: + content-type: + - application/json + x-nl-defer-device-window: + - '120' + x-nl-service-timestamp: + - '1445956467317' + content-length: + - '10892' + connection: + - keep-alive + body: + encoding: UTF-8 + string: '{"user_alert_dialog":{"2423243":{"$version":-31019,"$timestamp":1445954076171,"dialog_data":"","dialog_id":"confirm-pairing"}},"buckets":{"2423243":{"$version":12532,"$timestamp":1445956458542,"buckets":["user.2423243","user_alert_dialog.2423243","message_center.2423243","user_settings.2423243","buckets.2423243","device.fake3243E4FEE924","demand_response.fake3243E4FEE924","device_alert_dialog.fake3243E4FEE924","link.fake3243E4FEE924","message.fake3243E4FEE924","metadata.fake3243E4FEE924","schedule.fake3243E4FEE924","shared.fake3243E4FEE924","track.fake3243E4FEE924","tuneups.fake3243E4FEE924","energy_latest.fake3243E4FEE924","energy_weekly.fake3243E4FEE924","diamond_sensor_event.fake3243E4FEE924","diamond_sensor_config.fake3243E4FEE924","structure.0b47dcf0-7c13-11e5-8199-22000b420f99","where.0b47dcf0-7c13-11e5-8199-22000b420f99","utility.0b47dcf0-7c13-11e5-8199-22000b420f99","structure_history.0b47dcf0-7c13-11e5-8199-22000b420f99","trip.0b47dcf0-7c13-11e5-8199-22000b420f99","structure_metadata.0b47dcf0-7c13-11e5-8199-22000b420f99","safety.0b47dcf0-7c13-11e5-8199-22000b420f99","safety_summary.0b47dcf0-7c13-11e5-8199-22000b420f99","geofence_info.0b47dcf0-7c13-11e5-8199-22000b420f99"]}},"track":{"fake3243E4FEE924":{"$version":31457,"$timestamp":1445954075890,"online":false}},"message_center":{"2423243":{"$version":-1,"$timestamp":1325379661000,"messages":[]}},"safety":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":3651,"$timestamp":1445885694252,"audio_self_test_participants":[]}},"utility":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-1,"$timestamp":1}},"where":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":25319,"$timestamp":1445885694015,"wheres":[{"where_id":"00000000-0000-0000-0000-000100000001","name":"Basement"},{"where_id":"00000000-0000-0000-0000-00010000000d","name":"Bedroom"},{"where_id":"00000000-0000-0000-0000-000100000003","name":"Den"},{"where_id":"00000000-0000-0000-0000-000100000010","name":"Dining + Room"},{"where_id":"00000000-0000-0000-0000-000100000006","name":"Downstairs"},{"where_id":"00000000-0000-0000-0000-000100000000","name":"Entryway"},{"where_id":"00000000-0000-0000-0000-00010000000b","name":"Family + Room"},{"where_id":"00000000-0000-0000-0000-000100000002","name":"Hallway"},{"where_id":"00000000-0000-0000-0000-000100000008","name":"Kids + Room"},{"where_id":"00000000-0000-0000-0000-00010000000a","name":"Kitchen"},{"where_id":"00000000-0000-0000-0000-00010000000c","name":"Living + Room"},{"where_id":"00000000-0000-0000-0000-000100000005","name":"Master Bedroom"},{"where_id":"00000000-0000-0000-0000-00010000000e","name":"Office"},{"where_id":"00000000-0000-0000-0000-00010000000f","name":"Upstairs"}]}},"structure":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":15857,"$timestamp":1445956462746,"away_timestamp":1445954700,"away":false,"location":"Palm + Harbor, FL","name":"Chrome App Structure","postal_code":"34683","topaz_away":false,"creation_time":1445885694067,"country_code":"US","away_setter":0,"topaz_hush_key":"FmyQftpkdU9eH9St4mMWhQ==","user":"user.2423243","devices":["device.fake3243E4FEE924"],"swarm":["device.fake3243E4FEE924"],"fabric_ids":[],"clutches":[],"members":[{"user":"user.2423243","roles":["owner"]}]}},"message":{"fake3243E4FEE924":{"$version":-24419,"$timestamp":1445954076171,"1":{"cmd":"register"}}},"tuneups":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1}},"device":{"fake3243E4FEE924":{"$version":-27199,"$timestamp":1445956401831,"heatpump_setback_active":false,"emer_heat_enable":false,"touched_by":{},"local_ip":"192.168.2.4","switch_system_off":false,"away_temperature_high":24.444,"cooling_source":"electric","temperature_lock_high_temp":22.222,"y2_type":"unknown","leaf_threshold_cool":0,"heater_source":"gas","fan_cooling_state":false,"note_codes":[],"compressor_lockout_leaf":-17.8,"has_x3_heat":false,"target_humidity_enabled":false,"heat_x3_source":"electric","alt_heat_delivery":"forced-air","has_x2_heat":false,"fan_mode":"auto","rssi":66,"sunlight_correction_active":false,"emer_heat_delivery":"forced-air","heatpump_savings":"off","pin_y2_description":"none","humidity_control_lockout_end_time":0,"filter_reminder_level":0,"gear_opacity":0,"filter_reminder_enabled":true,"capability_level":4,"schedule_learning_reset":false,"has_x2_cool":false,"hvac_pins":"W1,C,Rh,G","ob_orientation":"O","cooling_delivery":"unknown","range_enable":false,"auto_away_enable":true,"dual_fuel_breakpoint_override":"none","lower_safety_temp_enabled":true,"has_fan":true,"dehumidifier_state":false,"emer_heat_source":"electric","nlclient_state":"","heatpump_ready":false,"cooling_x2_delivery":"unknown","available_locales":"en_US,fr_CA,es_US,en_GB","current_version":"4.1","has_fossil_fuel":true,"learning_state":"slow","pin_ob_description":"none","pin_rh_description":"power","has_alt_heat":false,"safety_temp_activating_hvac":false,"fan_duty_cycle":900,"pin_y1_description":"none","humidifier_state":false,"gear_threshold_high":0,"backplate_serial_number":"02BA01AB241200CW","has_x2_alt_heat":false,"heat_x3_delivery":"forced-air","leaf_threshold_heat":18.334,"is_on_stand":false,"has_emer_heat":false,"learning_mode":true,"leaf_learning":"ready","has_aux_heat":false,"filter_changed_set_date":1386452016,"aux_heat_source":"electric","backplate_bsl_info":"BSL","alt_heat_x2_source":"gas","sunlight_correction_ready":true,"humidifier_type":"unknown","pin_c_description":"power","humidity_control_lockout_start_time":0,"pin_w2aux_description":"none","fan_timer_timeout":0,"country_code":"US","sunlight_correction_enabled":true,"heat_x2_delivery":"forced-air","target_humidity":35,"gear_threshold_low":0,"lower_safety_temp":4.738,"cooling_x2_source":"electric","equipment_type":"electric","heat_pump_aux_threshold":10,"alt_heat_x2_delivery":"forced-air","heat_pump_comp_threshold":-31.5,"learning_days_completed_cool":0,"backplate_bsl_version":"2.1","current_schedule_mode":"HEAT","fan_duty_end_time":68400,"hvac_wires":"Heat,Fan,Common + Wire,Rh","leaf":true,"type":"TBD","pin_g_description":"fan","click_sound":"on","away_temperature_low_enabled":true,"aux_heat_delivery":"forced-air","filter_changed_date":1387065600,"hvac_safety_shutoff_active":false,"heat_pump_comp_threshold_enabled":false,"has_dehumidifier":false,"preconditioning_ready":true,"fan_cooling_enabled":true,"leaf_away_high":28.88,"fan_cooling_readiness":"not + ready","device_locale":"en_US","temperature_scale":"F","battery_level":3.963,"error_code":"","maint_band_upper":0.39,"preconditioning_active":false,"fan_control_state":false,"away_temperature_high_enabled":false,"dehumidifier_fan_activation":false,"learning_days_completed_heat":598,"humidifier_fan_activation":false,"pin_star_description":"none","upper_safety_temp_enabled":false,"dual_fuel_selected":false,"preconditioning_enabled":false,"current_humidity":50,"dual_fuel_breakpoint":-1,"postal_code":"94602","backplate_mono_version":"4.0.20","alt_heat_source":"gas","aux_lockout_leaf":10,"has_heat_pump":false,"heater_delivery":"forced-air","away_temperature_low":12.778,"auto_away_reset":false,"radiant_control_enabled":false,"has_air_filter":true,"temperature_lock":false,"dehumidifier_type":"unknown","time_to_target_training":"training","upper_safety_temp":35,"humidity_control_lockout_enabled":false,"fan_timer_duration":900,"target_time_confidence":0,"pin_w1_description":"heat","temperature_lock_low_temp":20,"where_id":"00000000-0000-0000-0000-000100000001","forced_air":true,"temperature_lock_pin_hash":"","auto_dehum_enabled":false,"leaf_type":1,"backplate_mono_info":"TFE + (BP_D2) 4.0.20 (root@bamboo) 2014-02-03 10:06:33","has_dual_fuel":false,"star_type":"unknown","learning_time":1703,"maint_band_lower":0.39,"creation_time":1420654958512,"has_humidifier":false,"learning_days_completed_range":0,"dehumidifier_orientation_selected":"unknown","leaf_schedule_delta":1.11,"logging_priority":"informational","user_brightness":"medium","leaf_away_low":16.835,"pin_rc_description":"none","auto_dehum_state":false,"serial_number":"80C4887E69DF00D9","heat_x2_source":"electric","mac_address":"18b430093686","fan_duty_start_time":50400,"time_to_target":0,"backplate_model":"Backplate-2.2","heat_link_connection":0,"model_version":"Display-2.1","heat_pump_aux_threshold_enabled":true,"ob_persistence":true,"schedules":[]}},"trip":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":32201,"$timestamp":1445885694252,"trips":[]}},"demand_response":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1}},"user":{"2423243":{"$version":9049,"$timestamp":1445885721137,"email":"test@yahoo.com","name":"test@yahoo.com","structures":["structure.0b47dcf0-7c13-11e5-8199-22000b420f99"],"structure_memberships":[{"structure":"structure.0b47dcf0-7c13-11e5-8199-22000b420f99","roles":["owner"]}]}},"link":{"fake3243E4FEE924":{"$version":10338,"$timestamp":1445954076171,"structure":"structure.0b47dcf0-7c13-11e5-8199-22000b420f99"}},"device_alert_dialog":{"fake3243E4FEE924":{"$version":-9248,"$timestamp":1445954076171,"dialog_data":"","dialog_id":"confirm-pairing"}},"geofence_info":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-31412,"$timestamp":1445885694252,"device_events":[],"fences":[]}},"metadata":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1356998400000,"last_ip":"127.0.0.1","last_connection":1356998400000}},"user_settings":{"2423243":{"$version":31691,"$timestamp":1445354998080,"email_verified":true,"tos_accepted_version":1434564000000,"receive_marketing_emails":true,"receive_nest_emails":true,"receive_support_emails":true,"max_structures":2,"max_thermostats":40,"max_thermostats_per_structure":20,"max_smoke_detectors_per_structure":18,"max_smoke_detectors":36,"max_wwn_devices_per_structure":10,"max_wwn_devices":20,"tos_minimum_version":1434564000000,"tos_current_version":1434564000000,"lang":"en_US"}},"schedule":{"fake3243E4FEE924":{"$version":21638,"$timestamp":1445954075940}},"structure_metadata":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-32678,"$timestamp":1445951380776,"entitlements_api_path":"/api/0.1/structure/0b47dcf0-7c13-11e5-8199-22000b420f99/entitlements?v=8a957eeb-c93a-4e47-aea4-fb31cfc65691"}},"shared":{"fake3243E4FEE924":{"$version":23406,"$timestamp":1445956466947,"auto_away_learning":"ready","auto_away":0,"hvac_alt_heat_state":false,"compressor_lockout_enabled":false,"hvac_heat_x3_state":false,"target_temperature_type":"heat","hvac_heater_state":false,"can_heat":true,"hvac_emer_heat_state":false,"compressor_lockout_timeout":0,"hvac_cool_x2_state":false,"target_temperature_high":23.33333,"hvac_aux_heater_state":false,"hvac_heat_x2_state":false,"target_temperature_low":23.33333,"target_temperature":23.33333,"hvac_ac_state":false,"hvac_fan_state":false,"target_change_pending":true,"name":"E924","current_temperature":21,"hvac_alt_heat_x2_state":false,"can_cool":true}},"safety_summary":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-21456,"$timestamp":1445885694252}}}' + http_version: '1.1' + recorded_at: Tue, 27 Oct 2015 14:34:27 GMT +- request: + method: post + uri: https://on6%DFn7d%AC%A0%B57%D4%F7j9ZD%5B%13g%12%AE%AA7~%FD+gwtO%12%A9%DA%CA%60&Ea%B7%DCp%05%18s%C2&%DD%F4%C2;%D9Bw%09%25I;%BC%D5x%D9:V%E99*rC%B92;4cV%5D%E7%E1%DC%C7%B2%B0%16O%94ZY%B6%20%94X%17%03%ED%1E%91%CC%09tNS(%C9%F2%20%E9%FEY%01%5C%3Cf%A4%E4@czfe09-front01-iad01.transport.home.nest.com/v2/put/shared.fake3243E4FEE924 + body: + encoding: UTF-8 + string: '{"target_change_pending":true,"target_temperature":22.77778}' + headers: + host: + - czfe09-front01-iad01.transport.home.nest.com + user-agent: + - Nest/1.1.0.10 CFNetwork/548.0.4 + authorization: + - Basic b.2423243.ZKygtTfU92o5WkRbE2cSrqo3fv0rZ3d0TxKp2spgJkVht9xwBRhzwibd9MI72UJ3CSVJO7zVeNk6Vuk5KnJDuTI7NGNWXefh3MeysBZPlFpZtiCUWBcD7R6RzAl0TlMoyfIg6f5ZAVw8ZqTk + x-nl-user-id: + - '2423243' + x-nl-protocol-version: + - '1' + accept-language: + - en-us + connection: + - keep-alive + accept: + - "*/*" + response: + status: + code: 200 + message: OK + headers: + content-type: + - application/json + x-nl-defer-device-window: + - '120' + x-nl-skv-key: + - shared.fake3243E4FEE924 + x-nl-skv-version: + - "-8675" + x-nl-skv-timestamp: + - '1445956467632' + x-nl-service-timestamp: + - '1445956467646' + content-length: + - '0' + connection: + - keep-alive + body: + encoding: UTF-8 + string: '' + http_version: '1.1' + recorded_at: Tue, 27 Oct 2015 14:34:28 GMT +- request: + method: get + uri: https://on6%DFn7d%AC%A0%B57%D4%F7j9ZD%5B%13g%12%AE%AA7~%FD+gwtO%12%A9%DA%CA%60&Ea%B7%DCp%05%18s%C2&%DD%F4%C2;%D9Bw%09%25I;%BC%D5x%D9:V%E99*rC%B92;4cV%5D%E7%E1%DC%C7%B2%B0%16O%94ZY%B6%20%94X%17%03%ED%1E%91%CC%09tNS(%C9%F2%20%E9%FEY%01%5C%3Cf%A4%E4@czfe09-front01-iad01.transport.home.nest.com/v2/mobile/user.2423243 + body: + encoding: US-ASCII + string: '' + headers: + host: + - czfe09-front01-iad01.transport.home.nest.com + user-agent: + - Nest/1.1.0.10 CFNetwork/548.0.4 + authorization: + - Basic b.2423243.ZKygtTfU92o5WkRbE2cSrqo3fv0rZ3d0TxKp2spgJkVht9xwBRhzwibd9MI72UJ3CSVJO7zVeNk6Vuk5KnJDuTI7NGNWXefh3MeysBZPlFpZtiCUWBcD7R6RzAl0TlMoyfIg6f5ZAVw8ZqTk + x-nl-user-id: + - '2423243' + x-nl-protocol-version: + - '1' + accept-language: + - en-us + connection: + - keep-alive + accept: + - "*/*" + response: + status: + code: 200 + message: OK + headers: + content-type: + - application/json + x-nl-defer-device-window: + - '120' + x-nl-service-timestamp: + - '1445956468015' + content-length: + - '10892' + connection: + - keep-alive + body: + encoding: UTF-8 + string: '{"user_alert_dialog":{"2423243":{"$version":-31019,"$timestamp":1445954076171,"dialog_data":"","dialog_id":"confirm-pairing"}},"buckets":{"2423243":{"$version":12532,"$timestamp":1445956458542,"buckets":["user.2423243","user_alert_dialog.2423243","message_center.2423243","user_settings.2423243","buckets.2423243","device.fake3243E4FEE924","demand_response.fake3243E4FEE924","device_alert_dialog.fake3243E4FEE924","link.fake3243E4FEE924","message.fake3243E4FEE924","metadata.fake3243E4FEE924","schedule.fake3243E4FEE924","shared.fake3243E4FEE924","track.fake3243E4FEE924","tuneups.fake3243E4FEE924","energy_latest.fake3243E4FEE924","energy_weekly.fake3243E4FEE924","diamond_sensor_event.fake3243E4FEE924","diamond_sensor_config.fake3243E4FEE924","structure.0b47dcf0-7c13-11e5-8199-22000b420f99","where.0b47dcf0-7c13-11e5-8199-22000b420f99","utility.0b47dcf0-7c13-11e5-8199-22000b420f99","structure_history.0b47dcf0-7c13-11e5-8199-22000b420f99","trip.0b47dcf0-7c13-11e5-8199-22000b420f99","structure_metadata.0b47dcf0-7c13-11e5-8199-22000b420f99","safety.0b47dcf0-7c13-11e5-8199-22000b420f99","safety_summary.0b47dcf0-7c13-11e5-8199-22000b420f99","geofence_info.0b47dcf0-7c13-11e5-8199-22000b420f99"]}},"track":{"fake3243E4FEE924":{"$version":31457,"$timestamp":1445954075890,"online":false}},"message_center":{"2423243":{"$version":-1,"$timestamp":1325379661000,"messages":[]}},"safety":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":3651,"$timestamp":1445885694252,"audio_self_test_participants":[]}},"utility":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-1,"$timestamp":1}},"where":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":25319,"$timestamp":1445885694015,"wheres":[{"where_id":"00000000-0000-0000-0000-000100000001","name":"Basement"},{"where_id":"00000000-0000-0000-0000-00010000000d","name":"Bedroom"},{"where_id":"00000000-0000-0000-0000-000100000003","name":"Den"},{"where_id":"00000000-0000-0000-0000-000100000010","name":"Dining + Room"},{"where_id":"00000000-0000-0000-0000-000100000006","name":"Downstairs"},{"where_id":"00000000-0000-0000-0000-000100000000","name":"Entryway"},{"where_id":"00000000-0000-0000-0000-00010000000b","name":"Family + Room"},{"where_id":"00000000-0000-0000-0000-000100000002","name":"Hallway"},{"where_id":"00000000-0000-0000-0000-000100000008","name":"Kids + Room"},{"where_id":"00000000-0000-0000-0000-00010000000a","name":"Kitchen"},{"where_id":"00000000-0000-0000-0000-00010000000c","name":"Living + Room"},{"where_id":"00000000-0000-0000-0000-000100000005","name":"Master Bedroom"},{"where_id":"00000000-0000-0000-0000-00010000000e","name":"Office"},{"where_id":"00000000-0000-0000-0000-00010000000f","name":"Upstairs"}]}},"structure":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":15857,"$timestamp":1445956462746,"away_timestamp":1445954700,"away":false,"location":"Palm + Harbor, FL","name":"Chrome App Structure","postal_code":"34683","topaz_away":false,"creation_time":1445885694067,"country_code":"US","away_setter":0,"topaz_hush_key":"FmyQftpkdU9eH9St4mMWhQ==","user":"user.2423243","devices":["device.fake3243E4FEE924"],"swarm":["device.fake3243E4FEE924"],"fabric_ids":[],"clutches":[],"members":[{"user":"user.2423243","roles":["owner"]}]}},"message":{"fake3243E4FEE924":{"$version":-24419,"$timestamp":1445954076171,"1":{"cmd":"register"}}},"tuneups":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1}},"device":{"fake3243E4FEE924":{"$version":-27199,"$timestamp":1445956401831,"heatpump_setback_active":false,"emer_heat_enable":false,"touched_by":{},"local_ip":"192.168.2.4","switch_system_off":false,"away_temperature_high":24.444,"cooling_source":"electric","temperature_lock_high_temp":22.222,"y2_type":"unknown","leaf_threshold_cool":0,"heater_source":"gas","fan_cooling_state":false,"note_codes":[],"compressor_lockout_leaf":-17.8,"has_x3_heat":false,"target_humidity_enabled":false,"heat_x3_source":"electric","alt_heat_delivery":"forced-air","has_x2_heat":false,"fan_mode":"auto","rssi":66,"sunlight_correction_active":false,"emer_heat_delivery":"forced-air","heatpump_savings":"off","pin_y2_description":"none","humidity_control_lockout_end_time":0,"filter_reminder_level":0,"gear_opacity":0,"filter_reminder_enabled":true,"capability_level":4,"schedule_learning_reset":false,"has_x2_cool":false,"hvac_pins":"W1,C,Rh,G","ob_orientation":"O","cooling_delivery":"unknown","range_enable":false,"auto_away_enable":true,"dual_fuel_breakpoint_override":"none","lower_safety_temp_enabled":true,"has_fan":true,"dehumidifier_state":false,"emer_heat_source":"electric","nlclient_state":"","heatpump_ready":false,"cooling_x2_delivery":"unknown","available_locales":"en_US,fr_CA,es_US,en_GB","current_version":"4.1","has_fossil_fuel":true,"learning_state":"slow","pin_ob_description":"none","pin_rh_description":"power","has_alt_heat":false,"safety_temp_activating_hvac":false,"fan_duty_cycle":900,"pin_y1_description":"none","humidifier_state":false,"gear_threshold_high":0,"backplate_serial_number":"02BA01AB241200CW","has_x2_alt_heat":false,"heat_x3_delivery":"forced-air","leaf_threshold_heat":18.334,"is_on_stand":false,"has_emer_heat":false,"learning_mode":true,"leaf_learning":"ready","has_aux_heat":false,"filter_changed_set_date":1386452016,"aux_heat_source":"electric","backplate_bsl_info":"BSL","alt_heat_x2_source":"gas","sunlight_correction_ready":true,"humidifier_type":"unknown","pin_c_description":"power","humidity_control_lockout_start_time":0,"pin_w2aux_description":"none","fan_timer_timeout":0,"country_code":"US","sunlight_correction_enabled":true,"heat_x2_delivery":"forced-air","target_humidity":35,"gear_threshold_low":0,"lower_safety_temp":4.738,"cooling_x2_source":"electric","equipment_type":"electric","heat_pump_aux_threshold":10,"alt_heat_x2_delivery":"forced-air","heat_pump_comp_threshold":-31.5,"learning_days_completed_cool":0,"backplate_bsl_version":"2.1","current_schedule_mode":"HEAT","fan_duty_end_time":68400,"hvac_wires":"Heat,Fan,Common + Wire,Rh","leaf":true,"type":"TBD","pin_g_description":"fan","click_sound":"on","away_temperature_low_enabled":true,"aux_heat_delivery":"forced-air","filter_changed_date":1387065600,"hvac_safety_shutoff_active":false,"heat_pump_comp_threshold_enabled":false,"has_dehumidifier":false,"preconditioning_ready":true,"fan_cooling_enabled":true,"leaf_away_high":28.88,"fan_cooling_readiness":"not + ready","device_locale":"en_US","temperature_scale":"F","battery_level":3.963,"error_code":"","maint_band_upper":0.39,"preconditioning_active":false,"fan_control_state":false,"away_temperature_high_enabled":false,"dehumidifier_fan_activation":false,"learning_days_completed_heat":598,"humidifier_fan_activation":false,"pin_star_description":"none","upper_safety_temp_enabled":false,"dual_fuel_selected":false,"preconditioning_enabled":false,"current_humidity":50,"dual_fuel_breakpoint":-1,"postal_code":"94602","backplate_mono_version":"4.0.20","alt_heat_source":"gas","aux_lockout_leaf":10,"has_heat_pump":false,"heater_delivery":"forced-air","away_temperature_low":12.778,"auto_away_reset":false,"radiant_control_enabled":false,"has_air_filter":true,"temperature_lock":false,"dehumidifier_type":"unknown","time_to_target_training":"training","upper_safety_temp":35,"humidity_control_lockout_enabled":false,"fan_timer_duration":900,"target_time_confidence":0,"pin_w1_description":"heat","temperature_lock_low_temp":20,"where_id":"00000000-0000-0000-0000-000100000001","forced_air":true,"temperature_lock_pin_hash":"","auto_dehum_enabled":false,"leaf_type":1,"backplate_mono_info":"TFE + (BP_D2) 4.0.20 (root@bamboo) 2014-02-03 10:06:33","has_dual_fuel":false,"star_type":"unknown","learning_time":1703,"maint_band_lower":0.39,"creation_time":1420654958512,"has_humidifier":false,"learning_days_completed_range":0,"dehumidifier_orientation_selected":"unknown","leaf_schedule_delta":1.11,"logging_priority":"informational","user_brightness":"medium","leaf_away_low":16.835,"pin_rc_description":"none","auto_dehum_state":false,"serial_number":"80C4887E69DF00D9","heat_x2_source":"electric","mac_address":"18b430093686","fan_duty_start_time":50400,"time_to_target":0,"backplate_model":"Backplate-2.2","heat_link_connection":0,"model_version":"Display-2.1","heat_pump_aux_threshold_enabled":true,"ob_persistence":true,"schedules":[]}},"trip":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":32201,"$timestamp":1445885694252,"trips":[]}},"demand_response":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1}},"user":{"2423243":{"$version":9049,"$timestamp":1445885721137,"email":"test@yahoo.com","name":"test@yahoo.com","structures":["structure.0b47dcf0-7c13-11e5-8199-22000b420f99"],"structure_memberships":[{"structure":"structure.0b47dcf0-7c13-11e5-8199-22000b420f99","roles":["owner"]}]}},"link":{"fake3243E4FEE924":{"$version":10338,"$timestamp":1445954076171,"structure":"structure.0b47dcf0-7c13-11e5-8199-22000b420f99"}},"device_alert_dialog":{"fake3243E4FEE924":{"$version":-9248,"$timestamp":1445954076171,"dialog_data":"","dialog_id":"confirm-pairing"}},"geofence_info":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-31412,"$timestamp":1445885694252,"device_events":[],"fences":[]}},"metadata":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1356998400000,"last_ip":"127.0.0.1","last_connection":1356998400000}},"user_settings":{"2423243":{"$version":31691,"$timestamp":1445354998080,"email_verified":true,"tos_accepted_version":1434564000000,"receive_marketing_emails":true,"receive_nest_emails":true,"receive_support_emails":true,"max_structures":2,"max_thermostats":40,"max_thermostats_per_structure":20,"max_smoke_detectors_per_structure":18,"max_smoke_detectors":36,"max_wwn_devices_per_structure":10,"max_wwn_devices":20,"tos_minimum_version":1434564000000,"tos_current_version":1434564000000,"lang":"en_US"}},"schedule":{"fake3243E4FEE924":{"$version":21638,"$timestamp":1445954075940}},"structure_metadata":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-32678,"$timestamp":1445951380776,"entitlements_api_path":"/api/0.1/structure/0b47dcf0-7c13-11e5-8199-22000b420f99/entitlements?v=8a957eeb-c93a-4e47-aea4-fb31cfc65691"}},"shared":{"fake3243E4FEE924":{"$version":-8675,"$timestamp":1445956467632,"auto_away_learning":"ready","auto_away":0,"hvac_alt_heat_state":false,"compressor_lockout_enabled":false,"hvac_heat_x3_state":false,"target_temperature_type":"heat","hvac_heater_state":false,"can_heat":true,"hvac_emer_heat_state":false,"compressor_lockout_timeout":0,"hvac_cool_x2_state":false,"target_temperature_high":23.33333,"hvac_aux_heater_state":false,"hvac_heat_x2_state":false,"target_temperature_low":23.33333,"hvac_ac_state":false,"target_temperature":22.77778,"hvac_fan_state":false,"target_change_pending":true,"name":"E924","current_temperature":21,"hvac_alt_heat_x2_state":false,"can_cool":true}},"safety_summary":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-21456,"$timestamp":1445885694252}}}' + http_version: '1.1' + recorded_at: Tue, 27 Oct 2015 14:34:28 GMT +recorded_with: VCR 2.9.3 diff --git a/fixtures/vcr_cassettes/NestThermostat_Nest/sets_the_temperature_in_celsius.yml b/fixtures/vcr_cassettes/NestThermostat_Nest/sets_the_temperature_in_celsius.yml new file mode 100644 index 0000000..eefddb1 --- /dev/null +++ b/fixtures/vcr_cassettes/NestThermostat_Nest/sets_the_temperature_in_celsius.yml @@ -0,0 +1,103 @@ +--- +http_interactions: +- request: + method: post + uri: https://on6%DFn7d%AC%A0%B57%D4%F7j9ZD%5B%13g%12%AE%AA7~%FD+gwtO%12%A9%DA%CA%60&Ea%B7%DCp%05%18s%C2&%DD%F4%C2;%D9Bw%09%25I;%BC%D5x%D9:V%E99*rC%B92;4cV%5D%E7%E1%DC%C7%B2%B0%16O%94ZY%B6%20%94X%17%03%ED%1E%91%CC%09tNS(%C9%F2%20%E9%FEY%01%5C%3Cf%A4%E4@czfe09-front01-iad01.transport.home.nest.com/v2/put/shared.fake3243E4FEE924 + body: + encoding: UTF-8 + string: '{"target_change_pending":true,"target_temperature":22.0}' + headers: + host: + - czfe09-front01-iad01.transport.home.nest.com + user-agent: + - Nest/1.1.0.10 CFNetwork/548.0.4 + authorization: + - Basic b.2423243.ZKygtTfU92o5WkRbE2cSrqo3fv0rZ3d0TxKp2spgJkVht9xwBRhzwibd9MI72UJ3CSVJO7zVeNk6Vuk5KnJDuTI7NGNWXefh3MeysBZPlFpZtiCUWBcD7R6RzAl0TlMoyfIg6f5ZAVw8ZqTk + x-nl-user-id: + - '2423243' + x-nl-protocol-version: + - '1' + accept-language: + - en-us + connection: + - keep-alive + accept: + - "*/*" + response: + status: + code: 200 + message: OK + headers: + content-type: + - application/json + x-nl-defer-device-window: + - '120' + x-nl-skv-key: + - shared.fake3243E4FEE924 + x-nl-skv-version: + - '14970' + x-nl-skv-timestamp: + - '1445956471147' + x-nl-service-timestamp: + - '1445956471162' + content-length: + - '0' + connection: + - keep-alive + body: + encoding: UTF-8 + string: '' + http_version: '1.1' + recorded_at: Tue, 27 Oct 2015 14:34:31 GMT +- request: + method: get + uri: https://on6%DFn7d%AC%A0%B57%D4%F7j9ZD%5B%13g%12%AE%AA7~%FD+gwtO%12%A9%DA%CA%60&Ea%B7%DCp%05%18s%C2&%DD%F4%C2;%D9Bw%09%25I;%BC%D5x%D9:V%E99*rC%B92;4cV%5D%E7%E1%DC%C7%B2%B0%16O%94ZY%B6%20%94X%17%03%ED%1E%91%CC%09tNS(%C9%F2%20%E9%FEY%01%5C%3Cf%A4%E4@czfe09-front01-iad01.transport.home.nest.com/v2/mobile/user.2423243 + body: + encoding: US-ASCII + string: '' + headers: + host: + - czfe09-front01-iad01.transport.home.nest.com + user-agent: + - Nest/1.1.0.10 CFNetwork/548.0.4 + authorization: + - Basic b.2423243.ZKygtTfU92o5WkRbE2cSrqo3fv0rZ3d0TxKp2spgJkVht9xwBRhzwibd9MI72UJ3CSVJO7zVeNk6Vuk5KnJDuTI7NGNWXefh3MeysBZPlFpZtiCUWBcD7R6RzAl0TlMoyfIg6f5ZAVw8ZqTk + x-nl-user-id: + - '2423243' + x-nl-protocol-version: + - '1' + accept-language: + - en-us + connection: + - keep-alive + accept: + - "*/*" + response: + status: + code: 200 + message: OK + headers: + content-type: + - application/json + x-nl-defer-device-window: + - '120' + x-nl-service-timestamp: + - '1445956471534' + content-length: + - '10888' + connection: + - keep-alive + body: + encoding: UTF-8 + string: '{"user_alert_dialog":{"2423243":{"$version":-31019,"$timestamp":1445954076171,"dialog_data":"","dialog_id":"confirm-pairing"}},"buckets":{"2423243":{"$version":12532,"$timestamp":1445956458542,"buckets":["user.2423243","user_alert_dialog.2423243","message_center.2423243","user_settings.2423243","buckets.2423243","device.fake3243E4FEE924","demand_response.fake3243E4FEE924","device_alert_dialog.fake3243E4FEE924","link.fake3243E4FEE924","message.fake3243E4FEE924","metadata.fake3243E4FEE924","schedule.fake3243E4FEE924","shared.fake3243E4FEE924","track.fake3243E4FEE924","tuneups.fake3243E4FEE924","energy_latest.fake3243E4FEE924","energy_weekly.fake3243E4FEE924","diamond_sensor_event.fake3243E4FEE924","diamond_sensor_config.fake3243E4FEE924","structure.0b47dcf0-7c13-11e5-8199-22000b420f99","where.0b47dcf0-7c13-11e5-8199-22000b420f99","utility.0b47dcf0-7c13-11e5-8199-22000b420f99","structure_history.0b47dcf0-7c13-11e5-8199-22000b420f99","trip.0b47dcf0-7c13-11e5-8199-22000b420f99","structure_metadata.0b47dcf0-7c13-11e5-8199-22000b420f99","safety.0b47dcf0-7c13-11e5-8199-22000b420f99","safety_summary.0b47dcf0-7c13-11e5-8199-22000b420f99","geofence_info.0b47dcf0-7c13-11e5-8199-22000b420f99"]}},"track":{"fake3243E4FEE924":{"$version":31457,"$timestamp":1445954075890,"online":false}},"message_center":{"2423243":{"$version":-1,"$timestamp":1325379661000,"messages":[]}},"safety":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":3651,"$timestamp":1445885694252,"audio_self_test_participants":[]}},"utility":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-1,"$timestamp":1}},"where":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":25319,"$timestamp":1445885694015,"wheres":[{"where_id":"00000000-0000-0000-0000-000100000001","name":"Basement"},{"where_id":"00000000-0000-0000-0000-00010000000d","name":"Bedroom"},{"where_id":"00000000-0000-0000-0000-000100000003","name":"Den"},{"where_id":"00000000-0000-0000-0000-000100000010","name":"Dining + Room"},{"where_id":"00000000-0000-0000-0000-000100000006","name":"Downstairs"},{"where_id":"00000000-0000-0000-0000-000100000000","name":"Entryway"},{"where_id":"00000000-0000-0000-0000-00010000000b","name":"Family + Room"},{"where_id":"00000000-0000-0000-0000-000100000002","name":"Hallway"},{"where_id":"00000000-0000-0000-0000-000100000008","name":"Kids + Room"},{"where_id":"00000000-0000-0000-0000-00010000000a","name":"Kitchen"},{"where_id":"00000000-0000-0000-0000-00010000000c","name":"Living + Room"},{"where_id":"00000000-0000-0000-0000-000100000005","name":"Master Bedroom"},{"where_id":"00000000-0000-0000-0000-00010000000e","name":"Office"},{"where_id":"00000000-0000-0000-0000-00010000000f","name":"Upstairs"}]}},"structure":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":15857,"$timestamp":1445956462746,"away_timestamp":1445954700,"away":false,"location":"Palm + Harbor, FL","name":"Chrome App Structure","postal_code":"34683","topaz_away":false,"creation_time":1445885694067,"country_code":"US","away_setter":0,"topaz_hush_key":"FmyQftpkdU9eH9St4mMWhQ==","user":"user.2423243","devices":["device.fake3243E4FEE924"],"swarm":["device.fake3243E4FEE924"],"fabric_ids":[],"clutches":[],"members":[{"user":"user.2423243","roles":["owner"]}]}},"message":{"fake3243E4FEE924":{"$version":-24419,"$timestamp":1445954076171,"1":{"cmd":"register"}}},"tuneups":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1}},"device":{"fake3243E4FEE924":{"$version":-27199,"$timestamp":1445956401831,"heatpump_setback_active":false,"emer_heat_enable":false,"touched_by":{},"local_ip":"192.168.2.4","switch_system_off":false,"away_temperature_high":24.444,"cooling_source":"electric","temperature_lock_high_temp":22.222,"y2_type":"unknown","leaf_threshold_cool":0,"heater_source":"gas","fan_cooling_state":false,"note_codes":[],"compressor_lockout_leaf":-17.8,"has_x3_heat":false,"target_humidity_enabled":false,"heat_x3_source":"electric","alt_heat_delivery":"forced-air","has_x2_heat":false,"fan_mode":"auto","rssi":66,"sunlight_correction_active":false,"emer_heat_delivery":"forced-air","heatpump_savings":"off","pin_y2_description":"none","humidity_control_lockout_end_time":0,"filter_reminder_level":0,"gear_opacity":0,"filter_reminder_enabled":true,"capability_level":4,"schedule_learning_reset":false,"has_x2_cool":false,"hvac_pins":"W1,C,Rh,G","ob_orientation":"O","cooling_delivery":"unknown","range_enable":false,"auto_away_enable":true,"dual_fuel_breakpoint_override":"none","lower_safety_temp_enabled":true,"has_fan":true,"dehumidifier_state":false,"emer_heat_source":"electric","nlclient_state":"","heatpump_ready":false,"cooling_x2_delivery":"unknown","available_locales":"en_US,fr_CA,es_US,en_GB","current_version":"4.1","has_fossil_fuel":true,"learning_state":"slow","pin_ob_description":"none","pin_rh_description":"power","has_alt_heat":false,"safety_temp_activating_hvac":false,"fan_duty_cycle":900,"pin_y1_description":"none","humidifier_state":false,"gear_threshold_high":0,"backplate_serial_number":"02BA01AB241200CW","has_x2_alt_heat":false,"heat_x3_delivery":"forced-air","leaf_threshold_heat":18.334,"is_on_stand":false,"has_emer_heat":false,"learning_mode":true,"leaf_learning":"ready","has_aux_heat":false,"filter_changed_set_date":1386452016,"aux_heat_source":"electric","backplate_bsl_info":"BSL","alt_heat_x2_source":"gas","sunlight_correction_ready":true,"humidifier_type":"unknown","pin_c_description":"power","humidity_control_lockout_start_time":0,"pin_w2aux_description":"none","fan_timer_timeout":0,"country_code":"US","sunlight_correction_enabled":true,"heat_x2_delivery":"forced-air","target_humidity":35,"gear_threshold_low":0,"lower_safety_temp":4.738,"cooling_x2_source":"electric","equipment_type":"electric","heat_pump_aux_threshold":10,"alt_heat_x2_delivery":"forced-air","heat_pump_comp_threshold":-31.5,"learning_days_completed_cool":0,"backplate_bsl_version":"2.1","current_schedule_mode":"HEAT","fan_duty_end_time":68400,"hvac_wires":"Heat,Fan,Common + Wire,Rh","leaf":true,"type":"TBD","pin_g_description":"fan","click_sound":"on","away_temperature_low_enabled":true,"aux_heat_delivery":"forced-air","filter_changed_date":1387065600,"hvac_safety_shutoff_active":false,"heat_pump_comp_threshold_enabled":false,"has_dehumidifier":false,"preconditioning_ready":true,"fan_cooling_enabled":true,"leaf_away_high":28.88,"fan_cooling_readiness":"not + ready","device_locale":"en_US","temperature_scale":"F","battery_level":3.963,"error_code":"","maint_band_upper":0.39,"preconditioning_active":false,"fan_control_state":false,"away_temperature_high_enabled":false,"dehumidifier_fan_activation":false,"learning_days_completed_heat":598,"humidifier_fan_activation":false,"pin_star_description":"none","upper_safety_temp_enabled":false,"dual_fuel_selected":false,"preconditioning_enabled":false,"current_humidity":50,"dual_fuel_breakpoint":-1,"postal_code":"94602","backplate_mono_version":"4.0.20","alt_heat_source":"gas","aux_lockout_leaf":10,"has_heat_pump":false,"heater_delivery":"forced-air","away_temperature_low":12.778,"auto_away_reset":false,"radiant_control_enabled":false,"has_air_filter":true,"temperature_lock":false,"dehumidifier_type":"unknown","time_to_target_training":"training","upper_safety_temp":35,"humidity_control_lockout_enabled":false,"fan_timer_duration":900,"target_time_confidence":0,"pin_w1_description":"heat","temperature_lock_low_temp":20,"where_id":"00000000-0000-0000-0000-000100000001","forced_air":true,"temperature_lock_pin_hash":"","auto_dehum_enabled":false,"leaf_type":1,"backplate_mono_info":"TFE + (BP_D2) 4.0.20 (root@bamboo) 2014-02-03 10:06:33","has_dual_fuel":false,"star_type":"unknown","learning_time":1703,"maint_band_lower":0.39,"creation_time":1420654958512,"has_humidifier":false,"learning_days_completed_range":0,"dehumidifier_orientation_selected":"unknown","leaf_schedule_delta":1.11,"logging_priority":"informational","user_brightness":"medium","leaf_away_low":16.835,"pin_rc_description":"none","auto_dehum_state":false,"serial_number":"80C4887E69DF00D9","heat_x2_source":"electric","mac_address":"18b430093686","fan_duty_start_time":50400,"time_to_target":0,"backplate_model":"Backplate-2.2","heat_link_connection":0,"model_version":"Display-2.1","heat_pump_aux_threshold_enabled":true,"ob_persistence":true,"schedules":[]}},"trip":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":32201,"$timestamp":1445885694252,"trips":[]}},"demand_response":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1}},"user":{"2423243":{"$version":9049,"$timestamp":1445885721137,"email":"test@yahoo.com","name":"test@yahoo.com","structures":["structure.0b47dcf0-7c13-11e5-8199-22000b420f99"],"structure_memberships":[{"structure":"structure.0b47dcf0-7c13-11e5-8199-22000b420f99","roles":["owner"]}]}},"link":{"fake3243E4FEE924":{"$version":10338,"$timestamp":1445954076171,"structure":"structure.0b47dcf0-7c13-11e5-8199-22000b420f99"}},"device_alert_dialog":{"fake3243E4FEE924":{"$version":-9248,"$timestamp":1445954076171,"dialog_data":"","dialog_id":"confirm-pairing"}},"geofence_info":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-31412,"$timestamp":1445885694252,"device_events":[],"fences":[]}},"metadata":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1356998400000,"last_ip":"127.0.0.1","last_connection":1356998400000}},"user_settings":{"2423243":{"$version":31691,"$timestamp":1445354998080,"email_verified":true,"tos_accepted_version":1434564000000,"receive_marketing_emails":true,"receive_nest_emails":true,"receive_support_emails":true,"max_structures":2,"max_thermostats":40,"max_thermostats_per_structure":20,"max_smoke_detectors_per_structure":18,"max_smoke_detectors":36,"max_wwn_devices_per_structure":10,"max_wwn_devices":20,"tos_minimum_version":1434564000000,"tos_current_version":1434564000000,"lang":"en_US"}},"schedule":{"fake3243E4FEE924":{"$version":21638,"$timestamp":1445954075940}},"structure_metadata":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-32678,"$timestamp":1445951380776,"entitlements_api_path":"/api/0.1/structure/0b47dcf0-7c13-11e5-8199-22000b420f99/entitlements?v=8a957eeb-c93a-4e47-aea4-fb31cfc65691"}},"shared":{"fake3243E4FEE924":{"$version":14970,"$timestamp":1445956471147,"auto_away_learning":"ready","auto_away":0,"hvac_alt_heat_state":false,"compressor_lockout_enabled":false,"hvac_heat_x3_state":false,"target_temperature_type":"heat","hvac_heater_state":false,"can_heat":true,"hvac_emer_heat_state":false,"compressor_lockout_timeout":0,"hvac_cool_x2_state":false,"target_temperature_high":23.33333,"hvac_aux_heater_state":false,"hvac_heat_x2_state":false,"target_temperature_low":23.33333,"target_temperature":22.0,"hvac_ac_state":false,"hvac_fan_state":false,"target_change_pending":true,"name":"E924","current_temperature":21,"hvac_alt_heat_x2_state":false,"can_cool":true}},"safety_summary":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-21456,"$timestamp":1445885694252}}}' + http_version: '1.1' + recorded_at: Tue, 27 Oct 2015 14:34:32 GMT +recorded_with: VCR 2.9.3 diff --git a/fixtures/vcr_cassettes/NestThermostat_Nest/sets_the_temperature_in_kelvin.yml b/fixtures/vcr_cassettes/NestThermostat_Nest/sets_the_temperature_in_kelvin.yml new file mode 100644 index 0000000..bc3e360 --- /dev/null +++ b/fixtures/vcr_cassettes/NestThermostat_Nest/sets_the_temperature_in_kelvin.yml @@ -0,0 +1,103 @@ +--- +http_interactions: +- request: + method: post + uri: https://on6%DFn7d%AC%A0%B57%D4%F7j9ZD%5B%13g%12%AE%AA7~%FD+gwtO%12%A9%DA%CA%60&Ea%B7%DCp%05%18s%C2&%DD%F4%C2;%D9Bw%09%25I;%BC%D5x%D9:V%E99*rC%B92;4cV%5D%E7%E1%DC%C7%B2%B0%16O%94ZY%B6%20%94X%17%03%ED%1E%91%CC%09tNS(%C9%F2%20%E9%FEY%01%5C%3Cf%A4%E4@czfe09-front01-iad01.transport.home.nest.com/v2/put/shared.fake3243E4FEE924 + body: + encoding: UTF-8 + string: '{"target_change_pending":true,"target_temperature":22.85}' + headers: + host: + - czfe09-front01-iad01.transport.home.nest.com + user-agent: + - Nest/1.1.0.10 CFNetwork/548.0.4 + authorization: + - Basic b.2423243.ZKygtTfU92o5WkRbE2cSrqo3fv0rZ3d0TxKp2spgJkVht9xwBRhzwibd9MI72UJ3CSVJO7zVeNk6Vuk5KnJDuTI7NGNWXefh3MeysBZPlFpZtiCUWBcD7R6RzAl0TlMoyfIg6f5ZAVw8ZqTk + x-nl-user-id: + - '2423243' + x-nl-protocol-version: + - '1' + accept-language: + - en-us + connection: + - keep-alive + accept: + - "*/*" + response: + status: + code: 200 + message: OK + headers: + content-type: + - application/json + x-nl-defer-device-window: + - '120' + x-nl-skv-key: + - shared.fake3243E4FEE924 + x-nl-skv-version: + - "-22003" + x-nl-skv-timestamp: + - '1445956471869' + x-nl-service-timestamp: + - '1445956471887' + content-length: + - '0' + connection: + - keep-alive + body: + encoding: UTF-8 + string: '' + http_version: '1.1' + recorded_at: Tue, 27 Oct 2015 14:34:32 GMT +- request: + method: get + uri: https://on6%DFn7d%AC%A0%B57%D4%F7j9ZD%5B%13g%12%AE%AA7~%FD+gwtO%12%A9%DA%CA%60&Ea%B7%DCp%05%18s%C2&%DD%F4%C2;%D9Bw%09%25I;%BC%D5x%D9:V%E99*rC%B92;4cV%5D%E7%E1%DC%C7%B2%B0%16O%94ZY%B6%20%94X%17%03%ED%1E%91%CC%09tNS(%C9%F2%20%E9%FEY%01%5C%3Cf%A4%E4@czfe09-front01-iad01.transport.home.nest.com/v2/mobile/user.2423243 + body: + encoding: US-ASCII + string: '' + headers: + host: + - czfe09-front01-iad01.transport.home.nest.com + user-agent: + - Nest/1.1.0.10 CFNetwork/548.0.4 + authorization: + - Basic b.2423243.ZKygtTfU92o5WkRbE2cSrqo3fv0rZ3d0TxKp2spgJkVht9xwBRhzwibd9MI72UJ3CSVJO7zVeNk6Vuk5KnJDuTI7NGNWXefh3MeysBZPlFpZtiCUWBcD7R6RzAl0TlMoyfIg6f5ZAVw8ZqTk + x-nl-user-id: + - '2423243' + x-nl-protocol-version: + - '1' + accept-language: + - en-us + connection: + - keep-alive + accept: + - "*/*" + response: + status: + code: 200 + message: OK + headers: + content-type: + - application/json + x-nl-defer-device-window: + - '120' + x-nl-service-timestamp: + - '1445956472254' + content-length: + - '10890' + connection: + - keep-alive + body: + encoding: UTF-8 + string: '{"user_alert_dialog":{"2423243":{"$version":-31019,"$timestamp":1445954076171,"dialog_data":"","dialog_id":"confirm-pairing"}},"buckets":{"2423243":{"$version":12532,"$timestamp":1445956458542,"buckets":["user.2423243","user_alert_dialog.2423243","message_center.2423243","user_settings.2423243","buckets.2423243","device.fake3243E4FEE924","demand_response.fake3243E4FEE924","device_alert_dialog.fake3243E4FEE924","link.fake3243E4FEE924","message.fake3243E4FEE924","metadata.fake3243E4FEE924","schedule.fake3243E4FEE924","shared.fake3243E4FEE924","track.fake3243E4FEE924","tuneups.fake3243E4FEE924","energy_latest.fake3243E4FEE924","energy_weekly.fake3243E4FEE924","diamond_sensor_event.fake3243E4FEE924","diamond_sensor_config.fake3243E4FEE924","structure.0b47dcf0-7c13-11e5-8199-22000b420f99","where.0b47dcf0-7c13-11e5-8199-22000b420f99","utility.0b47dcf0-7c13-11e5-8199-22000b420f99","structure_history.0b47dcf0-7c13-11e5-8199-22000b420f99","trip.0b47dcf0-7c13-11e5-8199-22000b420f99","structure_metadata.0b47dcf0-7c13-11e5-8199-22000b420f99","safety.0b47dcf0-7c13-11e5-8199-22000b420f99","safety_summary.0b47dcf0-7c13-11e5-8199-22000b420f99","geofence_info.0b47dcf0-7c13-11e5-8199-22000b420f99"]}},"track":{"fake3243E4FEE924":{"$version":31457,"$timestamp":1445954075890,"online":false}},"message_center":{"2423243":{"$version":-1,"$timestamp":1325379661000,"messages":[]}},"safety":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":3651,"$timestamp":1445885694252,"audio_self_test_participants":[]}},"utility":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-1,"$timestamp":1}},"where":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":25319,"$timestamp":1445885694015,"wheres":[{"where_id":"00000000-0000-0000-0000-000100000001","name":"Basement"},{"where_id":"00000000-0000-0000-0000-00010000000d","name":"Bedroom"},{"where_id":"00000000-0000-0000-0000-000100000003","name":"Den"},{"where_id":"00000000-0000-0000-0000-000100000010","name":"Dining + Room"},{"where_id":"00000000-0000-0000-0000-000100000006","name":"Downstairs"},{"where_id":"00000000-0000-0000-0000-000100000000","name":"Entryway"},{"where_id":"00000000-0000-0000-0000-00010000000b","name":"Family + Room"},{"where_id":"00000000-0000-0000-0000-000100000002","name":"Hallway"},{"where_id":"00000000-0000-0000-0000-000100000008","name":"Kids + Room"},{"where_id":"00000000-0000-0000-0000-00010000000a","name":"Kitchen"},{"where_id":"00000000-0000-0000-0000-00010000000c","name":"Living + Room"},{"where_id":"00000000-0000-0000-0000-000100000005","name":"Master Bedroom"},{"where_id":"00000000-0000-0000-0000-00010000000e","name":"Office"},{"where_id":"00000000-0000-0000-0000-00010000000f","name":"Upstairs"}]}},"structure":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":15857,"$timestamp":1445956462746,"away_timestamp":1445954700,"away":false,"location":"Palm + Harbor, FL","name":"Chrome App Structure","postal_code":"34683","topaz_away":false,"creation_time":1445885694067,"country_code":"US","away_setter":0,"topaz_hush_key":"FmyQftpkdU9eH9St4mMWhQ==","user":"user.2423243","devices":["device.fake3243E4FEE924"],"swarm":["device.fake3243E4FEE924"],"fabric_ids":[],"clutches":[],"members":[{"user":"user.2423243","roles":["owner"]}]}},"message":{"fake3243E4FEE924":{"$version":-24419,"$timestamp":1445954076171,"1":{"cmd":"register"}}},"tuneups":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1}},"device":{"fake3243E4FEE924":{"$version":-27199,"$timestamp":1445956401831,"heatpump_setback_active":false,"emer_heat_enable":false,"touched_by":{},"local_ip":"192.168.2.4","switch_system_off":false,"away_temperature_high":24.444,"cooling_source":"electric","temperature_lock_high_temp":22.222,"y2_type":"unknown","leaf_threshold_cool":0,"heater_source":"gas","fan_cooling_state":false,"note_codes":[],"compressor_lockout_leaf":-17.8,"has_x3_heat":false,"target_humidity_enabled":false,"heat_x3_source":"electric","alt_heat_delivery":"forced-air","has_x2_heat":false,"fan_mode":"auto","rssi":66,"sunlight_correction_active":false,"emer_heat_delivery":"forced-air","heatpump_savings":"off","pin_y2_description":"none","humidity_control_lockout_end_time":0,"filter_reminder_level":0,"gear_opacity":0,"filter_reminder_enabled":true,"capability_level":4,"schedule_learning_reset":false,"has_x2_cool":false,"hvac_pins":"W1,C,Rh,G","ob_orientation":"O","cooling_delivery":"unknown","range_enable":false,"auto_away_enable":true,"dual_fuel_breakpoint_override":"none","lower_safety_temp_enabled":true,"has_fan":true,"dehumidifier_state":false,"emer_heat_source":"electric","nlclient_state":"","heatpump_ready":false,"cooling_x2_delivery":"unknown","available_locales":"en_US,fr_CA,es_US,en_GB","current_version":"4.1","has_fossil_fuel":true,"learning_state":"slow","pin_ob_description":"none","pin_rh_description":"power","has_alt_heat":false,"safety_temp_activating_hvac":false,"fan_duty_cycle":900,"pin_y1_description":"none","humidifier_state":false,"gear_threshold_high":0,"backplate_serial_number":"02BA01AB241200CW","has_x2_alt_heat":false,"heat_x3_delivery":"forced-air","leaf_threshold_heat":18.334,"is_on_stand":false,"has_emer_heat":false,"learning_mode":true,"leaf_learning":"ready","has_aux_heat":false,"filter_changed_set_date":1386452016,"aux_heat_source":"electric","backplate_bsl_info":"BSL","alt_heat_x2_source":"gas","sunlight_correction_ready":true,"humidifier_type":"unknown","pin_c_description":"power","humidity_control_lockout_start_time":0,"pin_w2aux_description":"none","fan_timer_timeout":0,"country_code":"US","sunlight_correction_enabled":true,"heat_x2_delivery":"forced-air","target_humidity":35,"gear_threshold_low":0,"lower_safety_temp":4.738,"cooling_x2_source":"electric","equipment_type":"electric","heat_pump_aux_threshold":10,"alt_heat_x2_delivery":"forced-air","heat_pump_comp_threshold":-31.5,"learning_days_completed_cool":0,"backplate_bsl_version":"2.1","current_schedule_mode":"HEAT","fan_duty_end_time":68400,"hvac_wires":"Heat,Fan,Common + Wire,Rh","leaf":true,"type":"TBD","pin_g_description":"fan","click_sound":"on","away_temperature_low_enabled":true,"aux_heat_delivery":"forced-air","filter_changed_date":1387065600,"hvac_safety_shutoff_active":false,"heat_pump_comp_threshold_enabled":false,"has_dehumidifier":false,"preconditioning_ready":true,"fan_cooling_enabled":true,"leaf_away_high":28.88,"fan_cooling_readiness":"not + ready","device_locale":"en_US","temperature_scale":"F","battery_level":3.963,"error_code":"","maint_band_upper":0.39,"preconditioning_active":false,"fan_control_state":false,"away_temperature_high_enabled":false,"dehumidifier_fan_activation":false,"learning_days_completed_heat":598,"humidifier_fan_activation":false,"pin_star_description":"none","upper_safety_temp_enabled":false,"dual_fuel_selected":false,"preconditioning_enabled":false,"current_humidity":50,"dual_fuel_breakpoint":-1,"postal_code":"94602","backplate_mono_version":"4.0.20","alt_heat_source":"gas","aux_lockout_leaf":10,"has_heat_pump":false,"heater_delivery":"forced-air","away_temperature_low":12.778,"auto_away_reset":false,"radiant_control_enabled":false,"has_air_filter":true,"temperature_lock":false,"dehumidifier_type":"unknown","time_to_target_training":"training","upper_safety_temp":35,"humidity_control_lockout_enabled":false,"fan_timer_duration":900,"target_time_confidence":0,"pin_w1_description":"heat","temperature_lock_low_temp":20,"where_id":"00000000-0000-0000-0000-000100000001","forced_air":true,"temperature_lock_pin_hash":"","auto_dehum_enabled":false,"leaf_type":1,"backplate_mono_info":"TFE + (BP_D2) 4.0.20 (root@bamboo) 2014-02-03 10:06:33","has_dual_fuel":false,"star_type":"unknown","learning_time":1703,"maint_band_lower":0.39,"creation_time":1420654958512,"has_humidifier":false,"learning_days_completed_range":0,"dehumidifier_orientation_selected":"unknown","leaf_schedule_delta":1.11,"logging_priority":"informational","user_brightness":"medium","leaf_away_low":16.835,"pin_rc_description":"none","auto_dehum_state":false,"serial_number":"80C4887E69DF00D9","heat_x2_source":"electric","mac_address":"18b430093686","fan_duty_start_time":50400,"time_to_target":0,"backplate_model":"Backplate-2.2","heat_link_connection":0,"model_version":"Display-2.1","heat_pump_aux_threshold_enabled":true,"ob_persistence":true,"schedules":[]}},"trip":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":32201,"$timestamp":1445885694252,"trips":[]}},"demand_response":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1}},"user":{"2423243":{"$version":9049,"$timestamp":1445885721137,"email":"test@yahoo.com","name":"test@yahoo.com","structures":["structure.0b47dcf0-7c13-11e5-8199-22000b420f99"],"structure_memberships":[{"structure":"structure.0b47dcf0-7c13-11e5-8199-22000b420f99","roles":["owner"]}]}},"link":{"fake3243E4FEE924":{"$version":10338,"$timestamp":1445954076171,"structure":"structure.0b47dcf0-7c13-11e5-8199-22000b420f99"}},"device_alert_dialog":{"fake3243E4FEE924":{"$version":-9248,"$timestamp":1445954076171,"dialog_data":"","dialog_id":"confirm-pairing"}},"geofence_info":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-31412,"$timestamp":1445885694252,"device_events":[],"fences":[]}},"metadata":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1356998400000,"last_ip":"127.0.0.1","last_connection":1356998400000}},"user_settings":{"2423243":{"$version":31691,"$timestamp":1445354998080,"email_verified":true,"tos_accepted_version":1434564000000,"receive_marketing_emails":true,"receive_nest_emails":true,"receive_support_emails":true,"max_structures":2,"max_thermostats":40,"max_thermostats_per_structure":20,"max_smoke_detectors_per_structure":18,"max_smoke_detectors":36,"max_wwn_devices_per_structure":10,"max_wwn_devices":20,"tos_minimum_version":1434564000000,"tos_current_version":1434564000000,"lang":"en_US"}},"schedule":{"fake3243E4FEE924":{"$version":21638,"$timestamp":1445954075940}},"structure_metadata":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-32678,"$timestamp":1445951380776,"entitlements_api_path":"/api/0.1/structure/0b47dcf0-7c13-11e5-8199-22000b420f99/entitlements?v=8a957eeb-c93a-4e47-aea4-fb31cfc65691"}},"shared":{"fake3243E4FEE924":{"$version":-22003,"$timestamp":1445956471869,"auto_away_learning":"ready","auto_away":0,"hvac_alt_heat_state":false,"compressor_lockout_enabled":false,"hvac_heat_x3_state":false,"target_temperature_type":"heat","hvac_heater_state":false,"can_heat":true,"hvac_emer_heat_state":false,"compressor_lockout_timeout":0,"hvac_cool_x2_state":false,"target_temperature_high":23.33333,"hvac_aux_heater_state":false,"hvac_heat_x2_state":false,"target_temperature_low":23.33333,"hvac_ac_state":false,"target_temperature":22.85,"hvac_fan_state":false,"target_change_pending":true,"name":"E924","current_temperature":21,"hvac_alt_heat_x2_state":false,"can_cool":true}},"safety_summary":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-21456,"$timestamp":1445885694252}}}' + http_version: '1.1' + recorded_at: Tue, 27 Oct 2015 14:34:32 GMT +recorded_with: VCR 2.9.3 diff --git a/fixtures/vcr_cassettes/connect_to_api.yml b/fixtures/vcr_cassettes/connect_to_api.yml new file mode 100644 index 0000000..14c80e1 --- /dev/null +++ b/fixtures/vcr_cassettes/connect_to_api.yml @@ -0,0 +1,87 @@ +--- +http_interactions: +- request: + method: post + uri: https://home.nest.com/user/login + body: + encoding: UTF-8 + string: username=test%40yahoo.com&password=sekret + headers: + user-agent: + - Nest/1.1.0.10 CFNetwork/548.0.4 + response: + status: + code: 200 + message: OK + headers: + content-type: + - application/json + date: + - Tue, 27 Oct 2015 14:34:16 GMT + server: + - nginx/1.4.4 + set-cookie: + - cztoken=b.2423243.ZKygtTfU92o5WkRbE2cSrqo3fv0rZ3d0TxKp2spgJkVht9xwBRhzwibd9MI72UJ3CSVJO7zVeNk6Vuk5KnJDuTI7NGNWXefh3MeysBZPlFpZtiCUWBcD7R6RzAl0TlMoyfIg6f5ZAVw8ZqTk; + Expires=Thu, 26 Nov 2015 14:34:15 GMT; Secure + content-length: + - '2197' + connection: + - Close + body: + encoding: UTF-8 + string: '{"user":"user.2423243","access_token":"b.2423243.ZKygtTfU92o5WkRbE2cSrqo3fv0rZ3d0TxKp2spgJkVht9xwBRhzwibd9MI72UJ3CSVJO7zVeNk6Vuk5KnJDuTI7NGNWXefh3MeysBZPlFpZtiCUWBcD7R6RzAl0TlMoyfIg6f5ZAVw8ZqTk","expires_in":"Thu, + 26-Nov-2015 14:34:15 GMT","language":"en_US","email":"test@yahoo.com","is_superuser":false,"is_staff":false,"urls":{"transport_url":"https://czfe09-front01-iad01.transport.home.nest.com","czfe_url":"https://czfe09-front01-iad01.transport.home.nest.com","direct_transport_url":"https://transport01-rts09-iad01.transport.home.nest.com:443","rubyapi_url":"https://home.nest.com/","weather_url":"https://apps-weather.nest.com/weather/v1?query=","log_upload_url":"https://log-rts09-iad01.home.nest.com/upload/user","support_url":"https://nest.secure.force.com/support/webapp?"},"limits":{"thermostats_per_structure":20,"structures":2,"thermostats":40,"smoke_detectors":36,"smoke_detectors_per_structure":18},"weave":{"service_config":"1QAADwABADYBFTABCEdYfNbKQ+Z8JAIENwMnEwEAAADuMLQYGCYERUgWGiYFRQb7STcGJxMBAAAA7jC0GBgkBwImCCUAWiMwCjkEFJtArVoBj0T+fpKZeV1TBT0osdlSUx1FRK1ZTcslNfDQSMUwiG3iH5tQjeGhrxbfr0kphGthRBA1gykBKQIYNYIpASQCYBg1gTACCEM09xLfX5HPGDWAMAIIQzT3Et9fkc8YNQwwAR0AlvB51cbUag/T//0P7EqwJNQATpT0hWNT7odJgzACHQCPTm4jL9hwiKnIKvpqXtz6LnCd0ifQrU9apo0jGBgVMAEIXYkodEr1AdAkAgQ3AywBBzI0MjMyNDMYJgSUcSIeJgWUGkgxNwYsAQcyNDIzMjQzGCQHAiYIJQBaIzAKOQRiIZeDbWdzrS9L/8BCP231hinNbMIB5VWsBP8zjc4U9PxFkrC2Nom9hfEnUYIx/SjsaJJp5yPuODWDKQEYNYIpASQCBRg1hCkBNgIEAgQBGBg1gTACCE5l7/ee7NldGDWAMAIITmXv957s2V0YNQwwARwOJoELt7iynQNB/aGh9JoQL/gzTFzUI7Am0xYeMAIdAIt0EwEUhHkegDzo172nvW2fQy5qMtUUA3RK5TAYGBg1AicBAQAAAAIwtBg2AhUsARJmcm9udGRvb3IubmVzdC5jb20lAlcrGBgYGA==","pairing_token":"wu.LJaYgHBlCpC3U9Ny+Mk3GQ0dTTmTGqmTE8Wmrcdo76wCcGtNBHptKHdfVJbcjh2FsaQ/RORCKY7PhB9Mz+dc2HpOYNc=","access_token":"lQkANQEwAQhdiSh0SvUB0CQCBDcDLAEHMjQyMzI0MxgmBJRxIh4mBZQaSDE3BiwBBzI0MjMyNDMYJAcCJgglAFojMAo5BGIhl4NtZ3OtL0v/wEI/bfWGKc1swgHlVawE/zONzhT0/EWSsLY2ib2F8SdRgjH9KOxokmnnI+44NYMpARg1gikBJAIFGDWEKQE2AgQCBAEYGDWBMAIITmXv957s2V0YNYAwAghOZe/3nuzZXRg1DDABHA4mgQu3uLKdA0H9oaH0mhAv+DNMXNQjsCbTFh4wAh0Ai3QTARSEeR6APOjXvae9bZ9DLmoy1RQDdErlMBgYNQImASUAWiMwAhxnzkTnVXVu258FYcj1SssE/s4zKq9t+kBSvHPlGBg="},"userid":"2423243"}' + http_version: '1.1' + recorded_at: Tue, 27 Oct 2015 14:34:16 GMT +- request: + method: get + uri: https://on6%DFn7d%AC%A0%B57%D4%F7j9ZD%5B%13g%12%AE%AA7~%FD+gwtO%12%A9%DA%CA%60&Ea%B7%DCp%05%18s%C2&%DD%F4%C2;%D9Bw%09%25I;%BC%D5x%D9:V%E99*rC%B92;4cV%5D%E7%E1%DC%C7%B2%B0%16O%94ZY%B6%20%94X%17%03%ED%1E%91%CC%09tNS(%C9%F2%20%E9%FEY%01%5C%3Cf%A4%E4@czfe09-front01-iad01.transport.home.nest.com/v2/mobile/user.2423243 + body: + encoding: US-ASCII + string: '' + headers: + host: + - czfe09-front01-iad01.transport.home.nest.com + user-agent: + - Nest/1.1.0.10 CFNetwork/548.0.4 + authorization: + - Basic b.2423243.ZKygtTfU92o5WkRbE2cSrqo3fv0rZ3d0TxKp2spgJkVht9xwBRhzwibd9MI72UJ3CSVJO7zVeNk6Vuk5KnJDuTI7NGNWXefh3MeysBZPlFpZtiCUWBcD7R6RzAl0TlMoyfIg6f5ZAVw8ZqTk + x-nl-user-id: + - '2423243' + x-nl-protocol-version: + - '1' + accept-language: + - en-us + connection: + - keep-alive + accept: + - "*/*" + response: + status: + code: 200 + message: OK + headers: + content-type: + - application/json + x-nl-defer-device-window: + - '120' + x-nl-service-timestamp: + - '1445956457144' + content-length: + - '10890' + connection: + - keep-alive + body: + encoding: UTF-8 + string: '{"user_alert_dialog":{"2423243":{"$version":-31019,"$timestamp":1445954076171,"dialog_data":"","dialog_id":"confirm-pairing"}},"buckets":{"2423243":{"$version":-8139,"$timestamp":1445956456225,"buckets":["user.2423243","user_alert_dialog.2423243","message_center.2423243","user_settings.2423243","buckets.2423243","device.fake3243E4FEE924","demand_response.fake3243E4FEE924","device_alert_dialog.fake3243E4FEE924","link.fake3243E4FEE924","message.fake3243E4FEE924","metadata.fake3243E4FEE924","schedule.fake3243E4FEE924","shared.fake3243E4FEE924","track.fake3243E4FEE924","tuneups.fake3243E4FEE924","energy_latest.fake3243E4FEE924","energy_weekly.fake3243E4FEE924","diamond_sensor_event.fake3243E4FEE924","diamond_sensor_config.fake3243E4FEE924","structure.0b47dcf0-7c13-11e5-8199-22000b420f99","where.0b47dcf0-7c13-11e5-8199-22000b420f99","utility.0b47dcf0-7c13-11e5-8199-22000b420f99","structure_history.0b47dcf0-7c13-11e5-8199-22000b420f99","trip.0b47dcf0-7c13-11e5-8199-22000b420f99","structure_metadata.0b47dcf0-7c13-11e5-8199-22000b420f99","safety.0b47dcf0-7c13-11e5-8199-22000b420f99","safety_summary.0b47dcf0-7c13-11e5-8199-22000b420f99","geofence_info.0b47dcf0-7c13-11e5-8199-22000b420f99"]}},"track":{"fake3243E4FEE924":{"$version":31457,"$timestamp":1445954075890,"online":false}},"message_center":{"2423243":{"$version":-1,"$timestamp":1325379661000,"messages":[]}},"safety":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":3651,"$timestamp":1445885694252,"audio_self_test_participants":[]}},"utility":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-1,"$timestamp":1}},"where":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":25319,"$timestamp":1445885694015,"wheres":[{"where_id":"00000000-0000-0000-0000-000100000001","name":"Basement"},{"where_id":"00000000-0000-0000-0000-00010000000d","name":"Bedroom"},{"where_id":"00000000-0000-0000-0000-000100000003","name":"Den"},{"where_id":"00000000-0000-0000-0000-000100000010","name":"Dining + Room"},{"where_id":"00000000-0000-0000-0000-000100000006","name":"Downstairs"},{"where_id":"00000000-0000-0000-0000-000100000000","name":"Entryway"},{"where_id":"00000000-0000-0000-0000-00010000000b","name":"Family + Room"},{"where_id":"00000000-0000-0000-0000-000100000002","name":"Hallway"},{"where_id":"00000000-0000-0000-0000-000100000008","name":"Kids + Room"},{"where_id":"00000000-0000-0000-0000-00010000000a","name":"Kitchen"},{"where_id":"00000000-0000-0000-0000-00010000000c","name":"Living + Room"},{"where_id":"00000000-0000-0000-0000-000100000005","name":"Master Bedroom"},{"where_id":"00000000-0000-0000-0000-00010000000e","name":"Office"},{"where_id":"00000000-0000-0000-0000-00010000000f","name":"Upstairs"}]}},"structure":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-9689,"$timestamp":1445956385810,"away_timestamp":1445954700,"away":false,"location":"Palm + Harbor, FL","name":"Chrome App Structure","postal_code":"34683","topaz_away":false,"creation_time":1445885694067,"country_code":"US","away_setter":0,"topaz_hush_key":"FmyQftpkdU9eH9St4mMWhQ==","user":"user.2423243","devices":["device.fake3243E4FEE924"],"swarm":["device.fake3243E4FEE924"],"fabric_ids":[],"clutches":[],"members":[{"user":"user.2423243","roles":["owner"]}]}},"message":{"fake3243E4FEE924":{"$version":-24419,"$timestamp":1445954076171,"1":{"cmd":"register"}}},"tuneups":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1}},"device":{"fake3243E4FEE924":{"$version":-27199,"$timestamp":1445956401831,"heatpump_setback_active":false,"emer_heat_enable":false,"touched_by":{},"local_ip":"192.168.2.4","switch_system_off":false,"away_temperature_high":24.444,"cooling_source":"electric","temperature_lock_high_temp":22.222,"y2_type":"unknown","leaf_threshold_cool":0,"heater_source":"gas","fan_cooling_state":false,"note_codes":[],"compressor_lockout_leaf":-17.8,"has_x3_heat":false,"target_humidity_enabled":false,"heat_x3_source":"electric","alt_heat_delivery":"forced-air","has_x2_heat":false,"fan_mode":"auto","rssi":66,"sunlight_correction_active":false,"emer_heat_delivery":"forced-air","heatpump_savings":"off","pin_y2_description":"none","humidity_control_lockout_end_time":0,"filter_reminder_level":0,"gear_opacity":0,"filter_reminder_enabled":true,"capability_level":4,"schedule_learning_reset":false,"has_x2_cool":false,"hvac_pins":"W1,C,Rh,G","ob_orientation":"O","cooling_delivery":"unknown","range_enable":false,"auto_away_enable":true,"dual_fuel_breakpoint_override":"none","lower_safety_temp_enabled":true,"has_fan":true,"dehumidifier_state":false,"emer_heat_source":"electric","nlclient_state":"","heatpump_ready":false,"cooling_x2_delivery":"unknown","available_locales":"en_US,fr_CA,es_US,en_GB","current_version":"4.1","has_fossil_fuel":true,"learning_state":"slow","pin_ob_description":"none","pin_rh_description":"power","has_alt_heat":false,"safety_temp_activating_hvac":false,"fan_duty_cycle":900,"pin_y1_description":"none","humidifier_state":false,"gear_threshold_high":0,"backplate_serial_number":"02BA01AB241200CW","has_x2_alt_heat":false,"heat_x3_delivery":"forced-air","leaf_threshold_heat":18.334,"is_on_stand":false,"has_emer_heat":false,"learning_mode":true,"leaf_learning":"ready","has_aux_heat":false,"filter_changed_set_date":1386452016,"aux_heat_source":"electric","backplate_bsl_info":"BSL","alt_heat_x2_source":"gas","sunlight_correction_ready":true,"humidifier_type":"unknown","pin_c_description":"power","humidity_control_lockout_start_time":0,"pin_w2aux_description":"none","fan_timer_timeout":0,"country_code":"US","sunlight_correction_enabled":true,"heat_x2_delivery":"forced-air","target_humidity":35,"gear_threshold_low":0,"lower_safety_temp":4.738,"cooling_x2_source":"electric","equipment_type":"electric","heat_pump_aux_threshold":10,"alt_heat_x2_delivery":"forced-air","heat_pump_comp_threshold":-31.5,"learning_days_completed_cool":0,"backplate_bsl_version":"2.1","current_schedule_mode":"HEAT","fan_duty_end_time":68400,"hvac_wires":"Heat,Fan,Common + Wire,Rh","leaf":true,"type":"TBD","pin_g_description":"fan","click_sound":"on","away_temperature_low_enabled":true,"aux_heat_delivery":"forced-air","filter_changed_date":1387065600,"hvac_safety_shutoff_active":false,"heat_pump_comp_threshold_enabled":false,"has_dehumidifier":false,"preconditioning_ready":true,"fan_cooling_enabled":true,"leaf_away_high":28.88,"fan_cooling_readiness":"not + ready","device_locale":"en_US","temperature_scale":"F","battery_level":3.963,"error_code":"","maint_band_upper":0.39,"preconditioning_active":false,"fan_control_state":false,"away_temperature_high_enabled":false,"dehumidifier_fan_activation":false,"learning_days_completed_heat":598,"humidifier_fan_activation":false,"pin_star_description":"none","upper_safety_temp_enabled":false,"dual_fuel_selected":false,"preconditioning_enabled":false,"current_humidity":50,"dual_fuel_breakpoint":-1,"postal_code":"94602","backplate_mono_version":"4.0.20","alt_heat_source":"gas","aux_lockout_leaf":10,"has_heat_pump":false,"heater_delivery":"forced-air","away_temperature_low":12.778,"auto_away_reset":false,"radiant_control_enabled":false,"has_air_filter":true,"temperature_lock":false,"dehumidifier_type":"unknown","time_to_target_training":"training","upper_safety_temp":35,"humidity_control_lockout_enabled":false,"fan_timer_duration":900,"target_time_confidence":0,"pin_w1_description":"heat","temperature_lock_low_temp":20,"where_id":"00000000-0000-0000-0000-000100000001","forced_air":true,"temperature_lock_pin_hash":"","auto_dehum_enabled":false,"leaf_type":1,"backplate_mono_info":"TFE + (BP_D2) 4.0.20 (root@bamboo) 2014-02-03 10:06:33","has_dual_fuel":false,"star_type":"unknown","learning_time":1703,"maint_band_lower":0.39,"creation_time":1420654958512,"has_humidifier":false,"learning_days_completed_range":0,"dehumidifier_orientation_selected":"unknown","leaf_schedule_delta":1.11,"logging_priority":"informational","user_brightness":"medium","leaf_away_low":16.835,"pin_rc_description":"none","auto_dehum_state":false,"serial_number":"80C4887E69DF00D9","heat_x2_source":"electric","mac_address":"18b430093686","fan_duty_start_time":50400,"time_to_target":0,"backplate_model":"Backplate-2.2","heat_link_connection":0,"model_version":"Display-2.1","heat_pump_aux_threshold_enabled":true,"ob_persistence":true,"schedules":[]}},"trip":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":32201,"$timestamp":1445885694252,"trips":[]}},"demand_response":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1}},"user":{"2423243":{"$version":9049,"$timestamp":1445885721137,"email":"test@yahoo.com","name":"test@yahoo.com","structures":["structure.0b47dcf0-7c13-11e5-8199-22000b420f99"],"structure_memberships":[{"structure":"structure.0b47dcf0-7c13-11e5-8199-22000b420f99","roles":["owner"]}]}},"link":{"fake3243E4FEE924":{"$version":10338,"$timestamp":1445954076171,"structure":"structure.0b47dcf0-7c13-11e5-8199-22000b420f99"}},"device_alert_dialog":{"fake3243E4FEE924":{"$version":-9248,"$timestamp":1445954076171,"dialog_data":"","dialog_id":"confirm-pairing"}},"geofence_info":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-31412,"$timestamp":1445885694252,"device_events":[],"fences":[]}},"metadata":{"fake3243E4FEE924":{"$version":-1,"$timestamp":1356998400000,"last_ip":"127.0.0.1","last_connection":1356998400000}},"user_settings":{"2423243":{"$version":31691,"$timestamp":1445354998080,"email_verified":true,"tos_accepted_version":1434564000000,"receive_marketing_emails":true,"receive_nest_emails":true,"receive_support_emails":true,"max_structures":2,"max_thermostats":40,"max_thermostats_per_structure":20,"max_smoke_detectors_per_structure":18,"max_smoke_detectors":36,"max_wwn_devices_per_structure":10,"max_wwn_devices":20,"tos_minimum_version":1434564000000,"tos_current_version":1434564000000,"lang":"en_US"}},"schedule":{"fake3243E4FEE924":{"$version":21638,"$timestamp":1445954075940}},"structure_metadata":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-32678,"$timestamp":1445951380776,"entitlements_api_path":"/api/0.1/structure/0b47dcf0-7c13-11e5-8199-22000b420f99/entitlements?v=8a957eeb-c93a-4e47-aea4-fb31cfc65691"}},"shared":{"fake3243E4FEE924":{"$version":-13990,"$timestamp":1445956397555,"auto_away_learning":"ready","auto_away":0,"hvac_alt_heat_state":false,"compressor_lockout_enabled":false,"hvac_heat_x3_state":false,"target_temperature_type":"heat","hvac_heater_state":false,"can_heat":true,"hvac_emer_heat_state":false,"compressor_lockout_timeout":0,"hvac_cool_x2_state":false,"target_temperature_high":23.33333,"hvac_aux_heater_state":false,"hvac_heat_x2_state":false,"target_temperature_low":23.33333,"hvac_ac_state":false,"target_temperature":22.85,"hvac_fan_state":false,"target_change_pending":true,"name":"E924","current_temperature":21,"hvac_alt_heat_x2_state":false,"can_cool":true}},"safety_summary":{"0b47dcf0-7c13-11e5-8199-22000b420f99":{"$version":-21456,"$timestamp":1445885694252}}}' + http_version: '1.1' + recorded_at: Tue, 27 Oct 2015 14:34:17 GMT +recorded_with: VCR 2.9.3 diff --git a/lib/nest_thermostat/nest.rb b/lib/nest_thermostat/nest.rb index 5c931cc..c4c63c7 100644 --- a/lib/nest_thermostat/nest.rb +++ b/lib/nest_thermostat/nest.rb @@ -1,23 +1,23 @@ -require 'rubygems' -require 'httparty' -require 'json' -require 'uri' +require "rubygems" +require "httparty" +require "json" +require "uri" module NestThermostat class Nest attr_accessor :login_url, :user_agent, :auth, :login, :token, :user_id, - :transport_url, :transport_host, :structure_id, :device_id, :headers + :transport_url, :transport_host, :structure_id, :device_id, :headers attr_reader :temperature_scale def initialize(config = {}) - raise 'Please specify your nest email' unless config[:email] - raise 'Please specify your nest password' unless config[:password] + raise "Please specify your nest email" unless config[:email] + raise "Please specify your nest password" unless config[:password] # User specified information self.temperature_scale = config[:temperature_scale] || config[:temp_scale] || :fahrenheit - @login_url = config[:login_url] || 'https://home.nest.com/user/login' - @user_agent = config[:user_agent] ||'Nest/1.1.0.10 CFNetwork/548.0.4' + @login_url = config[:login_url] || "https://home.nest.com/user/login" + @user_agent = config[:user_agent] || "Nest/1.1.0.10 CFNetwork/548.0.4" # Login and get token, user_id and URLs perform_login(config[:email], config[:password]) @@ -27,14 +27,14 @@ def initialize(config = {}) @transport_url = @auth["urls"]["transport_url"] @transport_host = URI.parse(@transport_url).host @headers = { - 'Host' => self.transport_host, - 'User-Agent' => self.user_agent, - 'Authorization' => 'Basic ' + self.token, - 'X-nl-user-id' => self.user_id, - 'X-nl-protocol-version' => '1', - 'Accept-Language' => 'en-us', - 'Connection' => 'keep-alive', - 'Accept' => '*/*' + "Host" => self.transport_host, + "User-Agent" => self.user_agent, + "Authorization" => "Basic " + self.token, + "X-nl-user-id" => self.user_id, + "X-nl-protocol-version" => "1", + "Accept-Language" => "en-us", + "Connection" => "keep-alive", + "Accept" => "*/*" } # Set device and structure id @@ -42,96 +42,92 @@ def initialize(config = {}) end def status - request = HTTParty.get("#{self.transport_url}/v2/mobile/user.#{self.user_id}", headers: self.headers) rescue nil - result = JSON.parse(request.body) rescue nil + request = HTTParty.get("#{transport_url}/v2/mobile/user.#{user_id}", headers: headers) + result = JSON.parse(request.body) - self.structure_id = result['user'][user_id]['structures'][0].split('.')[1] - self.device_id = result['structure'][structure_id]['devices'][0].split('.')[1] + structures = result["user"][user_id]["structures"] + if structures.any? + self.structure_id = structures.first.split(".")[1] + end + + if self.structure_id + devices = result["structure"][structure_id]["devices"] + if devices.any? + self.device_id = devices.first.split(".")[1] + end + end result end def public_ip - status["track"][self.device_id]["last_ip"].strip + last_ip = track["last_ip"] + + # TODO: Should return something better than empty string here? + last_ip ? last_ip.strip : "" end def leaf? - status["device"][self.device_id]["leaf"] + device["leaf"] end def humidity - status["device"][self.device_id]["current_humidity"] + device["current_humidity"] end def current_temperature - convert_temp_for_get(status["shared"][self.device_id]["current_temperature"]) + convert_temp_for_get(shared["current_temperature"]) end alias_method :current_temp, :current_temperature def temperature - convert_temp_for_get(status["shared"][self.device_id]["target_temperature"]) + convert_temp_for_get(shared["target_temperature"]) end alias_method :temp, :temperature def temperature_low - convert_temp_for_get(status["shared"][self.device_id]["target_temperature_low"]) + convert_temp_for_get(shared["target_temperature_low"]) end alias_method :temp_low, :temperature_low def temperature_high - convert_temp_for_get(status["shared"][self.device_id]["target_temperature_high"]) + convert_temp_for_get(shared["target_temperature_high"]) end alias_method :temp_high, :temperature_high def temperature=(degrees) degrees = convert_temp_for_set(degrees) - request = HTTParty.post( - "#{self.transport_url}/v2/put/shared.#{self.device_id}", - body: %Q({"target_change_pending":true,"target_temperature":#{degrees}}), - headers: self.headers - ) rescue nil + post_to_shared_api(target_change_pending: true, target_temperature: degrees); end alias_method :temp=, :temperature= def temperature_low=(degrees) degrees = convert_temp_for_set(degrees) - request = HTTParty.post( - "#{self.transport_url}/v2/put/shared.#{self.device_id}", - body: %Q({"target_change_pending":true,"target_temperature_low":#{degrees}}), - headers: self.headers - ) rescue nil + post_to_shared_api(target_change_pending: true, target_temperature_low: degrees); end alias_method :temp_low=, :temperature_low= def temperature_high=(degrees) degrees = convert_temp_for_set(degrees) - request = HTTParty.post( - "#{self.transport_url}/v2/put/shared.#{self.device_id}", - body: %Q({"target_change_pending":true,"target_temperature_high":#{degrees}}), - headers: self.headers - ) rescue nil + post_to_shared_api(target_change_pending: true, target_temperature_high: degrees) end alias_method :temp_high=, :temperature_high= def target_temperature_at - epoch = status["device"][self.device_id]["time_to_target"] + epoch = device["time_to_target"] epoch != 0 ? Time.at(epoch) : false end alias_method :target_temp_at, :target_temperature_at def away? - status["structure"][structure_id]["away"] + structure["away"] end def away=(state) - request = HTTParty.post( - "#{self.transport_url}/v2/put/structure.#{self.structure_id}", - body: %Q({"away_timestamp":#{Time.now.to_i},"away":#{!!state},"away_setter":0}), - headers: self.headers - ) rescue nil + post_to_structure_api(away_timestamp: Time.now.to_i, away: !!state, away_setter: 0) end def temperature_scale=(scale) @@ -144,24 +140,19 @@ def temperature_scale=(scale) alias_method :temp_scale=, :temperature_scale= def fan_mode - status["device"][device_id]["fan_mode"] + device["fan_mode"] end def fan_mode=(state) - HTTParty.post( - "#{self.transport_url}/v2/put/device.#{self.device_id}", - body: %Q({"fan_mode":"#{state}"}), - headers: self.headers - ) rescue nil + post_to_device_api(fan_mode: state) end def method_missing(name, *args, &block) - if %i[away leaf].include?(name) - warn "`#{name}' has been replaced with `#{name}?'. Support for " + - "`#{name}' without the '?' will be dropped in future versions." - return self.send("#{name}?", *args) - end - + if %i[away leaf].include?(name) + warn "`#{name}' has been replaced with `#{name}?'. Support for " + + "`#{name}' without the '?' will be dropped in future versions." + return send("#{name}?", *args) + end super end @@ -169,13 +160,13 @@ def method_missing(name, *args, &block) def perform_login(email, password) login_request = HTTParty.post( - self.login_url, - body: { username: email, password: password }, - headers: { 'User-Agent' => self.user_agent } - ) + login_url, + body: { username: email, password: password }, + headers: { "User-Agent" => user_agent } + ) - @auth ||= JSON.parse(login_request.body) rescue nil - raise 'Invalid login credentials' if auth.has_key?('error') && @auth['error'] == "access_denied" + @auth ||= JSON.parse(login_request.body) + raise "Invalid login credentials" if auth.has_key?("error") && @auth["error"] == "access_denied" end def convert_temp_for_get(degrees) @@ -190,7 +181,7 @@ def convert_temp_for_set(degrees) case @temperature_scale when :fahrenheit then f2c(degrees).round(5) when :kelvin then k2c(degrees).round(5) - when :celsius then degrees + when :celsius then degrees.to_f end end @@ -209,5 +200,44 @@ def c2f(degrees) def f2c(degrees) (degrees.to_f - 32) * 5 / 9 end + + def post_to_shared_api(body) + HTTParty.post("#{transport_url}/v2/put/shared.#{device_id}", + body: body.to_json, + headers: headers) + end + + def post_to_device_api(body) + HTTParty.post("#{transport_url}/v2/put/device.#{device_id}", + body: body.to_json, + headers: headers) + end + + def post_to_structure_api(body) + HTTParty.post("#{transport_url}/v2/put/structure.#{structure_id}", + body: body.to_json, + headers: headers) + end + + def status_data(key, id) + # Try to get the status data based on device_id, otherwise return empty status data + status.fetch(key, {}).fetch(id, {}) + end + + def structure + status_data("structure", structure_id) + end + + def shared + status_data("shared", device_id) + end + + def device + status_data("device", device_id) + end + + def track + status_data("track", device_id) + end end end diff --git a/nest_thermostat.gemspec b/nest_thermostat.gemspec index 072446a..b7d3805 100644 --- a/nest_thermostat.gemspec +++ b/nest_thermostat.gemspec @@ -17,7 +17,10 @@ Gem::Specification.new do |gem| gem.add_dependency "httparty", "~> 0.8.3" gem.add_development_dependency "rspec", "~> 3.1" + gem.add_development_dependency "fakeweb", "~> 1.3" gem.add_development_dependency "awesome_print" gem.add_development_dependency "dotenv" gem.add_development_dependency "pry" + gem.add_development_dependency "vcr" + gem.add_development_dependency "timecop" end diff --git a/spec/nest_thermostat_spec.rb b/spec/nest_thermostat_spec.rb index 07b0213..3563552 100644 --- a/spec/nest_thermostat_spec.rb +++ b/spec/nest_thermostat_spec.rb @@ -1,9 +1,14 @@ -require 'spec_helper' +require "spec_helper" module NestThermostat - describe Nest do + # Run all the requests through VCR, + # but don"t match on the host or URI as they vary + # match on all the other parts of the request to find the unique request in the cassette + describe Nest, vcr: { match_requests_on: [:method, :path, :query, :body] } do before(:all) do - @nest = Nest.new(email: ENV['NEST_EMAIL'], password: ENV['NEST_PASS'], temperature_scale: :fahrenheit) + VCR.use_cassette("connect to api") do + @nest = Nest.new(email: "test@yahoo.com", password: "sekret", temperature_scale: :fahrenheit) + end end it "logs in to home.nest.com" do @@ -12,25 +17,29 @@ module NestThermostat it "detects invalid logins" do expect { - Nest.new({email: 'invalid@example.com', password: 'asdf'}) + Nest.new({ email: "invalid@example.com", password: "asdf" }) }.to raise_error end it "does not remember the login email or password" do - nest = Nest.new(email: ENV['NEST_EMAIL'], password: ENV['NEST_PASS'], temperature_scale: :fahrenheit) - - expect(nest).not_to respond_to(:email) - expect(nest).not_to respond_to(:password) + @nest = Nest.new(email: "test@yahoo.com", password: "sekret", temperature_scale: :fahrenheit) + expect(@nest).not_to respond_to(:email) + expect(@nest).not_to respond_to(:password) end it "gets the status" do - expect(@nest.status['device'].first[1]['mac_address']).to match(/(\d|[a-f]|[A-F])+/) + expect(@nest.status["device"].first[1]["mac_address"]).to match(/(\d|[a-f]|[A-F])+/) end it "gets the pubic ip address" do expect(@nest.public_ip).to match(/^(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})?$/) end + it "doesn't fail if there are no thermostats" do + # NOTE: To generate the VCR cassette for this test, we removed all of the devices and captured the API results + expect { @nest.current_temperature }.not_to raise_error + end + it "gets the leaf status" do expect(@nest.leaf?).to_not be_nil end @@ -40,10 +49,13 @@ module NestThermostat end it "sets away status" do + # Freeze time so we always use the same time (makes VCR happy) + Timecop.freeze(Time.local(2015, 10, 27, 10, 5, 0)) @nest.away = true expect(@nest.away?).to be(true) @nest.away = false expect(@nest.away?).to be(false) + Timecop.return end it "gets the current temperature" do @@ -71,38 +83,38 @@ module NestThermostat end it "sets the temperature" do - @nest.temp = '74' + @nest.temp = 74 expect(@nest.temp.round).to eq(74) - @nest.temperature = '73' + @nest.temperature = 73 expect(@nest.temperature).to eq(73) end it "sets the low temperature" do - @nest.temp_low = '73' + @nest.temp_low = 73 expect(@nest.temp_low.round).to eq(73) - @nest.temperature_low = '74' + @nest.temperature_low = 74 expect(@nest.temperature_low.round).to eq(74) end it "sets the high temperature" do - @nest.temp_high = '73' + @nest.temp_high = 73 expect(@nest.temp_high.round).to eq(73) - @nest.temperature_high = '74' + @nest.temperature_high = 74 expect(@nest.temperature_high.round).to eq(74) end it "sets the temperature in celsius" do @nest.temperature_scale = :celsius - @nest.temperature = '22' + @nest.temperature = 22 expect(@nest.temperature).to eq(22.0) end it "sets the temperature in kelvin" do @nest.temp_scale = :kelvin - @nest.temperature = '296' + @nest.temperature = 296 expect(@nest.temperature).to eq(296.0) end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index b0397ef..9d0885d 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,10 +1,22 @@ -require 'nest_thermostat' -require 'dotenv' -require 'pry' +require "nest_thermostat" +require "dotenv" +require "pry" +require "fakeweb" +require "vcr" +require "timecop" +require "awesome_print" Dotenv.load RSpec.configure do |c| c.filter_run focus: true c.run_all_when_everything_filtered = true + c.extend VCR::RSpec::Macros +end + +VCR.configure do |c| + c.cassette_library_dir = "fixtures/vcr_cassettes" + c.hook_into :fakeweb + c.configure_rspec_metadata! + c.allow_http_connections_when_no_cassette = true end