Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Nest Thermostat temperature sensors #59

Closed
iMicknl opened this issue Mar 15, 2022 · 16 comments
Closed

Support Nest Thermostat temperature sensors #59

iMicknl opened this issue Mar 15, 2022 · 16 comments
Labels
enhancement New feature or request

Comments

@iMicknl
Copy link
Owner

iMicknl commented Mar 15, 2022

Description

The eventual goal is to see if this integration can expose the features that are currently missing from the Nest SDM API. One of these features is the temperature access:

How can you help?

  1. Download https://github.com/iMicknl/ha-nest-protect/archive/refs/heads/enhancement/kryptonite_temperature_sensors.zip
    Extract this file and place custom_components/nest_protect in your custom_components folder.
  2. Restart Home Assistant
  3. (assuming you already have setup the integration, otherwise you need to do it now)
  4. Go to your integrations page (config/integrations) and click the 3 dots next to Nest Protect. Select 'download diagnostics'.
  5. Post your diagnostics here in a comment.
  6. You can check if there are temperature sensors added as well and or if you have errors in your log.

Device (optional)

No response

Additional information

No response

@iMicknl iMicknl added the enhancement New feature or request label Mar 15, 2022
@ErikSGross
Copy link

First of all, THANK YOU for working on this integration. A few Nest products (Protect, Secure, Door Locks, and Temperature Sensors) are pretty much the only remaining smart home devices I have that are not yet integrated into Home Assistant.

Are the kryptonite products in the NEST API response referring to temperature sensors in the Protect devices themselves, or are they referring to the standalone temperature sensors that are used with the Nest thermostats?

I have both products, so I should be able to get you some data later today.

@iMicknl
Copy link
Owner Author

iMicknl commented Mar 15, 2022

Unfortunately, only Nest Thermostat sensors are supported. We track the request for the Nest Protect sensors in this issue; #22. (but this is not exposed unfortunately).

Providing the data would be great!

@ErikSGross
Copy link

Looks like the temperature measurement and battery level are indeed available in the Nest JSON data for the standalone temperature sensors. That could easily fit into the Home Assistant device model with a temp entity and a diagnostic battery entry.

Here's what it looks like:

{
  "data": {
    "app_launch": {
      "updated_buckets": [
        {
          "object_key": "kryptonite.**TEMP_SENSOR_ID_1**",
          "object_revision": -4890,
          "object_timestamp": 1647370142084,
          "value": {
            "model": "KR1",
            "last_updated_at": 1647370142,
            "structure_id": "**STRUCTURE_ID_1**",
            "current_temperature": 19.799988,
            "where_id": "00000000-0000-0000-0000-00010000000c",
            "serial_number": "**REDACTED**",
            "battery_level": 81
          }
        },
        {
          "object_key": "structure.**STRUCTURE_ID_1**",
          "value": {
            "swarm": [
              "kryptonite.**TEMP_SENSOR_ID_1**"
            ],
            "rcs_sensor_swarm": [
              "kryptonite.**TEMP_SENSOR_ID_1**"
            ],
          }
        },
      ],
    }
  }
}

@cybernard
Copy link

cybernard commented Mar 16, 2022

How do I disable REDACTED?

