From a2165e5b572dfa488408ef09192099852d2619d9 Mon Sep 17 00:00:00 2001 From: Donavan Becker <9875439+donavanbecker@users.noreply.github.com> Date: Fri, 24 Apr 2020 12:57:23 -0500 Subject: [PATCH 1/4] add discord badge that links to nest channel (#241) This links to the homebridge discord server. --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 0e9b63b..35f9e99 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # homebridge-nest [![verified-by-homebridge](https://badgen.net/badge/homebridge/verified/purple)](https://github.com/homebridge/homebridge/wiki/Verified-Plugins) +[![Discord](https://img.shields.io/discord/432663330281226270?color=728ED5&logo=discord&label=discord)](https://discord.gg/j5WwJTB) Nest plug-in for [Homebridge](https://github.com/nfarina/homebridge) using the native Nest API. See what's new in [release 4.4.6](https://github.com/chrisjshull/homebridge-nest/releases/tag/v4.4.6). From 514a0878ab1355af824839041278b243f7e1946b Mon Sep 17 00:00:00 2001 From: Doug B Date: Sat, 6 Jun 2020 17:34:20 -0400 Subject: [PATCH 2/4] Update README.md file for Nest accounts (#256) I have found recently that not logging out of the account is the same requirement for either the Google or Nest account approach. Logging out invalidates the Nest account.token. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 35f9e99..06fa40e 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ To use a Nest Account with homebridge-nest, you will need to obtain an access to {"2fa_state":"not_enrolled","access_token":"XXX","email":"...","expires_in":"...", ...} ``` -Simply set `"access_token"` in your `config.json` file under the `"platform": "Nest"` entry to the value of `access_token` in the above string (the `XXX`), which will be a long string of letters and numbers and punctuation. +Simply set `"access_token"` in your `config.json` file under the `"platform": "Nest"` entry to the value of `access_token` in the above string (the `XXX`), which will be a long string of letters and numbers and punctuation. Do not log out of `home.nest.com`, as this will invalidate your credentials. Just close the browser tab. # Using a Google Account From 019010017f39e80fee6100645d6fa23961e139d7 Mon Sep 17 00:00:00 2001 From: Donavan Becker <9875439+donavanbecker@users.noreply.github.com> Date: Wed, 24 Jun 2020 16:18:22 -0500 Subject: [PATCH 3/4] add stale (#272) --- .github/workflows/stale.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/stale.yml diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 0000000..e6c5142 --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,27 @@ +name: Stale + +on: + issues: + types: [reopened] + schedule: + - cron: "*/60 * * * *" + +jobs: + stale: + + runs-on: ubuntu-latest + env: + ACTIONS_STEP_DEBUG: true + steps: + - uses: actions/stale@v3.0.5 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + stale-issue-message: 'This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.' + stale-pr-message: 'This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.' + stale-issue-label: 'stale' + stale-pr-label: 'stale' + days-before-stale: 30 + days-before-close: 5 + exempt-issue-labels: 'pin' + exempt-pr-labels: 'awaiting-approval,work-in-progress' + remove-stale-when-updated: true From 744b48474f126060833e5ee97330112f652bc48c Mon Sep 17 00:00:00 2001 From: Christopher M Hogan Date: Sat, 27 Jun 2020 21:05:44 -0500 Subject: [PATCH 4/4] Retry on DNS query timeouts (#274) These are likely itermittent and so retryable. Co-authored-by: Christopher Hogan --- lib/nest-connection.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/nest-connection.js b/lib/nest-connection.js index 1d0e176..9d02fef 100644 --- a/lib/nest-connection.js +++ b/lib/nest-connection.js @@ -176,7 +176,7 @@ class Connection { } catch(error) { error.status = error.response && error.response.status; this.error('Access token acquisition via googleAuth failed (code ' + (error.status || error.code) + ').'); - if (['ECONNREFUSED','ESOCKETTIMEDOUT','ECONNABORTED','ENETUNREACH'].includes(error.code)) { + if (['ECONNREFUSED','ESOCKETTIMEDOUT','ECONNABORTED','ENETUNREACH','EAI_AGAIN'].includes(error.code)) { this.error('Retrying in ' + API_AUTH_FAIL_RETRY_DELAY_SECONDS + ' second(s).'); await Promise.delay(API_AUTH_FAIL_RETRY_DELAY_SECONDS * 1000); return await this.auth();