From 23308cd5db18196e31e6d2df86de8aedb703f114 Mon Sep 17 00:00:00 2001 From: Kevin Fronczak Date: Thu, 18 Feb 2021 09:48:23 -0500 Subject: [PATCH 01/22] Dev version bump --- blinkpy/helpers/constants.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/blinkpy/helpers/constants.py b/blinkpy/helpers/constants.py index 167aec6e..4cc5b7b1 100644 --- a/blinkpy/helpers/constants.py +++ b/blinkpy/helpers/constants.py @@ -3,8 +3,8 @@ import os MAJOR_VERSION = 0 -MINOR_VERSION = 17 -PATCH_VERSION = 1 +MINOR_VERSION = 18 +PATCH_VERSION = "0.dev0" __version__ = f"{MAJOR_VERSION}.{MINOR_VERSION}.{PATCH_VERSION}" From 77c23f8109e8e7f148104321648794923b484573 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 22 Feb 2021 06:12:55 +0000 Subject: [PATCH 02/22] Bump pylint from 2.6.2 to 2.7.0 Bumps [pylint](https://github.com/PyCQA/pylint) from 2.6.2 to 2.7.0. - [Release notes](https://github.com/PyCQA/pylint/releases) - [Changelog](https://github.com/PyCQA/pylint/blob/master/ChangeLog) - [Commits](https://github.com/PyCQA/pylint/compare/pylint-2.6.2...pylint-2.7.0) Signed-off-by: dependabot-preview[bot] --- requirements_test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements_test.txt b/requirements_test.txt index 922e2753..87a8cd11 100644 --- a/requirements_test.txt +++ b/requirements_test.txt @@ -3,7 +3,7 @@ coverage==5.4 flake8==3.8.4 flake8-docstrings==1.5.0 pre-commit==2.10.1 -pylint==2.6.2 +pylint==2.7.0 pydocstyle==5.1.1 pytest==6.2.2 pytest-cov==2.11.1 From 125c562df599fcbce3f34052a9ba14638f5ba90a Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 24 Mar 2021 11:02:51 +0000 Subject: [PATCH 03/22] Bump coverage from 5.4 to 5.5 Bumps [coverage](https://github.com/nedbat/coveragepy) from 5.4 to 5.5. - [Release notes](https://github.com/nedbat/coveragepy/releases) - [Changelog](https://github.com/nedbat/coveragepy/blob/master/CHANGES.rst) - [Commits](https://github.com/nedbat/coveragepy/compare/coverage-5.4...coverage-5.5) Signed-off-by: dependabot-preview[bot] --- requirements_test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements_test.txt b/requirements_test.txt index 87a8cd11..50a44681 100644 --- a/requirements_test.txt +++ b/requirements_test.txt @@ -1,5 +1,5 @@ black==19.10b0 -coverage==5.4 +coverage==5.5 flake8==3.8.4 flake8-docstrings==1.5.0 pre-commit==2.10.1 From fc7848f00bc670c5a1797ab55c907f636855f8d9 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 24 Mar 2021 11:02:56 +0000 Subject: [PATCH 04/22] Bump pydocstyle from 5.1.1 to 6.0.0 Bumps [pydocstyle](https://github.com/PyCQA/pydocstyle) from 5.1.1 to 6.0.0. - [Release notes](https://github.com/PyCQA/pydocstyle/releases) - [Changelog](https://github.com/PyCQA/pydocstyle/blob/master/docs/release_notes.rst) - [Commits](https://github.com/PyCQA/pydocstyle/compare/5.1.1...6.0.0) Signed-off-by: dependabot-preview[bot] --- requirements_test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements_test.txt b/requirements_test.txt index 87a8cd11..3261c127 100644 --- a/requirements_test.txt +++ b/requirements_test.txt @@ -4,7 +4,7 @@ flake8==3.8.4 flake8-docstrings==1.5.0 pre-commit==2.10.1 pylint==2.7.0 -pydocstyle==5.1.1 +pydocstyle==6.0.0 pytest==6.2.2 pytest-cov==2.11.1 pytest-sugar==0.9.4 From b99cfc74e954dd3ac03fc362b3ca13a2ff2681e6 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sat, 24 Apr 2021 12:41:34 +0000 Subject: [PATCH 05/22] Bump pytest from 6.2.2 to 6.2.3 Bumps [pytest](https://github.com/pytest-dev/pytest) from 6.2.2 to 6.2.3. - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest/compare/6.2.2...6.2.3) Signed-off-by: dependabot-preview[bot] --- requirements_test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements_test.txt b/requirements_test.txt index 3261c127..ccb6cbcd 100644 --- a/requirements_test.txt +++ b/requirements_test.txt @@ -5,7 +5,7 @@ flake8-docstrings==1.5.0 pre-commit==2.10.1 pylint==2.7.0 pydocstyle==6.0.0 -pytest==6.2.2 +pytest==6.2.3 pytest-cov==2.11.1 pytest-sugar==0.9.4 pytest-timeout==1.4.2 From 78a1b9b74d86efc8c63f38c9abe89b8174f1f809 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 28 Apr 2021 04:55:17 +0000 Subject: [PATCH 06/22] Bump pylint from 2.7.0 to 2.8.2 Bumps [pylint](https://github.com/PyCQA/pylint) from 2.7.0 to 2.8.2. - [Release notes](https://github.com/PyCQA/pylint/releases) - [Changelog](https://github.com/PyCQA/pylint/blob/master/ChangeLog) - [Commits](https://github.com/PyCQA/pylint/compare/pylint-2.7.0...v2.8.2) Signed-off-by: dependabot-preview[bot] --- requirements_test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements_test.txt b/requirements_test.txt index c260716a..e6c20975 100644 --- a/requirements_test.txt +++ b/requirements_test.txt @@ -3,7 +3,7 @@ coverage==5.5 flake8==3.8.4 flake8-docstrings==1.5.0 pre-commit==2.10.1 -pylint==2.7.0 +pylint==2.8.2 pydocstyle==6.0.0 pytest==6.2.2 pytest-cov==2.11.1 From ea2ba8dfcf235e4464c16403dfca365459495ddb Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 29 Apr 2021 15:39:17 +0000 Subject: [PATCH 07/22] Upgrade to GitHub-native Dependabot --- .github/dependabot.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..4ed0c3a3 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,33 @@ +version: 2 +updates: +- package-ecosystem: pip + directory: "/" + schedule: + interval: daily + open-pull-requests-limit: 10 + reviewers: + - fronzbot + ignore: + - dependency-name: black + versions: + - 21.4b0 + - 21.4b1 + - dependency-name: pylint + versions: + - 2.7.1 + - 2.7.2 + - 2.7.3 + - 2.7.4 + - 2.8.1 + - dependency-name: pre-commit + versions: + - 2.10.0 + - 2.11.0 + - 2.11.1 + - 2.12.0 + - dependency-name: flake8 + versions: + - 3.9.0 + - dependency-name: pygments + versions: + - 2.8.1 From 67b9fe05556518947f0e9f17ef0e2a7b0c31dd80 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sun, 2 May 2021 11:53:43 +0000 Subject: [PATCH 08/22] Bump pre-commit from 2.10.1 to 2.12.1 Bumps [pre-commit](https://github.com/pre-commit/pre-commit) from 2.10.1 to 2.12.1. - [Release notes](https://github.com/pre-commit/pre-commit/releases) - [Changelog](https://github.com/pre-commit/pre-commit/blob/master/CHANGELOG.md) - [Commits](https://github.com/pre-commit/pre-commit/compare/v2.10.1...v2.12.1) Signed-off-by: dependabot-preview[bot] --- requirements_test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements_test.txt b/requirements_test.txt index 11e5f87c..7eb91df9 100644 --- a/requirements_test.txt +++ b/requirements_test.txt @@ -2,7 +2,7 @@ black==19.10b0 coverage==5.5 flake8==3.8.4 flake8-docstrings==1.5.0 -pre-commit==2.10.1 +pre-commit==2.12.1 pylint==2.8.2 pydocstyle==6.0.0 pytest==6.2.3 From 7270a1c1ee4b96c604285b148aa360a407c65b44 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sun, 2 May 2021 11:53:45 +0000 Subject: [PATCH 09/22] Bump flake8 from 3.8.4 to 3.9.1 Bumps [flake8](https://gitlab.com/pycqa/flake8) from 3.8.4 to 3.9.1. - [Release notes](https://gitlab.com/pycqa/flake8/tags) - [Commits](https://gitlab.com/pycqa/flake8/compare/3.8.4...3.9.1) Signed-off-by: dependabot-preview[bot] --- requirements_test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements_test.txt b/requirements_test.txt index 11e5f87c..664123f8 100644 --- a/requirements_test.txt +++ b/requirements_test.txt @@ -1,6 +1,6 @@ black==19.10b0 coverage==5.5 -flake8==3.8.4 +flake8==3.9.1 flake8-docstrings==1.5.0 pre-commit==2.10.1 pylint==2.8.2 From d8cf932672a6ac0b4db9d2dfaa1a2ef312b0c448 Mon Sep 17 00:00:00 2001 From: Kevin Fronczak Date: Sun, 2 May 2021 07:59:10 -0400 Subject: [PATCH 10/22] Update dependabot.yml --- .github/dependabot.yml | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 4ed0c3a3..aff9cf9c 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -7,27 +7,3 @@ updates: open-pull-requests-limit: 10 reviewers: - fronzbot - ignore: - - dependency-name: black - versions: - - 21.4b0 - - 21.4b1 - - dependency-name: pylint - versions: - - 2.7.1 - - 2.7.2 - - 2.7.3 - - 2.7.4 - - 2.8.1 - - dependency-name: pre-commit - versions: - - 2.10.0 - - 2.11.0 - - 2.11.1 - - 2.12.0 - - dependency-name: flake8 - versions: - - 3.9.0 - - dependency-name: pygments - versions: - - 2.8.1 From c1dc53862736c34e9910d71800244b4f067ea6b3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 2 May 2021 12:07:08 +0000 Subject: [PATCH 11/22] Bump flake8-docstrings from 1.5.0 to 1.6.0 Bumps [flake8-docstrings](https://gitlab.com/pycqa/flake8-docstrings) from 1.5.0 to 1.6.0. - [Release notes](https://gitlab.com/pycqa/flake8-docstrings/tags) - [Changelog](https://gitlab.com/pycqa/flake8-docstrings/blob/master/HISTORY.rst) - [Commits](https://gitlab.com/pycqa/flake8-docstrings/compare/1.5.0...1.6.0) Signed-off-by: dependabot[bot] --- requirements_test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements_test.txt b/requirements_test.txt index 8bdce7a7..580fc50a 100644 --- a/requirements_test.txt +++ b/requirements_test.txt @@ -1,7 +1,7 @@ black==19.10b0 coverage==5.5 flake8==3.9.1 -flake8-docstrings==1.5.0 +flake8-docstrings==1.6.0 pre-commit==2.12.1 pylint==2.8.2 pydocstyle==6.0.0 From 6b4fba902b60c3c3a1d166d34dc43165d33a2c63 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 2 May 2021 12:07:11 +0000 Subject: [PATCH 12/22] Bump pygments from 2.8.0 to 2.8.1 Bumps [pygments](https://github.com/pygments/pygments) from 2.8.0 to 2.8.1. - [Release notes](https://github.com/pygments/pygments/releases) - [Changelog](https://github.com/pygments/pygments/blob/2.8.1/CHANGES) - [Commits](https://github.com/pygments/pygments/compare/2.8.0...2.8.1) Signed-off-by: dependabot[bot] --- requirements_test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements_test.txt b/requirements_test.txt index 8bdce7a7..1f4353f8 100644 --- a/requirements_test.txt +++ b/requirements_test.txt @@ -10,5 +10,5 @@ pytest-cov==2.11.1 pytest-sugar==0.9.4 pytest-timeout==1.4.2 restructuredtext-lint==1.3.2 -pygments==2.8.0 +pygments==2.8.1 testtools>=2.4.0 From 725debaebe49f90c7c72699e1c88ae8b1a8bf7cd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 4 May 2021 08:22:45 +0000 Subject: [PATCH 13/22] Bump pygments from 2.8.1 to 2.9.0 Bumps [pygments](https://github.com/pygments/pygments) from 2.8.1 to 2.9.0. - [Release notes](https://github.com/pygments/pygments/releases) - [Changelog](https://github.com/pygments/pygments/blob/master/CHANGES) - [Commits](https://github.com/pygments/pygments/compare/2.8.1...2.9.0) Signed-off-by: dependabot[bot] --- requirements_test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements_test.txt b/requirements_test.txt index e3649056..7d336bf5 100644 --- a/requirements_test.txt +++ b/requirements_test.txt @@ -10,5 +10,5 @@ pytest-cov==2.11.1 pytest-sugar==0.9.4 pytest-timeout==1.4.2 restructuredtext-lint==1.3.2 -pygments==2.8.1 +pygments==2.9.0 testtools>=2.4.0 From 29c6d269a21b65cbf299dbd6cb34f46ba29fd6e2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 5 May 2021 08:22:56 +0000 Subject: [PATCH 14/22] Bump pytest from 6.2.3 to 6.2.4 Bumps [pytest](https://github.com/pytest-dev/pytest) from 6.2.3 to 6.2.4. - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest/compare/6.2.3...6.2.4) Signed-off-by: dependabot[bot] --- requirements_test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements_test.txt b/requirements_test.txt index e3649056..b426748c 100644 --- a/requirements_test.txt +++ b/requirements_test.txt @@ -5,7 +5,7 @@ flake8-docstrings==1.6.0 pre-commit==2.12.1 pylint==2.8.2 pydocstyle==6.0.0 -pytest==6.2.3 +pytest==6.2.4 pytest-cov==2.11.1 pytest-sugar==0.9.4 pytest-timeout==1.4.2 From 1f6eb8bd874ace2ad2391031e5b0dfa5bcd1e70b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Aug 2021 18:11:07 +0000 Subject: [PATCH 15/22] Bump pygments from 2.9.0 to 2.10.0 Bumps [pygments](https://github.com/pygments/pygments) from 2.9.0 to 2.10.0. - [Release notes](https://github.com/pygments/pygments/releases) - [Changelog](https://github.com/pygments/pygments/blob/master/CHANGES) - [Commits](https://github.com/pygments/pygments/compare/2.9.0...2.10.0) --- updated-dependencies: - dependency-name: pygments dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- requirements_test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements_test.txt b/requirements_test.txt index cb6b20a2..ee041277 100644 --- a/requirements_test.txt +++ b/requirements_test.txt @@ -10,5 +10,5 @@ pytest-cov==2.11.1 pytest-sugar==0.9.4 pytest-timeout==1.4.2 restructuredtext-lint==1.3.2 -pygments==2.9.0 +pygments==2.10.0 testtools>=2.4.0 From c37ec5874e7c4219a45b9fd287ee6d1ec196fe4b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Aug 2021 18:10:44 +0000 Subject: [PATCH 16/22] Bump pylint from 2.8.2 to 2.10.2 Bumps [pylint](https://github.com/PyCQA/pylint) from 2.8.2 to 2.10.2. - [Release notes](https://github.com/PyCQA/pylint/releases) - [Changelog](https://github.com/PyCQA/pylint/blob/main/ChangeLog) - [Commits](https://github.com/PyCQA/pylint/compare/v2.8.2...v2.10.2) --- updated-dependencies: - dependency-name: pylint dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- requirements_test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements_test.txt b/requirements_test.txt index cb6b20a2..8bd95e58 100644 --- a/requirements_test.txt +++ b/requirements_test.txt @@ -3,7 +3,7 @@ coverage==5.5 flake8==3.9.1 flake8-docstrings==1.6.0 pre-commit==2.12.1 -pylint==2.8.2 +pylint==2.10.2 pydocstyle==6.0.0 pytest==6.2.4 pytest-cov==2.11.1 From 4a660fc6027a0335c29dbc8dfbb5544b995f98c3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 12 Sep 2021 11:51:12 +0000 Subject: [PATCH 17/22] Bump pytest from 6.2.4 to 6.2.5 Bumps [pytest](https://github.com/pytest-dev/pytest) from 6.2.4 to 6.2.5. - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest/compare/6.2.4...6.2.5) --- updated-dependencies: - dependency-name: pytest dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- requirements_test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements_test.txt b/requirements_test.txt index 79d38134..00415185 100644 --- a/requirements_test.txt +++ b/requirements_test.txt @@ -5,7 +5,7 @@ flake8-docstrings==1.6.0 pre-commit==2.12.1 pylint==2.10.2 pydocstyle==6.0.0 -pytest==6.2.4 +pytest==6.2.5 pytest-cov==2.11.1 pytest-sugar==0.9.4 pytest-timeout==1.4.2 From 3d9220c83f12fec4d667a50be3bbfd2c6aa26aa0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 12 Sep 2021 11:51:41 +0000 Subject: [PATCH 18/22] Bump pre-commit from 2.12.1 to 2.15.0 Bumps [pre-commit](https://github.com/pre-commit/pre-commit) from 2.12.1 to 2.15.0. - [Release notes](https://github.com/pre-commit/pre-commit/releases) - [Changelog](https://github.com/pre-commit/pre-commit/blob/master/CHANGELOG.md) - [Commits](https://github.com/pre-commit/pre-commit/compare/v2.12.1...v2.15.0) --- updated-dependencies: - dependency-name: pre-commit dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- requirements_test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements_test.txt b/requirements_test.txt index 79d38134..0d59d921 100644 --- a/requirements_test.txt +++ b/requirements_test.txt @@ -2,7 +2,7 @@ black==19.10b0 coverage==5.5 flake8==3.9.1 flake8-docstrings==1.6.0 -pre-commit==2.12.1 +pre-commit==2.15.0 pylint==2.10.2 pydocstyle==6.0.0 pytest==6.2.4 From eb89c5b1f9ae31faeeed79963d29fe3f5dc1f1d3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Oct 2021 18:17:56 +0000 Subject: [PATCH 19/22] Bump pytest-cov from 2.11.1 to 3.0.0 Bumps [pytest-cov](https://github.com/pytest-dev/pytest-cov) from 2.11.1 to 3.0.0. - [Release notes](https://github.com/pytest-dev/pytest-cov/releases) - [Changelog](https://github.com/pytest-dev/pytest-cov/blob/master/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest-cov/compare/v2.11.1...v3.0.0) --- updated-dependencies: - dependency-name: pytest-cov dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- requirements_test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements_test.txt b/requirements_test.txt index 64a8a770..c10bab75 100644 --- a/requirements_test.txt +++ b/requirements_test.txt @@ -6,7 +6,7 @@ pre-commit==2.15.0 pylint==2.10.2 pydocstyle==6.0.0 pytest==6.2.5 -pytest-cov==2.11.1 +pytest-cov==3.0.0 pytest-sugar==0.9.4 pytest-timeout==1.4.2 restructuredtext-lint==1.3.2 From 9a7fe6194fbe6712f7f34611a3ba51cda083a68a Mon Sep 17 00:00:00 2001 From: magicalyak Date: Sat, 11 Dec 2021 08:05:18 -0500 Subject: [PATCH 20/22] doorbell add --- blinkpy/blinkpy.py | 36 ++++++++++++++- blinkpy/camera.py | 39 ++++++++++++++++ blinkpy/sync_module.py | 87 +++++++++++++++++++++++++++++++++-- tests/test_blinkpy.py | 96 ++++++++++++++++++++++++++++++++++++++- tests/test_cameras.py | 13 +++++- tests/test_sync_module.py | 21 ++++++++- 6 files changed, 283 insertions(+), 9 deletions(-) diff --git a/blinkpy/blinkpy.py b/blinkpy/blinkpy.py index eda5eb3d..c3168751 100644 --- a/blinkpy/blinkpy.py +++ b/blinkpy/blinkpy.py @@ -23,7 +23,7 @@ from slugify import slugify from blinkpy import api -from blinkpy.sync_module import BlinkSyncModule, BlinkOwl +from blinkpy.sync_module import BlinkSyncModule, BlinkOwl, BlinkLotus from blinkpy.helpers import util from blinkpy.helpers.constants import ( DEFAULT_MOTION_INTERVAL, @@ -180,6 +180,36 @@ def setup_owls(self): self.network_ids.extend(network_list) return camera_list + def setup_lotus(self): + """Check for doorbells cameras.""" + network_list = [] + camera_list = [] + try: + for lotus in self.homescreen["doorbells"]: + name = lotus["name"] + network_id = str(lotus["network_id"]) + if network_id in self.network_ids: + camera_list.append( + { + network_id: { + "name": name, + "id": network_id, + "type": "doorbell", + } + } + ) + continue + if lotus["onboarded"]: + network_list.append(str(network_id)) + self.sync[name] = BlinkLotus(self, name, network_id, lotus) + self.sync[name].start() + except KeyError: + # No sync-less devices found + pass + + self.network_ids.extend(network_list) + return camera_list + def setup_camera_list(self): """Create camera list for onboarded networks.""" all_cameras = {} @@ -194,9 +224,13 @@ def setup_camera_list(self): {"name": camera["name"], "id": camera["id"]} ) mini_cameras = self.setup_owls() + lotus_cameras = self.setup_lotus() for camera in mini_cameras: for network, camera_info in camera.items(): all_cameras[network].append(camera_info) + for camera in lotus_cameras: + for network, camera_info in camera.items(): + all_cameras[network].append(camera_info) return all_cameras except (KeyError, TypeError): _LOGGER.error("Unable to retrieve cameras from response %s", response) diff --git a/blinkpy/camera.py b/blinkpy/camera.py index 6c752962..29ceec8e 100644 --- a/blinkpy/camera.py +++ b/blinkpy/camera.py @@ -273,3 +273,42 @@ def get_liveview(self): server_split[0] = "rtsps:" link = "".join(server_split) return link + + +class BlinkDoorbell(BlinkCamera): + """Define a class for a Blink Doorbell camera.""" + + def __init__(self, sync): + """Initialize a Blink Doorbell.""" + super().__init__(sync) + self.camera_type = "doorbell" + + @property + def arm(self): + """Return camera arm status.""" + return self.sync.arm + + @arm.setter + def arm(self, value): + """Set camera arm status.""" + _LOGGER.warning( + "Individual camera motion detection enable/disable for Blink Doorbell is unsupported at this time." + ) + + def snap_picture(self): + """Snap picture for a blink doorbell camera.""" + url = f"{self.sync.urls.base_url}/api/v1/accounts/{self.sync.blink.account_id}/networks/{self.network_id}/lotus/{self.camera_id}/thumbnail" + return api.http_post(self.sync.blink, url) + + def get_sensor_info(self): + """Get sensor info for blink doorbell camera.""" + + def get_liveview(self): + """Get liveview link.""" + url = f"{self.sync.urls.base_url}/api/v1/accounts/{self.sync.blink.account_id}/networks/{self.network_id}/lotus/{self.camera_id}/liveview" + response = api.http_post(self.sync.blink, url) + server = response["server"] + server_split = server.split(":") + server_split[0] = "rtsps:" + link = "".join(server_split) + return link diff --git a/blinkpy/sync_module.py b/blinkpy/sync_module.py index 4e317569..2730de5a 100644 --- a/blinkpy/sync_module.py +++ b/blinkpy/sync_module.py @@ -4,7 +4,7 @@ from requests.structures import CaseInsensitiveDict from blinkpy import api -from blinkpy.camera import BlinkCamera, BlinkCameraMini +from blinkpy.camera import BlinkCamera, BlinkCameraMini, BlinkDoorbell from blinkpy.helpers.util import time_to_seconds from blinkpy.helpers.constants import ONLINE @@ -126,11 +126,14 @@ def update_cameras(self, camera_type=BlinkCamera): name = camera_config["name"] self.motion[name] = False owl_info = self.get_owl_info(name) + lotus_info = self.get_lotus_info(name) if blink_camera_type == "mini": camera_type = BlinkCameraMini + if blink_camera_type == "lotus": + camera_type = BlinkDoorbell self.cameras[name] = camera_type(self) camera_info = self.get_camera_info( - camera_config["id"], owl_info=owl_info + camera_config["id"], owl_info=owl_info, lotus_info=lotus_info ) self.cameras[name].update(camera_info, force_cache=True, force=True) @@ -149,6 +152,16 @@ def get_owl_info(self, name): pass return None + def get_lotus_info(self, name): + """Extract lotus information.""" + try: + for doorbell in self.blink.homescreen["doorbells"]: + if doorbell["name"] == name: + return doorbell + except (TypeError, KeyError): + pass + return None + def get_events(self, **kwargs): """Retrieve events from server.""" force = kwargs.pop("force", False) @@ -164,6 +177,9 @@ def get_camera_info(self, camera_id, **kwargs): owl = kwargs.get("owl_info", None) if owl is not None: return owl + lotus = kwargs.get("lotus_info", None) + if lotus is not None: + return lotus response = api.request_camera_info(self.blink, self.network_id, camera_id) try: return response["camera"][0] @@ -190,7 +206,9 @@ def refresh(self, force_cache=False): for camera_name in self.cameras.keys(): camera_id = self.cameras[camera_name].camera_id camera_info = self.get_camera_info( - camera_id, owl_info=self.get_owl_info(camera_name) + camera_id, + owl_info=self.get_owl_info(camera_name), + lotus_info=self.get_lotus_info(camera_name), ) self.cameras[camera_name].update(camera_info, force_cache=force_cache) self.available = True @@ -294,3 +312,66 @@ def network_info(self): @network_info.setter def network_info(self, value): """Set network_info property.""" + + +class BlinkLotus(BlinkSyncModule): + """Representation of a sync-less device.""" + + def __init__(self, blink, name, network_id, response): + """Initialize a sync-less object.""" + cameras = [{"name": name, "id": response["id"]}] + super().__init__(blink, name, network_id, cameras) + self.sync_id = response["id"] + self.serial = response["serial"] + self.status = response["enabled"] + if not self.serial: + self.serial = f"{network_id}-{self.sync_id}" + + def sync_initialize(self): + """Initialize a sync-less module.""" + self.summary = { + "id": self.sync_id, + "name": self.name, + "serial": self.serial, + "status": self.status, + "onboarded": True, + "account_id": self.blink.account_id, + "network_id": self.network_id, + } + return self.summary + + def update_cameras(self, camera_type=BlinkDoorbell): + """Update sync-less cameras.""" + return super().update_cameras(camera_type=BlinkDoorbell) + + def get_camera_info(self, camera_id, **kwargs): + """Retrieve camera information.""" + try: + for doorbell in self.blink.homescreen["doorbells"]: + if doorbell["name"] == self.name: + self.status = doorbell["enabled"] + return doorbell + except (TypeError, KeyError): + pass + return None + + def get_network_info(self): + """Get network info for sync-less module.""" + return True + + @property + def network_info(self): + """Format lotus response to resemble sync module.""" + return { + "network": { + "id": self.network_id, + "name": self.name, + "armed": self.status, + "sync_module_error": False, + "account_id": self.blink.account_id, + } + } + + @network_info.setter + def network_info(self, value): + """Set network_info property.""" diff --git a/tests/test_blinkpy.py b/tests/test_blinkpy.py index c632215d..e8841798 100644 --- a/tests/test_blinkpy.py +++ b/tests/test_blinkpy.py @@ -9,7 +9,7 @@ import unittest from unittest import mock from blinkpy.blinkpy import Blink, BlinkSetupError -from blinkpy.sync_module import BlinkOwl +from blinkpy.sync_module import BlinkOwl, BlinkLotus from blinkpy.helpers.constants import __version__ @@ -164,10 +164,12 @@ def test_setup_prompt_2fa(self, mock_key): @mock.patch("blinkpy.blinkpy.Blink.setup_camera_list") @mock.patch("blinkpy.api.request_networks") @mock.patch("blinkpy.blinkpy.Blink.setup_owls") - def test_setup_post_verify(self, mock_owl, mock_networks, mock_camera): + @mock.patch("blinkpy.blinkpy.Blink.setup_lotus") + def test_setup_post_verify(self, mock_lotus, mock_owl, mock_networks, mock_camera): """Test setup after verification.""" self.blink.available = False self.blink.key_required = True + mock_lotus.return_value = True mock_owl.return_value = True mock_networks.return_value = { "summary": {"foo": {"onboarded": False, "name": "bar"}} @@ -288,6 +290,96 @@ def test_blink_mini_attached_to_sync(self, mock_usage): result, {"1234": [{"name": "foo", "id": "1234", "type": "mini"}]} ) + @mock.patch("blinkpy.blinkpy.BlinkLotus.start") + def test_initialize_blink_doorbells(self, mock_start): + """Test blink doorbell initialization.""" + mock_start.return_value = True + self.blink.homescreen = { + "doorbells": [ + { + "enabled": False, + "id": 1, + "name": "foo", + "network_id": 2, + "onboarded": True, + "status": "online", + "thumbnail": "/foo/bar", + "serial": "1234", + }, + { + "enabled": True, + "id": 3, + "name": "bar", + "network_id": 4, + "onboarded": True, + "status": "online", + "thumbnail": "/foo/bar", + "serial": "abcd", + }, + ] + } + self.blink.sync = {} + self.blink.setup_lotus() + self.assertEqual(self.blink.sync["foo"].__class__, BlinkLotus) + self.assertEqual(self.blink.sync["bar"].__class__, BlinkLotus) + self.assertEqual(self.blink.sync["foo"].arm, False) + self.assertEqual(self.blink.sync["bar"].arm, True) + self.assertEqual(self.blink.sync["foo"].name, "foo") + self.assertEqual(self.blink.sync["bar"].name, "bar") + + # def test_blink_doorbell_cameras_returned(self): + # """Test that blink doorbell cameras are found if attached to sync module.""" + # self.blink.network_ids = ["1234"] + # self.blink.homescreen = { + # "doorbells": [ + # { + # "id": 1, + # "name": "foo", + # "network_id": 1234, + # "onboarded": True, + # "enabled": True, + # "status": "online", + # "thumbnail": "/foo/bar", + # "serial": "abc123", + # } + # ] + # } + # result = self.blink.setup_lotus() + # self.assertEqual(self.blink.network_ids, ["1234"]) + # self.assertEqual( + # result, [{"1234": {"name": "foo", "id": "1234", "type": "doorbell"}}] + # ) + + # self.blink.network_ids = [] + # self.blink.get_homescreen() + # result = self.blink.setup_lotus() + # self.assertEqual(self.blink.network_ids, []) + # self.assertEqual(result, []) + + @mock.patch("blinkpy.api.request_camera_usage") + def test_blink_doorbell_attached_to_sync(self, mock_usage): + """Test that blink doorbell cameras are properly attached to sync module.""" + self.blink.network_ids = ["1234"] + self.blink.homescreen = { + "doorbells": [ + { + "id": 1, + "name": "foo", + "network_id": 1234, + "onboarded": True, + "enabled": True, + "status": "online", + "thumbnail": "/foo/bar", + "serial": "abc123", + } + ] + } + mock_usage.return_value = {"networks": [{"cameras": [], "network_id": 1234}]} + result = self.blink.setup_camera_list() + self.assertEqual( + result, {"1234": [{"name": "foo", "id": "1234", "type": "doorbell"}]} + ) + class MockSync: """Mock sync module class.""" diff --git a/tests/test_cameras.py b/tests/test_cameras.py index 8cf7d76f..e482a72a 100644 --- a/tests/test_cameras.py +++ b/tests/test_cameras.py @@ -11,7 +11,7 @@ from blinkpy.blinkpy import Blink from blinkpy.helpers.util import BlinkURLHandler from blinkpy.sync_module import BlinkSyncModule -from blinkpy.camera import BlinkCamera, BlinkCameraMini +from blinkpy.camera import BlinkCamera, BlinkCameraMini, BlinkDoorbell CAMERA_CFG = { @@ -177,9 +177,20 @@ def test_mini_missing_attributes(self, mock_resp): for key in attr: self.assertEqual(attr[key], None) + def test_doorbell_missing_attributes(self, mock_resp): + """Test that attributes return None if missing.""" + camera = BlinkDoorbell(self.blink.sync) + self.blink.sync.network_id = None + self.blink.sync.name = None + attr = camera.attributes + for key in attr: + self.assertEqual(attr[key], None) + def test_camera_stream(self, mock_resp): """Test that camera stream returns correct url.""" mock_resp.return_value = {"server": "rtsps://foo.bar"} mini_camera = BlinkCameraMini(self.blink.sync["test"]) + doorbell_camera = BlinkDoorbell(self.blink.sync["test"]) self.assertEqual(self.camera.get_liveview(), "rtsps://foo.bar") self.assertEqual(mini_camera.get_liveview(), "rtsps://foo.bar") + self.assertEqual(doorbell_camera.get_liveview(), "rtsps://foo.bar") diff --git a/tests/test_sync_module.py b/tests/test_sync_module.py index fc18a51e..67d52061 100644 --- a/tests/test_sync_module.py +++ b/tests/test_sync_module.py @@ -4,8 +4,8 @@ from blinkpy.blinkpy import Blink from blinkpy.helpers.util import BlinkURLHandler -from blinkpy.sync_module import BlinkSyncModule, BlinkOwl -from blinkpy.camera import BlinkCamera, BlinkCameraMini +from blinkpy.sync_module import BlinkSyncModule, BlinkOwl, BlinkLotus +from blinkpy.camera import BlinkCamera, BlinkCameraMini, BlinkDoorbell @mock.patch("blinkpy.auth.Auth.query") @@ -292,3 +292,20 @@ def test_owl_start(self, mock_resp): self.assertTrue(owl.start()) self.assertTrue("foo" in owl.cameras) self.assertEqual(owl.cameras["foo"].__class__, BlinkCameraMini) + + def test_lotus_start(self, mock_resp): + """Test doorbell instantiation.""" + response = { + "name": "doo", + "id": 3, + "serial": "doobar123", + "enabled": True, + "network_id": 1, + "thumbnail": "/foo/bar", + } + self.blink.last_refresh = None + self.blink.homescreen = {"doorbells": [response]} + lotus = BlinkLotus(self.blink, "doo", 1234, response) + self.assertTrue(lotus.start()) + self.assertTrue("doo" in lotus.cameras) + self.assertEqual(lotus.cameras["doo"].__class__, BlinkDoorbell) From ed9374f769b7d525df8494f2a3a8cd17437e8437 Mon Sep 17 00:00:00 2001 From: Kevin Fronczak Date: Sat, 11 Dec 2021 22:33:15 -0500 Subject: [PATCH 21/22] version bump --- blinkpy/helpers/constants.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blinkpy/helpers/constants.py b/blinkpy/helpers/constants.py index 4cc5b7b1..7bb48508 100644 --- a/blinkpy/helpers/constants.py +++ b/blinkpy/helpers/constants.py @@ -4,7 +4,7 @@ MAJOR_VERSION = 0 MINOR_VERSION = 18 -PATCH_VERSION = "0.dev0" +PATCH_VERSION = 0 __version__ = f"{MAJOR_VERSION}.{MINOR_VERSION}.{PATCH_VERSION}" From 35c99ac9ad1e528594eb82804251a732872bd0e6 Mon Sep 17 00:00:00 2001 From: Kevin Fronczak Date: Sat, 11 Dec 2021 22:37:16 -0500 Subject: [PATCH 22/22] Add 0.18.0 release notes --- CHANGES.rst | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 37756920..3678aa38 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,6 +4,29 @@ Changelog A list of changes between each release +0.18.0 (2021-12-11) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +**Bugfixes:** + +- None + +**New Features:** + +- Support for Blink Doorbell (`@magicalyak `__) + +**Other:** + +- Bump pytest-cov to 3.0.0 +- Bump pre-commit to 2.15.0 +- Bump pytest to 6.2.5 +- Bump pylint to 2.10.2 +- Bump pygments to 2.10.0 +- Bump flake8-docstrings to 1.6.0 +- Bump pydocstyle to 6.0.0 +- Bump coverage to 5.5 + + 0.17.1 (2021-02-18) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -15,14 +38,17 @@ A list of changes between each release ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ **Bugfixes:** + - Fix video downloading bug (`#424 `__) - Fix repeated authorization email bug (`#432 `__ and `#428 `__) **New Features:** + - Add logout method (`#429 `__) - Add camera record method (`#430 `__) **Other:** + - Add debug script to main repo to help with general debug - Upgrade login endpoint from v4 to v5 - Add python 3.9 support