{
  "home_assistant": {
    "installation_type": "Home Assistant OS",
    "version": "2022.3.5",
    "dev": false,
    "hassio": true,
    "virtualenv": false,
    "python_version": "3.9.9",
    "docker": true,
    "arch": "aarch64",
    "timezone": "America/Chicago",
    "os_name": "Linux",
    "os_version": "5.10.92-v8",
    "supervisor": "2022.03.4",
    "host_os": "Home Assistant OS 7.4",
    "docker_version": "20.10.9",
    "chassis": "embedded",
    "run_as_root": true
  },
  "custom_components": {
    "ical": {
      "version": "1.3",
      "requirements": [
        "icalendar==4.0.7"
      ]
    },
    "hacs": {
      "version": "1.23.0",
      "requirements": [
        "aiogithubapi>=21.11.0"
      ]
    },
    "mail_and_packages": {
      "version": "0.3.3-2",
      "requirements": [
        "imageio>=2.9.0",
        "python-resize-image>=1.1.19"
      ]
    },
    "entities_calendar": {
      "version": "0.0.8",
      "requirements": []
    },
    "integration_blueprint": {
      "version": "0.0.0",
      "requirements": []
    },
    "samsungtv_smart": {
      "version": "0.5.0",
      "requirements": [
        "websocket-client>=0.58.0",
        "wakeonlan>=2.0.0",
        "aiofiles>=0.6.0"
      ]
    },
    "google_home": {
      "version": "1.9.8",
      "requirements": [
        "glocaltokens==0.6.3",
        "google-api-python-client==2.38.0"
      ]
    },
    "rpi_rf": {
      "version": "2022.2.9",
      "requirements": [
        "rpi-rf==0.9.7",
        "RPi.GPIO==0.7.1"
      ]
    },
    "nest_protect": {
      "version": "0.3.3",
      "requirements": []
    },
    "localtuya": {
      "version": "3.2.1",
      "requirements": []
    },
    "ble_monitor": {
      "version": "7.9.7",
      "requirements": [
        "pycryptodomex>=3.14.1",
        "janus>=1.0.0",
        "aioblescan>=0.2.12",
        "btsocket>=0.2.0",
        "pyric>=0.1.6.3"
      ]
    },
    "emporia_vue": {
      "version": "0.7.3",
      "requirements": [
        "pyemvue==0.15.1"
      ]
    }
  },
  "integration_manifest": {
    "domain": "nest_protect",
    "name": "Nest Protect",
    "config_flow": true,
    "documentation": "https://github.com/imicknl/ha-nest-protect",
    "issue_tracker": "https://github.com/imicknl/ha-nest-protect/issues",
    "requirements": [],
    "codeowners": [
      "@imicknl"
    ],
    "iot_class": "cloud_polling",
    "version": "0.3.3",
    "dhcp": [
      {
        "macaddress": "CCA7C1*"
      }
    ],
    "is_built_in": false
  },
  "data": {
    "app_launch": {
      "updated_buckets": [
        {
          "object_key": "structure.0224f1c0-96a4-11ea-931a-0e13a626118d",
          "object_revision": -26820,
          "object_timestamp": 1647378126509,
          "value": {
            "swarm": [
              "topaz.6416660000CAE76D",
              "topaz.18B43000009C0C6C",
              "topaz.18B4300000993625"
            ],
            "manual_away_timestamp": 1647109452,
            "geofence_enhanced_autoaway": {
              "enabled": true,
              "is_set": true
            },
            "city": "**REDACTED**",
            "name": "**REDACTED**",
            "eta_preconditioning_active": false,
            "creation_time": 1589544174389,
            "location": "**REDACTED**",
            "touched_by": {
              "touched_by": 1,
              "touched_id": "",
              "touched_user_id": "user.16936183"
            },
            "latitude": "**REDACTED**",
            "ifj_primary_fabric_id": "**REDACTED**",
            "measurement_scale": "imperial",
            "state": "**REDACTED**",
            "away_timestamp": 1647096300,
            "topaz_hush_key": "**REDACTED**",
            "enable_goose": false,
            "away_setter": 1,
            "phone_hush_enable": false,
            "hvac_safety_shutoff_enabled": true,
            "house_type": "family",
            "demand_charge_enabled": true,
            "rcs_sensor_swarm": [],
            "longitude": "**REDACTED**",
            "aux_primary_fabric_id": "**REDACTED**",
            "topaz_enhanced_auto_away_enabled": false,
            "address_lines": "**REDACTED**",
            "country_code": "US",
            "hvac_smoke_safety_shutoff_enabled": false,
            "topaz_away": true,
            "tou_enabled": true,
            "renovation_date": "pre-1940",
            "vacation_mode": false,
            "fabric_ids": [
              "DE22EAD7E75B2AD6"
            ],
            "postal_code": "**REDACTED**",
            "num_thermostats": "1",
            "entitlements": {},
            "dr_reminder_enabled": true,
            "members": [
              {
                "user": "**REDACTED**",
                "roles": [
                  "owner"
                ]
              }
            ],
            "manual_eco_all": false,
            "goose_sensor_events_enabled": true,
            "time_zone": "**REDACTED**",
            "user": "**REDACTED**",
            "clutches": [],
            "away": false,
            "devices": []
          }
        },
        {
          "object_key": "topaz.6416660000CAE76D",
          "object_revision": -18783,
          "object_timestamp": 1647399899346,
          "value": {
            "spoken_where_id": "00000000-0000-0000-0000-00010000000d",
            "creation_time": 1646615458333,
            "installed_locale": "en_US",
            "ntp_green_led_brightness": 2,
            "component_buzzer_test_passed": true,
            "wifi_ip_address": "192.168.5.16",
            "wired_led_enable": true,
            "wifi_regulatory_domain": "A2",
            "co_blame_duration": 0,
            "is_rcs_capable": false,
            "fabric_id": "DE22EAD7E75B2AD6",
            "battery_health_state": 0,
            "steam_detection_enable": true,
            "hushed_state": false,
            "capability_level": 2.0,
            "home_alarm_link_type": 0,
            "model": "Topaz-2.7",
            "component_smoke_test_passed": true,
            "component_speaker_test_passed": true,
            "removed_from_base": false,
            "smoke_sequence_number": 0,
            "home_away_input": false,
            "device_locale": "en_US",
            "co_blame_threshold": 0,
            "kl_software_version": "3.0.16",
            "component_us_test_passed": false,
            "auto_away": true,
            "night_light_enable": true,
            "component_als_test_passed": true,
            "speaker_test_results": 32768,
            "wired_or_battery": 0,
            "is_rcs_used": false,
            "replace_by_date_utc_secs": 1869955200,
            "certification_body": 1,
            "component_pir_test_passed": true,
            "structure_id": "0224f1c0-96a4-11ea-931a-0e13a626118d",
            "software_version": "3.4rc6",
            "component_hum_test_passed": true,
            "home_alarm_link_capable": false,
            "night_light_brightness": 2,
            "device_external_color": "white",
            "latest_manual_test_end_utc_secs": 1646690980,
            "smoke_status": 0,
            "latest_manual_test_start_utc_secs": 1646690961,
            "component_temp_test_passed": true,
            "home_alarm_link_connected": false,
            "co_status": 0,
            "heat_status": 0,
            "product_id": 9,
            "night_light_continuous": false,
            "co_previous_peak": 0,
            "auto_away_decision_time_secs": 600,
            "component_co_test_passed": true,
            "where_id": "00000000-0000-0000-0000-00010000000d",
            "serial_number": "**REDACTED**",
            "component_heat_test_passed": false,
            "latest_manual_test_cancelled": false,
            "thread_mac_address": "**REDACTED**",
            "resource_id": "topaz_resource.5",
            "buzzer_test_results": 32768,
            "wifi_mac_address": "**REDACTED**",
            "line_power_present": true,
            "gesture_hush_enable": false,
            "device_born_on_date_utc_secs": 1554336000,
            "ntp_green_led_enable": true,
            "component_led_test_passed": true,
            "co_sequence_number": 0,
            "thread_ip_address": "**REDACTED**",
            "component_wifi_test_passed": true,
            "heads_up_enable": true,
            "battery_level": 5282
          }
        },
        {
          "object_key": "topaz.18B4300000993625",
          "object_revision": 24583,
          "object_timestamp": 1647393617895,
          "value": {
            "spoken_where_id": "00000000-0000-0000-0000-000100000010",
            "creation_time": 1589549668181,
            "installed_locale": "en_US",
            "ntp_green_led_brightness": 2,
            "component_buzzer_test_passed": true,
            "wifi_ip_address": "192.168.5.15",
            "wired_led_enable": true,
            "wifi_regulatory_domain": "A2",
            "co_blame_duration": 0,
            "is_rcs_capable": false,
            "fabric_id": "DE22EAD7E75B2AD6",
            "battery_health_state": 0,
            "steam_detection_enable": true,
            "hushed_state": false,
            "capability_level": 2.0,
            "home_alarm_link_type": 0,
            "model": "Topaz-2.7",
            "component_smoke_test_passed": true,
            "component_speaker_test_passed": true,
            "removed_from_base": false,
            "smoke_sequence_number": 0,
            "last_audio_self_test_end_utc_secs": 1644793414,
            "home_away_input": true,
            "device_locale": "en_US",
            "co_blame_threshold": 0,
            "kl_software_version": "3.0.16",
            "component_us_test_passed": false,
            "auto_away": true,
            "night_light_enable": true,
            "component_als_test_passed": true,
            "speaker_test_results": 32768,
            "wired_or_battery": 0,
            "is_rcs_used": false,
            "replace_by_date_utc_secs": 1798070400,
            "certification_body": 1,
            "last_audio_self_test_start_utc_secs": 1644793411,
            "component_pir_test_passed": true,
            "structure_id": "0224f1c0-96a4-11ea-931a-0e13a626118d",
            "software_version": "3.4rc6",
            "component_hum_test_passed": true,
            "home_alarm_link_capable": false,
            "night_light_brightness": 2,
            "device_external_color": "white",
            "latest_manual_test_end_utc_secs": 1646690979,
            "smoke_status": 0,
            "latest_manual_test_start_utc_secs": 1646690961,
            "component_temp_test_passed": true,
            "home_alarm_link_connected": false,
            "co_status": 0,
            "heat_status": 0,
            "product_id": 9,
            "night_light_continuous": false,
            "co_previous_peak": 9,
            "auto_away_decision_time_secs": 600,
            "component_co_test_passed": true,
            "where_id": "00000000-0000-0000-0000-000100000010",
            "serial_number": "**REDACTED**",
            "component_heat_test_passed": false,
            "latest_manual_test_cancelled": false,
            "thread_mac_address": "**REDACTED**",
            "resource_id": "topaz_resource.5",
            "buzzer_test_results": 32768,
            "wifi_mac_address": "**REDACTED**",
            "line_power_present": true,
            "gesture_hush_enable": false,
            "device_born_on_date_utc_secs": 1482537600,
            "ntp_green_led_enable": true,
            "component_led_test_passed": true,
            "co_sequence_number": 0,
            "thread_ip_address": "**REDACTED**",
            "component_wifi_test_passed": true,
            "heads_up_enable": true,
            "battery_level": 5276
          }
        },
        {
          "object_key": "where.0224f1c0-96a4-11ea-931a-0e13a626118d",
          "object_revision": -23819,
          "object_timestamp": 1589544175575,
          "value": {
            "wheres": [
              {
                "where_id": "00000000-0000-0000-0000-00010000000c",
                "name": "**REDACTED**"
              },
              {
                "where_id": "00000000-0000-0000-0000-000100000005",
                "name": "**REDACTED**"
              },
              {
                "where_id": "00000000-0000-0000-0000-000100000013",
                "name": "**REDACTED**"
              },
              {
                "where_id": "00000000-0000-0000-0000-000100000001",
                "name": "**REDACTED**"
              },
              {
                "where_id": "00000000-0000-0000-0000-000100000010",
                "name": "**REDACTED**"
              },
              {
                "where_id": "00000000-0000-0000-0000-00010000001d",
                "name": "**REDACTED**"
              },
              {
                "where_id": "00000000-0000-0000-0000-000100000017",
                "name": "**REDACTED**"
              },
              {
                "where_id": "00000000-0000-0000-0000-00010000000b",
                "name": "**REDACTED**"
              },
              {
                "where_id": "00000000-0000-0000-0000-000100000002",
                "name": "**REDACTED**"
              },
              {
                "where_id": "00000000-0000-0000-0000-000100000006",
                "name": "**REDACTED**"
              },
              {
                "where_id": "00000000-0000-0000-0000-000100000012",
                "name": "**REDACTED**"
              },
              {
                "where_id": "00000000-0000-0000-0000-000100000009",
                "name": "**REDACTED**"
              },
              {
                "where_id": "00000000-0000-0000-0000-00010000001c",
                "name": "**REDACTED**"
              },
              {
                "where_id": "00000000-0000-0000-0000-00010000000f",
                "name": "**REDACTED**"
              },
              {
                "where_id": "00000000-0000-0000-0000-000100000016",
                "name": "**REDACTED**"
              },
              {
                "where_id": "00000000-0000-0000-0000-000100000007",
                "name": "**REDACTED**"
              },
              {
                "where_id": "00000000-0000-0000-0000-00010000000a",
                "name": "**REDACTED**"
              },
              {
                "where_id": "00000000-0000-0000-0000-000100000011",
                "name": "**REDACTED**"
              },
              {
                "where_id": "00000000-0000-0000-0000-00010000001b",
                "name": "**REDACTED**"
              },
              {
                "where_id": "00000000-0000-0000-0000-000100000015",
                "name": "**REDACTED**"
              },
              {
                "where_id": "00000000-0000-0000-0000-000100000003",
                "name": "**REDACTED**"
              },
              {
                "where_id": "00000000-0000-0000-0000-00010000000e",
                "name": "**REDACTED**"
              },
              {
                "where_id": "00000000-0000-0000-0000-000100000004",
                "name": "**REDACTED**"
              },
              {
                "where_id": "00000000-0000-0000-0000-000100000014",
                "name": "**REDACTED**"
              },
              {
                "where_id": "00000000-0000-0000-0000-000100000000",
                "name": "**REDACTED**"
              },
              {
                "where_id": "00000000-0000-0000-0000-00010000000d",
                "name": "**REDACTED**"
              },
              {
                "where_id": "00000000-0000-0000-0000-000100000018",
                "name": "**REDACTED**"
              },
              {
                "where_id": "00000000-0000-0000-0000-00010000001a",
                "name": "**REDACTED**"
              }
            ]
          }
        },
        {
          "object_key": "topaz.18B43000009C0C6C",
          "object_revision": -28255,
          "object_timestamp": 1647392598430,
          "value": {
            "spoken_where_id": "00000000-0000-0000-0000-000100000001",
            "creation_time": 1589545415537,
            "installed_locale": "en_US",
            "ntp_green_led_brightness": 2,
            "component_buzzer_test_passed": true,
            "wifi_ip_address": "192.168.5.14",
            "wired_led_enable": true,
            "wifi_regulatory_domain": "A2",
            "co_blame_duration": 0,
            "is_rcs_capable": false,
            "fabric_id": "DE22EAD7E75B2AD6",
            "battery_health_state": 0,
            "steam_detection_enable": true,
            "hushed_state": false,
            "capability_level": 2.0,
            "home_alarm_link_type": 0,
            "model": "Topaz-2.7",
            "component_smoke_test_passed": true,
            "component_speaker_test_passed": true,
            "removed_from_base": false,
            "smoke_sequence_number": 0,
            "last_audio_self_test_end_utc_secs": 1644793417,
            "home_away_input": true,
            "device_locale": "en_US",
            "co_blame_threshold": 0,
            "kl_software_version": "3.0.16",
            "component_us_test_passed": false,
            "auto_away": true,
            "night_light_enable": true,
            "component_als_test_passed": true,
            "speaker_test_results": 32768,
            "wired_or_battery": 0,
            "is_rcs_used": false,
            "replace_by_date_utc_secs": 1806537600,
            "certification_body": 1,
            "last_audio_self_test_start_utc_secs": 1644793414,
            "component_pir_test_passed": true,
            "structure_id": "0224f1c0-96a4-11ea-931a-0e13a626118d",
            "software_version": "3.4rc6",
            "component_hum_test_passed": true,
            "home_alarm_link_capable": false,
            "night_light_brightness": 2,
            "device_external_color": "white",
            "latest_manual_test_end_utc_secs": 1646690989,
            "smoke_status": 0,
            "latest_manual_test_start_utc_secs": 1646690941,
            "component_temp_test_passed": true,
            "home_alarm_link_connected": false,
            "co_status": 0,
            "heat_status": 0,
            "product_id": 9,
            "night_light_continuous": false,
            "co_previous_peak": 11,
            "auto_away_decision_time_secs": 600,
            "component_co_test_passed": true,
            "where_id": "00000000-0000-0000-0000-000100000001",
            "serial_number": "**REDACTED**",
            "component_heat_test_passed": false,
            "latest_manual_test_cancelled": false,
            "thread_mac_address": "**REDACTED**",
            "resource_id": "topaz_resource.5",
            "buzzer_test_results": 32768,
            "wifi_mac_address": "**REDACTED**",
            "line_power_present": true,
            "gesture_hush_enable": false,
            "device_born_on_date_utc_secs": 1491004800,
            "ntp_green_led_enable": true,
            "component_led_test_passed": true,
            "co_sequence_number": 0,
            "thread_ip_address": "**REDACTED**",
            "component_wifi_test_passed": true,
            "heads_up_enable": true,
            "battery_level": 5224
          }
        }
      ],
      "service_urls": {
        "urls": {
          "rubyapi_url": "https://home.nest.com/",
          "czfe_url": "https://czfe30-front01-iad01.transport.home.nest.com",
          "log_upload_url": "https://logsink.home.nest.com/upload/user",
          "transport_url": "https://czfe30-front01-iad01.transport.home.nest.com",
          "weather_url": "https://apps-weather.nest.com/weather/v1?query=",
          "support_url": "https://nest.secure.force.com/support/webapp?",
          "direct_transport_url": "https://transport02-rts27-iad01.transport.home.nest.com:443"
        },
        "limits": {
          "thermostats_per_structure": 20,
          "structures": 5,
          "smoke_detectors_per_structure": 18,
          "smoke_detectors": 54,
          "thermostats": 60
        },
        "weave": {
          "service_config": "**REDACTED**",
          "pairing_token": "**REDACTED**",
          "access_token": "**REDACTED**"
        }
      },
      "weather_for_structures": {
        "structure.0224f1c0-96a4-11ea-931a-0e13a626118d": {
          "current": {
            "icon": "clear",
            "temp_c": "**REDACTED**",
            "sunrise": "**REDACTED**",
            "sunset": "**REDACTED**"
          },
          "location": "**REDACTED**"
        }
      },
      "2fa_enabled": true
    }
  }
}

@cybernard
Copy link

cybernard commented Mar 16, 2022

This is the only real error like thing I found.

2022-03-15 22:12:10 WARNING (MainThread) [homeassistant.components.sensor] custom_components.nest_protect.sensor is setting 'unit_of_measurement' on an instance of SensorEntityDescription, this is not valid and will be unsupported from Home Assistant 2021.11. Please report it to the custom component author.

It says ERROR but then it says ignoring hmmm

2022-03-15 22:11:49 ERROR (MainThread) [homeassistant.components.binary_sensor] Platform nest_protect does not generate unique IDs. ID topaz.18B4300000993625-battery_health_state already exists - ignoring binary_sensor.nest_protect_dining_room_battery_health
2022-03-15 22:11:49 ERROR (MainThread) [homeassistant.components.binary_sensor] Platform nest_protect does not generate unique IDs. ID topaz.18B4300000993625-component_smoke_test_passed already exists - ignoring binary_sensor.nest_protect_dining_room_smoke_test
2022-03-15 22:11:49 ERROR (MainThread) [homeassistant.components.binary_sensor] Platform nest_protect does not generate unique IDs. ID topaz.18B4300000993625-component_speaker_test_passed already exists - ignoring binary_sensor.nest_protect_dining_room_speaker_test
2022-03-15 22:11:49 ERROR (MainThread) [homeassistant.components.binary_sensor] Platform nest_protect does not generate unique IDs. ID topaz.18B4300000993625-auto_away already exists - ignoring binary_sensor.nest_protect_dining_room_occupancy
2022-03-15 22:11:49 ERROR (MainThread) [homeassistant.components.binary_sensor] Platform nest_protect does not generate unique IDs. ID topaz.18B4300000993625-component_pir_test_passed already exists - ignoring binary_sensor.nest_protect_dining_room_pir_test
2022-03-15 22:11:49 ERROR (MainThread) [homeassistant.components.binary_sensor] Platform nest_protect does not generate unique IDs. ID topaz.18B4300000993625-component_hum_test_passed already exists - ignoring binary_sensor.nest_protect_dining_room_humidity_test

@iMicknl
Copy link
Owner Author

iMicknl commented Mar 16, 2022

@ErikSGross thanks! Could you try the latest version? https://github.com/iMicknl/ha-nest-protect/archive/refs/heads/enhancement/kryptonite_temperature_sensors.zip

@cybernard no worries, I already have the required information from someone else. Are you sure that you have a Nest Thermostat? It seems that there is no data which could be due to no thermostat, or not a correct installation of this test version.

@cybernard
Copy link

Hmm, I think I made a mental mistake. I saw the next protect and confused my self that it was the temperature sensors inside the nest_protect. I used to have a Nest Thermostat, but when I saw the ecobee's web gui with automatic graphs I got rid of the nest. Also it has an existing integration with home assistant.

@ErikSGross
Copy link

Looks great!

image

A few quick comments on the test build:

  1. The device should probably be "Nest Temperature Sensor" and not "Nest Thermostat", as the device that's reporting the data is one of these sensors.
  2. One error (as mentioned above by @cybernard : custom_components.nest_protect.sensor is setting 'unit_of_measurement' on an instance of SensorEntityDescription
  3. Another error, which I think is fixed in main: Detected code that uses str (diagnostic) for entity category. This is deprecated and will stop working in Home Assistant 2022.4, it should be updated to use EntityCategory instead.

@iMicknl
Copy link
Owner Author

iMicknl commented Mar 16, 2022

@ErikSGross
Copy link

One other question (perhaps should have its own topic): do you know what the quartz devices are in the Nest data? I see that topaz is the Protect (even listed in the device details in the Nest app), and that kryptonite is the standalone Temperature Sensor, but I also have quartz devices listed in the diagnostic data for the ha-nest-protect integration.

My intital thought is that perhaps they could be the cameras in the Doorbell and Hub Max, but my quartz count would be off by one for my home in that case.

Is your vision for this integration to be "All Nest Things Google Hasn't Added to SDM"? Based on adding the temperature sensors, I'm guessing so? If so, I'm happy to help provide data for other products in my Nest account. For example, the Nest app will let me enable/disable the camera on my Nest Hub Max, but the SDM interface just gives me access to the camera feed if it's enabled.

@iMicknl
Copy link
Owner Author

iMicknl commented Mar 16, 2022

Is your vision for this integration to be "All Nest Things Google Hasn't Added to SDM"?

Exactly, anything that is not supported in SMD API could be supported in this integration, however I won't be spending a lot of time on this. I am trying to set up a good integration / framework for now, that can easily be extended.

You could create another issue with your diagnostics log, using this version: https://github.com/iMicknl/ha-nest-protect/archive/refs/heads/enhancement/add_more_info.zip. This will enable all buckets that I am aware of.

@ErikSGross
Copy link

Thanks for the version that dumps out more information @iMicknl! I've created issues #61 and #62 to track some of the new info I saw. I also see you can get a list of users and the messages/alerts present in the app, but that seems much less useful to be in Home Assistant to me.

@iMicknl
Copy link
Owner Author

iMicknl commented Mar 17, 2022

Thanks! Would the current temperature sensor implementation be sufficient? Can I merge it and close this issue :).

@cybernard
Copy link

cybernard commented Mar 17, 2022

{
	"home_assistant": {
		"installation_type": "Home Assistant OS",
		"version": "2022.3.5",
		"dev": false,
		"hassio": true,
		"virtualenv": false,
		"python_version": "3.9.9",
		"docker": true,
		"arch": "aarch64",
		"timezone": "America/Chicago",
		"os_name": "Linux",
		"os_version": "5.10.92-v8",
		"supervisor": "2022.03.4",
		"host_os": "Home Assistant OS 7.5",
		"docker_version": "20.10.9",
		"chassis": "embedded",
		"run_as_root": true
	},
	"custom_components": {
		"ical": {
			"version": "1.3",
			"requirements": [
				"icalendar==4.0.7"
			]
		},
		"hacs": {
			"version": "1.23.0",
			"requirements": [
				"aiogithubapi>=21.11.0"
			]
		},
		"mail_and_packages": {
			"version": "0.3.3-2",
			"requirements": [
				"imageio>=2.9.0",
				"python-resize-image>=1.1.19"
			]
		},
		"entities_calendar": {
			"version": "0.0.8",
			"requirements": []
		},
		"integration_blueprint": {
			"version": "0.0.0",
			"requirements": []
		},
		"samsungtv_smart": {
			"version": "0.5.0",
			"requirements": [
				"websocket-client>=0.58.0",
				"wakeonlan>=2.0.0",
				"aiofiles>=0.6.0"
			]
		},
		"google_home": {
			"version": "1.9.8",
			"requirements": [
				"glocaltokens==0.6.3",
				"google-api-python-client==2.38.0"
			]
		},
		"rpi_rf": {
			"version": "2022.2.9",
			"requirements": [
				"rpi-rf==0.9.7",
				"RPi.GPIO==0.7.1"
			]
		},
		"nest_protect": {
			"version": "0.3.3",
			"requirements": []
		},
		"localtuya": {
			"version": "3.2.1",
			"requirements": []
		},
		"ble_monitor": {
			"version": "7.9.7",
			"requirements": [
				"pycryptodomex>=3.14.1",
				"janus>=1.0.0",
				"aioblescan>=0.2.12",
				"btsocket>=0.2.0",
				"pyric>=0.1.6.3"
			]
		},
		"emporia_vue": {
			"version": "0.7.3",
			"requirements": [
				"pyemvue==0.15.1"
			]
		}
	},
	"integration_manifest": {
		"domain": "nest_protect",
		"name": "Nest Protect",
		"config_flow": true,
		"documentation": "https://github.com/imicknl/ha-nest-protect",
		"issue_tracker": "https://github.com/imicknl/ha-nest-protect/issues",
		"requirements": [],
		"codeowners": [
			"@imicknl"
		],
		"iot_class": "cloud_polling",
		"version": "0.3.3",
		"dhcp": [{
			"macaddress": "CCA7C1*"
		}],
		"is_built_in": false
	},
	"data": {
		"device": {
			"controllable_name": "Wired",
			"firmware": "3.4rc6",
			"model": "Topaz-2.7"
		},
		"app_launch": {
			"updated_buckets": [{
					"object_key": "structure.0224f1c0-96a4-11ea-931a-0e13a626118d",
					"object_revision": 13458,
					"object_timestamp": 1647434614518,
					"value": {
						"swarm": [
							"topaz.6416660000CAE76D",
							"topaz.18B43000009C0C6C",
							"topaz.18B4300000993625"
						],
						"manual_away_timestamp": 1647109452,
						"geofence_enhanced_autoaway": {
							"enabled": true,
							"is_set": true
						},
						"city": "**REDACTED**",
						"name": "**REDACTED**",
						"eta_preconditioning_active": false,
						"creation_time": 1589544174389,
						"location": "**REDACTED**",
						"touched_by": {
							"touched_by": 1,
							"touched_id": "",
							"touched_user_id": "user.16936183"
						},
						"latitude": "**REDACTED**",
						"ifj_primary_fabric_id": "**REDACTED**",
						"measurement_scale": "imperial",
						"state": "**REDACTED**",
						"away_timestamp": 1647096300,
						"topaz_hush_key": "**REDACTED**",
						"enable_goose": false,
						"away_setter": 1,
						"phone_hush_enable": false,
						"hvac_safety_shutoff_enabled": true,
						"house_type": "family",
						"demand_charge_enabled": true,
						"rcs_sensor_swarm": [],
						"longitude": "**REDACTED**",
						"aux_primary_fabric_id": "**REDACTED**",
						"topaz_enhanced_auto_away_enabled": false,
						"address_lines": "**REDACTED**",
						"country_code": "US",
						"hvac_smoke_safety_shutoff_enabled": false,
						"topaz_away": true,
						"tou_enabled": true,
						"renovation_date": "pre-1940",
						"vacation_mode": false,
						"fabric_ids": [
							"DE22EAD7E75B2AD6"
						],
						"postal_code": "**REDACTED**",
						"num_thermostats": "1",
						"entitlements": {},
						"dr_reminder_enabled": true,
						"members": [{
							"user": "**REDACTED**",
							"roles": [
								"owner"
							]
						}],
						"manual_eco_all": false,
						"goose_sensor_events_enabled": true,
						"time_zone": "**REDACTED**",
						"user": "**REDACTED**",
						"clutches": [],
						"away": false,
						"devices": []
					}
				},
				{
					"object_key": "topaz.6416660000CAE76D",
					"object_revision": 3832,
					"object_timestamp": 1647435904847,
					"value": {
						"spoken_where_id": "00000000-0000-0000-0000-00010000000d",
						"creation_time": 1646615458333,
						"installed_locale": "en_US",
						"ntp_green_led_brightness": 2,
						"component_buzzer_test_passed": true,
						"wifi_ip_address": "192.168.5.16",
						"wired_led_enable": true,
						"wifi_regulatory_domain": "A2",
						"co_blame_duration": 0,
						"is_rcs_capable": false,
						"fabric_id": "DE22EAD7E75B2AD6",
						"battery_health_state": 0,
						"steam_detection_enable": true,
						"hushed_state": false,
						"capability_level": 2.0,
						"home_alarm_link_type": 0,
						"model": "Topaz-2.7",
						"component_smoke_test_passed": true,
						"component_speaker_test_passed": true,
						"removed_from_base": false,
						"smoke_sequence_number": 0,
						"home_away_input": false,
						"device_locale": "en_US",
						"co_blame_threshold": 0,
						"kl_software_version": "3.0.16",
						"component_us_test_passed": false,
						"auto_away": true,
						"night_light_enable": true,
						"component_als_test_passed": true,
						"speaker_test_results": 32768,
						"wired_or_battery": 0,
						"is_rcs_used": false,
						"replace_by_date_utc_secs": 1869955200,
						"certification_body": 1,
						"component_pir_test_passed": true,
						"structure_id": "0224f1c0-96a4-11ea-931a-0e13a626118d",
						"software_version": "3.4rc6",
						"component_hum_test_passed": true,
						"home_alarm_link_capable": false,
						"night_light_brightness": 2,
						"device_external_color": "white",
						"latest_manual_test_end_utc_secs": 1646690980,
						"smoke_status": 0,
						"latest_manual_test_start_utc_secs": 1646690961,
						"component_temp_test_passed": true,
						"home_alarm_link_connected": false,
						"co_status": 0,
						"heat_status": 0,
						"product_id": 9,
						"night_light_continuous": false,
						"co_previous_peak": 0,
						"auto_away_decision_time_secs": 600,
						"component_co_test_passed": true,
						"where_id": "00000000-0000-0000-0000-00010000000d",
						"serial_number": "**REDACTED**",
						"component_heat_test_passed": false,
						"latest_manual_test_cancelled": false,
						"thread_mac_address": "**REDACTED**",
						"resource_id": "topaz_resource.5",
						"buzzer_test_results": 32768,
						"wifi_mac_address": "**REDACTED**",
						"line_power_present": true,
						"gesture_hush_enable": false,
						"device_born_on_date_utc_secs": 1554336000,
						"ntp_green_led_enable": true,
						"component_led_test_passed": true,
						"co_sequence_number": 0,
						"thread_ip_address": "**REDACTED**",
						"component_wifi_test_passed": true,
						"heads_up_enable": true,
						"battery_level": 5281
					}
				},
				{
					"object_key": "topaz.18B4300000993625",
					"object_revision": -19260,
					"object_timestamp": 1647435288130,
					"value": {
						"spoken_where_id": "00000000-0000-0000-0000-000100000010",
						"creation_time": 1589549668181,
						"installed_locale": "en_US",
						"ntp_green_led_brightness": 2,
						"component_buzzer_test_passed": true,
						"wifi_ip_address": "192.168.5.15",
						"wired_led_enable": true,
						"wifi_regulatory_domain": "A2",
						"co_blame_duration": 0,
						"is_rcs_capable": false,
						"fabric_id": "DE22EAD7E75B2AD6",
						"battery_health_state": 0,
						"steam_detection_enable": true,
						"hushed_state": false,
						"capability_level": 2.0,
						"home_alarm_link_type": 0,
						"model": "Topaz-2.7",
						"component_smoke_test_passed": true,
						"component_speaker_test_passed": true,
						"removed_from_base": false,
						"smoke_sequence_number": 0,
						"last_audio_self_test_end_utc_secs": 1644793414,
						"home_away_input": true,
						"device_locale": "en_US",
						"co_blame_threshold": 0,
						"kl_software_version": "3.0.16",
						"component_us_test_passed": false,
						"auto_away": true,
						"night_light_enable": true,
						"component_als_test_passed": true,
						"speaker_test_results": 32768,
						"wired_or_battery": 0,
						"is_rcs_used": false,
						"replace_by_date_utc_secs": 1798070400,
						"certification_body": 1,
						"last_audio_self_test_start_utc_secs": 1644793411,
						"component_pir_test_passed": true,
						"structure_id": "0224f1c0-96a4-11ea-931a-0e13a626118d",
						"software_version": "3.4rc6",
						"component_hum_test_passed": true,
						"home_alarm_link_capable": false,
						"night_light_brightness": 2,
						"device_external_color": "white",
						"latest_manual_test_end_utc_secs": 1646690979,
						"smoke_status": 0,
						"latest_manual_test_start_utc_secs": 1646690961,
						"component_temp_test_passed": true,
						"home_alarm_link_connected": false,
						"co_status": 0,
						"heat_status": 0,
						"product_id": 9,
						"night_light_continuous": false,
						"co_previous_peak": 9,
						"auto_away_decision_time_secs": 600,
						"component_co_test_passed": true,
						"where_id": "00000000-0000-0000-0000-000100000010",
						"serial_number": "**REDACTED**",
						"component_heat_test_passed": false,
						"latest_manual_test_cancelled": false,
						"thread_mac_address": "**REDACTED**",
						"resource_id": "topaz_resource.5",
						"buzzer_test_results": 32768,
						"wifi_mac_address": "**REDACTED**",
						"line_power_present": true,
						"gesture_hush_enable": false,
						"device_born_on_date_utc_secs": 1482537600,
						"ntp_green_led_enable": true,
						"component_led_test_passed": true,
						"co_sequence_number": 0,
						"thread_ip_address": "**REDACTED**",
						"component_wifi_test_passed": true,
						"heads_up_enable": true,
						"battery_level": 5276
					}
				},
				{
					"object_key": "where.0224f1c0-96a4-11ea-931a-0e13a626118d",
					"object_revision": -23819,
					"object_timestamp": 1589544175575,
					"value": {
						"wheres": [{
								"where_id": "00000000-0000-0000-0000-00010000000c",
								"name": "**REDACTED**"
							},
							{
								"where_id": "00000000-0000-0000-0000-000100000005",
								"name": "**REDACTED**"
							},
							{
								"where_id": "00000000-0000-0000-0000-000100000013",
								"name": "**REDACTED**"
							},
							{
								"where_id": "00000000-0000-0000-0000-000100000001",
								"name": "**REDACTED**"
							},
							{
								"where_id": "00000000-0000-0000-0000-000100000010",
								"name": "**REDACTED**"
							},
							{
								"where_id": "00000000-0000-0000-0000-00010000001d",
								"name": "**REDACTED**"
							},
							{
								"where_id": "00000000-0000-0000-0000-000100000017",
								"name": "**REDACTED**"
							},
							{
								"where_id": "00000000-0000-0000-0000-00010000000b",
								"name": "**REDACTED**"
							},
							{
								"where_id": "00000000-0000-0000-0000-000100000002",
								"name": "**REDACTED**"
							},
							{
								"where_id": "00000000-0000-0000-0000-000100000006",
								"name": "**REDACTED**"
							},
							{
								"where_id": "00000000-0000-0000-0000-000100000012",
								"name": "**REDACTED**"
							},
							{
								"where_id": "00000000-0000-0000-0000-000100000009",
								"name": "**REDACTED**"
							},
							{
								"where_id": "00000000-0000-0000-0000-00010000001c",
								"name": "**REDACTED**"
							},
							{
								"where_id": "00000000-0000-0000-0000-00010000000f",
								"name": "**REDACTED**"
							},
							{
								"where_id": "00000000-0000-0000-0000-000100000016",
								"name": "**REDACTED**"
							},
							{
								"where_id": "00000000-0000-0000-0000-000100000007",
								"name": "**REDACTED**"
							},
							{
								"where_id": "00000000-0000-0000-0000-00010000000a",
								"name": "**REDACTED**"
							},
							{
								"where_id": "00000000-0000-0000-0000-000100000011",
								"name": "**REDACTED**"
							},
							{
								"where_id": "00000000-0000-0000-0000-00010000001b",
								"name": "**REDACTED**"
							},
							{
								"where_id": "00000000-0000-0000-0000-000100000015",
								"name": "**REDACTED**"
							},
							{
								"where_id": "00000000-0000-0000-0000-000100000003",
								"name": "**REDACTED**"
							},
							{
								"where_id": "00000000-0000-0000-0000-00010000000e",
								"name": "**REDACTED**"
							},
							{
								"where_id": "00000000-0000-0000-0000-000100000004",
								"name": "**REDACTED**"
							},
							{
								"where_id": "00000000-0000-0000-0000-000100000014",
								"name": "**REDACTED**"
							},
							{
								"where_id": "00000000-0000-0000-0000-000100000000",
								"name": "**REDACTED**"
							},
							{
								"where_id": "00000000-0000-0000-0000-00010000000d",
								"name": "**REDACTED**"
							},
							{
								"where_id": "00000000-0000-0000-0000-000100000018",
								"name": "**REDACTED**"
							},
							{
								"where_id": "00000000-0000-0000-0000-00010000001a",
								"name": "**REDACTED**"
							}
						]
					}
				},
				{
					"object_key": "topaz.18B43000009C0C6C",
					"object_revision": 29633,
					"object_timestamp": 1647435804079,
					"value": {
						"spoken_where_id": "00000000-0000-0000-0000-000100000001",
						"creation_time": 1589545415537,
						"installed_locale": "en_US",
						"ntp_green_led_brightness": 2,
						"component_buzzer_test_passed": true,
						"wifi_ip_address": "1.1.1.1",
						"wired_led_enable": true,
						"wifi_regulatory_domain": "A2",
						"co_blame_duration": 0,
						"is_rcs_capable": false,
						"fabric_id": "DE22EAD7E75B2AD6",
						"battery_health_state": 0,
						"steam_detection_enable": true,
						"hushed_state": false,
						"capability_level": 2.0,
						"home_alarm_link_type": 0,
						"model": "Topaz-2.7",
						"component_smoke_test_passed": true,
						"component_speaker_test_passed": true,
						"removed_from_base": false,
						"smoke_sequence_number": 0,
						"last_audio_self_test_end_utc_secs": 1644793417,
						"home_away_input": true,
						"device_locale": "en_US",
						"co_blame_threshold": 0,
						"kl_software_version": "3.0.16",
						"component_us_test_passed": false,
						"auto_away": true,
						"night_light_enable": true,
						"component_als_test_passed": true,
						"speaker_test_results": 32768,
						"wired_or_battery": 0,
						"is_rcs_used": false,
						"replace_by_date_utc_secs": 1806537600,
						"certification_body": 1,
						"last_audio_self_test_start_utc_secs": 1644793414,
						"component_pir_test_passed": true,
						"structure_id": "0224f1c0-96a4-11ea-931a-0e13a626118d",
						"software_version": "3.4rc6",
						"component_hum_test_passed": true,
						"home_alarm_link_capable": false,
						"night_light_brightness": 2,
						"device_external_color": "white",
						"latest_manual_test_end_utc_secs": 1646690989,
						"smoke_status": 0,
						"latest_manual_test_start_utc_secs": 1646690941,
						"component_temp_test_passed": true,
						"home_alarm_link_connected": false,
						"co_status": 0,
						"heat_status": 0,
						"product_id": 9,
						"night_light_continuous": false,
						"co_previous_peak": 11,
						"auto_away_decision_time_secs": 600,
						"component_co_test_passed": true,
						"where_id": "00000000-0000-0000-0000-000100000001",
						"serial_number": "**REDACTED**",
						"component_heat_test_passed": false,
						"latest_manual_test_cancelled": false,
						"thread_mac_address": "**REDACTED**",
						"resource_id": "topaz_resource.5",
						"buzzer_test_results": 32768,
						"wifi_mac_address": "**REDACTED**",
						"line_power_present": true,
						"gesture_hush_enable": false,
						"device_born_on_date_utc_secs": 1491004800,
						"ntp_green_led_enable": true,
						"component_led_test_passed": true,
						"co_sequence_number": 0,
						"thread_ip_address": "**REDACTED**",
						"component_wifi_test_passed": true,
						"heads_up_enable": true,
						"battery_level": 5226
					}
				}
			],
			"service_urls": {
				"urls": {
					"rubyapi_url": "https://home.nest.com/",
					"czfe_url": "https://czfe41-front01-iad01.transport.home.nest.com",
					"log_upload_url": "https://logsink.home.nest.com/upload/user",
					"transport_url": "https://czfe41-front01-iad01.transport.home.nest.com",
					"weather_url": "https://apps-weather.nest.com/weather/v1?query=",
					"support_url": "https://nest.secure.force.com/support/webapp?",
					"direct_transport_url": "https://transport02-rts27-iad01.transport.home.nest.com:443"
				},
				"limits": {
					"thermostats_per_structure": 20,
					"structures": 5,
					"smoke_detectors_per_structure": 18,
					"smoke_detectors": 54,
					"thermostats": 60
				},
				"weave": {
					"service_config": "**REDACTED**",
					"pairing_token": "**REDACTED**",
					"access_token": "**REDACTED**"
				}
			},
			"weather_for_structures": {
				"structure.0224f1c0-96a4-11ea-931a-0e13a626118d": {
					"current": {
						"icon": "mostlycloudy",
						"temp_c": "**REDACTED**",
						"sunrise": "**REDACTED**",
						"sunset": "**REDACTED**"
					},
					"location": "**REDACTED**"
				}
			},
			"2fa_enabled": true
		}
	}
}

@iMicknl
Copy link
Owner Author

iMicknl commented Mar 17, 2022

@cybernard why are you posting your diagnostics here? Am I missing something?

(You don't own a temperature sensor, what this topic is about.)

@ErikSGross
Copy link

@iMicknl, the Temperature Sensor devices and entities look good to me! Unless others have concerns, I say ship it. Thanks!

@iMicknl iMicknl closed this as completed Mar 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants