wyzeapy 0.5.28__tar.gz → 0.5.29__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- wyzeapy-0.5.29/.coveragerc +84 -0
- wyzeapy-0.5.29/.github/CODEOWNERS +13 -0
- wyzeapy-0.5.29/.github/dependabot.yml +12 -0
- wyzeapy-0.5.29/.github/workflows/codeql.yml +59 -0
- wyzeapy-0.5.29/.github/workflows/lint.yml +34 -0
- wyzeapy-0.5.29/.github/workflows/pre-release.yml +37 -0
- wyzeapy-0.5.29/.github/workflows/publish.yml +36 -0
- wyzeapy-0.5.29/.github/workflows/test.yml +46 -0
- wyzeapy-0.5.29/.gitignore +43 -0
- wyzeapy-0.5.29/.reuse/dep5 +21 -0
- wyzeapy-0.5.29/CHANGELOG.md +145 -0
- wyzeapy-0.5.29/PKG-INFO +13 -0
- wyzeapy-0.5.29/README.md +118 -0
- wyzeapy-0.5.29/bin/act +0 -0
- wyzeapy-0.5.29/docs/index.html +7 -0
- wyzeapy-0.5.29/docs/search.js +46 -0
- wyzeapy-0.5.29/docs/wyzeapy/const.html +507 -0
- wyzeapy-0.5.29/docs/wyzeapy/crypto.html +344 -0
- wyzeapy-0.5.29/docs/wyzeapy/exceptions.html +462 -0
- wyzeapy-0.5.29/docs/wyzeapy/payload_factory.html +1533 -0
- wyzeapy-0.5.29/docs/wyzeapy/services/base_service.html +2104 -0
- wyzeapy-0.5.29/docs/wyzeapy/services/bulb_service.html +1194 -0
- wyzeapy-0.5.29/docs/wyzeapy/services/camera_service.html +1246 -0
- wyzeapy-0.5.29/docs/wyzeapy/services/hms_service.html +656 -0
- wyzeapy-0.5.29/docs/wyzeapy/services/lock_service.html +653 -0
- wyzeapy-0.5.29/docs/wyzeapy/services/sensor_service.html +626 -0
- wyzeapy-0.5.29/docs/wyzeapy/services/switch_service.html +651 -0
- wyzeapy-0.5.29/docs/wyzeapy/services/thermostat_service.html +1245 -0
- wyzeapy-0.5.29/docs/wyzeapy/services/update_manager.html +1002 -0
- wyzeapy-0.5.29/docs/wyzeapy/services/wall_switch_service.html +897 -0
- wyzeapy-0.5.29/docs/wyzeapy/services.html +251 -0
- wyzeapy-0.5.29/docs/wyzeapy/types.html +2961 -0
- wyzeapy-0.5.29/docs/wyzeapy/utils.html +766 -0
- wyzeapy-0.5.29/docs/wyzeapy/wyze_auth_lib.html +1675 -0
- wyzeapy-0.5.29/docs/wyzeapy.html +2381 -0
- wyzeapy-0.5.29/pyproject.toml +31 -0
- wyzeapy-0.5.29/scripts/create_pre_release.sh +17 -0
- wyzeapy-0.5.29/src/wyzeapy/__init__.py +486 -0
- {wyzeapy-0.5.28 → wyzeapy-0.5.29}/src/wyzeapy/const.py +9 -4
- {wyzeapy-0.5.28 → wyzeapy-0.5.29}/src/wyzeapy/crypto.py +31 -2
- {wyzeapy-0.5.28 → wyzeapy-0.5.29}/src/wyzeapy/exceptions.py +11 -8
- {wyzeapy-0.5.28 → wyzeapy-0.5.29}/src/wyzeapy/payload_factory.py +177 -172
- wyzeapy-0.5.29/src/wyzeapy/services/__init__.py +3 -0
- {wyzeapy-0.5.28 → wyzeapy-0.5.29}/src/wyzeapy/services/base_service.py +333 -212
- {wyzeapy-0.5.28 → wyzeapy-0.5.29}/src/wyzeapy/services/bulb_service.py +67 -63
- wyzeapy-0.5.29/src/wyzeapy/services/camera_service.py +268 -0
- {wyzeapy-0.5.28 → wyzeapy-0.5.29}/src/wyzeapy/services/hms_service.py +8 -17
- {wyzeapy-0.5.28 → wyzeapy-0.5.29}/src/wyzeapy/services/lock_service.py +5 -3
- {wyzeapy-0.5.28 → wyzeapy-0.5.29}/src/wyzeapy/services/sensor_service.py +32 -11
- {wyzeapy-0.5.28 → wyzeapy-0.5.29}/src/wyzeapy/services/switch_service.py +6 -2
- {wyzeapy-0.5.28 → wyzeapy-0.5.29}/src/wyzeapy/services/thermostat_service.py +29 -15
- {wyzeapy-0.5.28 → wyzeapy-0.5.29}/src/wyzeapy/services/update_manager.py +38 -11
- {wyzeapy-0.5.28 → wyzeapy-0.5.29}/src/wyzeapy/services/wall_switch_service.py +18 -8
- {wyzeapy-0.5.28 → wyzeapy-0.5.29}/src/wyzeapy/types.py +20 -12
- {wyzeapy-0.5.28 → wyzeapy-0.5.29}/src/wyzeapy/utils.py +98 -17
- {wyzeapy-0.5.28 → wyzeapy-0.5.29}/src/wyzeapy/wyze_auth_lib.py +195 -37
- {wyzeapy-0.5.28/src/wyzeapy → wyzeapy-0.5.29}/tests/test_bulb_service.py +50 -42
- wyzeapy-0.5.29/tests/test_camera_service.py +393 -0
- {wyzeapy-0.5.28/src/wyzeapy → wyzeapy-0.5.29}/tests/test_hms_service.py +39 -29
- {wyzeapy-0.5.28/src/wyzeapy → wyzeapy-0.5.29}/tests/test_lock_service.py +43 -31
- wyzeapy-0.5.29/tests/test_payload_factory.py +137 -0
- {wyzeapy-0.5.28/src/wyzeapy → wyzeapy-0.5.29}/tests/test_sensor_service.py +47 -62
- {wyzeapy-0.5.28/src/wyzeapy → wyzeapy-0.5.29}/tests/test_switch_service.py +55 -44
- {wyzeapy-0.5.28/src/wyzeapy → wyzeapy-0.5.29}/tests/test_thermostat_service.py +40 -47
- wyzeapy-0.5.29/tests/test_types.py +160 -0
- wyzeapy-0.5.29/tests/test_update_manager.py +199 -0
- wyzeapy-0.5.29/tests/test_utils.py +217 -0
- {wyzeapy-0.5.28/src/wyzeapy → wyzeapy-0.5.29}/tests/test_wall_switch_service.py +44 -49
- wyzeapy-0.5.29/tests/test_wyze_auth_lib.py +482 -0
- wyzeapy-0.5.29/tests/test_wyzeapy.py +271 -0
- wyzeapy-0.5.29/uv.lock +838 -0
- wyzeapy-0.5.28/PKG-INFO +0 -16
- wyzeapy-0.5.28/pyproject.toml +0 -18
- wyzeapy-0.5.28/src/wyzeapy/__init__.py +0 -264
- wyzeapy-0.5.28/src/wyzeapy/services/camera_service.py +0 -182
- wyzeapy-0.5.28/src/wyzeapy/tests/test_camera_service.py +0 -180
- {wyzeapy-0.5.28 → wyzeapy-0.5.29}/LICENSES/GPL-3.0-only.txt +0 -0
- {wyzeapy-0.5.28/src/wyzeapy/services → wyzeapy-0.5.29/tests}/__init__.py +0 -0
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# Coverage configuration for wyzeapy
|
|
2
|
+
# This file configures coverage.py to measure code coverage during testing
|
|
3
|
+
|
|
4
|
+
[run]
|
|
5
|
+
# Source directory to measure coverage for
|
|
6
|
+
source = src/wyzeapy
|
|
7
|
+
|
|
8
|
+
# Files and directories to omit from coverage measurement
|
|
9
|
+
omit =
|
|
10
|
+
tests/*
|
|
11
|
+
*/test_*
|
|
12
|
+
*/__pycache__/*
|
|
13
|
+
*/venv/*
|
|
14
|
+
*/.venv/*
|
|
15
|
+
|
|
16
|
+
# Include branch coverage
|
|
17
|
+
branch = True
|
|
18
|
+
|
|
19
|
+
[report]
|
|
20
|
+
# Regexes for lines to exclude from consideration
|
|
21
|
+
exclude_lines =
|
|
22
|
+
# Have to re-enable the standard pragma
|
|
23
|
+
pragma: no cover
|
|
24
|
+
|
|
25
|
+
# Don't complain about missing debug-only code:
|
|
26
|
+
def __repr__
|
|
27
|
+
if self\.debug
|
|
28
|
+
if settings\.DEBUG
|
|
29
|
+
|
|
30
|
+
# Don't complain if tests don't hit defensive assertion code:
|
|
31
|
+
raise AssertionError
|
|
32
|
+
raise NotImplementedError
|
|
33
|
+
|
|
34
|
+
# Don't complain if non-runnable code isn't run:
|
|
35
|
+
if 0:
|
|
36
|
+
if __name__ == .__main__.:
|
|
37
|
+
if TYPE_CHECKING:
|
|
38
|
+
|
|
39
|
+
# Don't complain about abstract methods, they aren't run:
|
|
40
|
+
@(abc\.)?abstractmethod
|
|
41
|
+
@overload
|
|
42
|
+
|
|
43
|
+
# Don't complain about type checking imports
|
|
44
|
+
from typing import
|
|
45
|
+
|
|
46
|
+
# Don't complain about ellipsis in abstract methods
|
|
47
|
+
\.\.\.:
|
|
48
|
+
|
|
49
|
+
# Don't complain about type ignore comments
|
|
50
|
+
# type: ignore
|
|
51
|
+
# pragma: type: ignore
|
|
52
|
+
|
|
53
|
+
# Don't complain about pass statements
|
|
54
|
+
pass
|
|
55
|
+
|
|
56
|
+
# Don't complain about docstrings
|
|
57
|
+
^\s*""".*"""$
|
|
58
|
+
^\s*'''.*'''$
|
|
59
|
+
|
|
60
|
+
# Fail under this percentage
|
|
61
|
+
fail_under = 75
|
|
62
|
+
|
|
63
|
+
# Show missing line numbers
|
|
64
|
+
show_missing = True
|
|
65
|
+
|
|
66
|
+
# Skip covered files
|
|
67
|
+
skip_covered = False
|
|
68
|
+
|
|
69
|
+
# Precision for percentages
|
|
70
|
+
precision = 2
|
|
71
|
+
|
|
72
|
+
[html]
|
|
73
|
+
# Directory for HTML coverage reports
|
|
74
|
+
directory = htmlcov
|
|
75
|
+
|
|
76
|
+
# Show contexts (requires --contexts when running)
|
|
77
|
+
show_contexts = True
|
|
78
|
+
|
|
79
|
+
# Skip files with 100% coverage in HTML report
|
|
80
|
+
skip_covered = False
|
|
81
|
+
|
|
82
|
+
[xml]
|
|
83
|
+
# Output file for XML coverage reports
|
|
84
|
+
output = coverage.xml
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Lines starting with ‘#’ are comments.
|
|
2
|
+
# Each line is a file pattern followed by one or more owners.
|
|
3
|
+
|
|
4
|
+
# These owners will be the default owners for everything in the repo.
|
|
5
|
+
* @JoshuaMulliken
|
|
6
|
+
|
|
7
|
+
# Order is important. The last matching pattern has the most precedence.
|
|
8
|
+
# So if a pull request only touches javascript files, only these owners
|
|
9
|
+
# will be requested to review.
|
|
10
|
+
# *.js @octocat @github/js
|
|
11
|
+
|
|
12
|
+
# You can also use email addresses if you prefer.
|
|
13
|
+
# docs/* docs@example.com
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Adapted from https://raw.githubusercontent.com/actions/starter-workflows/main/code-scanning/codeql.yml
|
|
2
|
+
name: "CodeQL"
|
|
3
|
+
|
|
4
|
+
on:
|
|
5
|
+
workflow_dispatch:
|
|
6
|
+
push:
|
|
7
|
+
branches: [ "main" ]
|
|
8
|
+
pull_request:
|
|
9
|
+
# The branches below must be a subset of the branches above
|
|
10
|
+
branches: [ "main" ]
|
|
11
|
+
schedule:
|
|
12
|
+
- cron: '0 0 * * *'
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
analyze:
|
|
16
|
+
name: Analyze
|
|
17
|
+
# Runner size impacts CodeQL analysis time. To learn more, please see:
|
|
18
|
+
# - https://gh.io/recommended-hardware-resources-for-running-codeql
|
|
19
|
+
# - https://gh.io/supported-runners-and-hardware-resources
|
|
20
|
+
# - https://gh.io/using-larger-runners
|
|
21
|
+
# Consider using larger runners for possible analysis time improvements.
|
|
22
|
+
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
|
|
23
|
+
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
|
|
24
|
+
permissions:
|
|
25
|
+
actions: read
|
|
26
|
+
contents: read
|
|
27
|
+
security-events: write
|
|
28
|
+
|
|
29
|
+
strategy:
|
|
30
|
+
fail-fast: false
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
steps:
|
|
34
|
+
- name: Checkout repository
|
|
35
|
+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v3
|
|
36
|
+
|
|
37
|
+
# Initializes the CodeQL tools for scanning.
|
|
38
|
+
- name: Initialize CodeQL
|
|
39
|
+
uses: github/codeql-action/init@4e828ff8d448a8a6e532957b1811f387a63867e8 # v3
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
|
|
43
|
+
# If this step fails, then you should remove it and run the build manually (see below)
|
|
44
|
+
- name: Autobuild
|
|
45
|
+
uses: github/codeql-action/autobuild@4e828ff8d448a8a6e532957b1811f387a63867e8 # v3
|
|
46
|
+
|
|
47
|
+
# Command-line programs to run using the OS shell.
|
|
48
|
+
# See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
|
|
49
|
+
|
|
50
|
+
# If the Autobuild fails above, remove it and uncomment the following three lines.
|
|
51
|
+
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
|
|
52
|
+
|
|
53
|
+
# - run: |
|
|
54
|
+
# echo "Run, Build Application using script"
|
|
55
|
+
# ./location_of_script_within_repo/buildscript.sh
|
|
56
|
+
|
|
57
|
+
- name: Perform CodeQL Analysis
|
|
58
|
+
uses: github/codeql-action/analyze@4e828ff8d448a8a6e532957b1811f387a63867e8 # v3
|
|
59
|
+
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
name: Lint
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ main, develop ]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [ main, develop ]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
lint:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
|
|
15
|
+
|
|
16
|
+
- name: Set up Python
|
|
17
|
+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
|
|
18
|
+
with:
|
|
19
|
+
python-version: '3.11'
|
|
20
|
+
|
|
21
|
+
- name: Install uv
|
|
22
|
+
uses: astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # v6.4.3
|
|
23
|
+
|
|
24
|
+
- name: Install dependencies
|
|
25
|
+
run: |
|
|
26
|
+
uv pip install --system ruff
|
|
27
|
+
|
|
28
|
+
- name: Run ruff check
|
|
29
|
+
run: |
|
|
30
|
+
ruff check src/
|
|
31
|
+
|
|
32
|
+
- name: Run ruff format check
|
|
33
|
+
run: |
|
|
34
|
+
ruff format --check src/
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
name: Upload to Test PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- release/*
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
test-publish:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
|
|
14
|
+
|
|
15
|
+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
|
|
16
|
+
with:
|
|
17
|
+
python-version: "3.12"
|
|
18
|
+
|
|
19
|
+
- name: Install uv
|
|
20
|
+
uses: astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # v4
|
|
21
|
+
with:
|
|
22
|
+
enable-cache: true
|
|
23
|
+
|
|
24
|
+
- name: Install build & twine
|
|
25
|
+
run: uv pip install --system build twine
|
|
26
|
+
|
|
27
|
+
- name: Sync project dependencies
|
|
28
|
+
run: uv sync --all-groups
|
|
29
|
+
|
|
30
|
+
- name: Build distribution
|
|
31
|
+
run: uv run python -m build --sdist --wheel
|
|
32
|
+
|
|
33
|
+
- name: Publish package to Test PyPI
|
|
34
|
+
env:
|
|
35
|
+
TWINE_USERNAME: "__token__"
|
|
36
|
+
TWINE_PASSWORD: "${{ secrets.TEST_PYPI_TOKEN }}"
|
|
37
|
+
run: uv run twine upload --repository-url https://test.pypi.org/legacy/ dist/*
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
publish:
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
|
|
13
|
+
|
|
14
|
+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
|
|
15
|
+
with:
|
|
16
|
+
python-version: "3.12"
|
|
17
|
+
|
|
18
|
+
- name: Install uv
|
|
19
|
+
uses: astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # v4
|
|
20
|
+
with:
|
|
21
|
+
enable-cache: true
|
|
22
|
+
|
|
23
|
+
- name: Install build & twine
|
|
24
|
+
run: uv pip install --system build twine
|
|
25
|
+
|
|
26
|
+
- name: Sync project dependencies
|
|
27
|
+
run: uv sync --all-groups
|
|
28
|
+
|
|
29
|
+
- name: Build distribution
|
|
30
|
+
run: uv run python -m build --sdist --wheel
|
|
31
|
+
|
|
32
|
+
- name: Publish package to PyPI
|
|
33
|
+
env:
|
|
34
|
+
TWINE_USERNAME: "__token__"
|
|
35
|
+
TWINE_PASSWORD: "${{ secrets.PYPI_TOKEN }}"
|
|
36
|
+
run: uv run twine upload dist/*
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
name: Test
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ main, develop ]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [ main, develop ]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
test:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
strategy:
|
|
13
|
+
matrix:
|
|
14
|
+
python-version: ['3.11', '3.12']
|
|
15
|
+
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
|
|
18
|
+
|
|
19
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
20
|
+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
|
|
21
|
+
with:
|
|
22
|
+
python-version: ${{ matrix.python-version }}
|
|
23
|
+
|
|
24
|
+
- name: Install uv
|
|
25
|
+
uses: astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # v6.4.3
|
|
26
|
+
|
|
27
|
+
- name: Install dependencies
|
|
28
|
+
run: |
|
|
29
|
+
uv pip install --system -e .
|
|
30
|
+
uv pip install --system pytest pytest-asyncio coverage
|
|
31
|
+
|
|
32
|
+
- name: Run tests with coverage
|
|
33
|
+
run: |
|
|
34
|
+
coverage run -m pytest tests/ -v
|
|
35
|
+
coverage report
|
|
36
|
+
|
|
37
|
+
- name: Generate coverage report
|
|
38
|
+
run: |
|
|
39
|
+
coverage xml
|
|
40
|
+
|
|
41
|
+
- name: Upload coverage reports to Codecov
|
|
42
|
+
uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 # v4
|
|
43
|
+
if: matrix.python-version == '3.11'
|
|
44
|
+
with:
|
|
45
|
+
file: ./coverage.xml
|
|
46
|
+
fail_ci_if_error: false
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# SPDX-FileCopyrightText: 2021 Mulliken, LLC <katie@mulliken.net>
|
|
2
|
+
#
|
|
3
|
+
# SPDX-License-Identifier: GPL-3.0-only
|
|
4
|
+
|
|
5
|
+
/test.py
|
|
6
|
+
/.idea/
|
|
7
|
+
/.scannerwork/
|
|
8
|
+
.venv
|
|
9
|
+
__pycache__
|
|
10
|
+
dist/
|
|
11
|
+
.dccache
|
|
12
|
+
.env
|
|
13
|
+
|
|
14
|
+
# Coverage reports
|
|
15
|
+
.coverage
|
|
16
|
+
.coverage.*
|
|
17
|
+
htmlcov/
|
|
18
|
+
coverage.xml
|
|
19
|
+
*.cover
|
|
20
|
+
.hypothesis/
|
|
21
|
+
.pytest_cache/
|
|
22
|
+
|
|
23
|
+
# Testing
|
|
24
|
+
.tox/
|
|
25
|
+
.nox/
|
|
26
|
+
.cache
|
|
27
|
+
nosetests.xml
|
|
28
|
+
coverage/
|
|
29
|
+
|
|
30
|
+
# Build artifacts
|
|
31
|
+
build/
|
|
32
|
+
*.egg-info/
|
|
33
|
+
*.egg
|
|
34
|
+
|
|
35
|
+
# IDE
|
|
36
|
+
.vscode/
|
|
37
|
+
*.swp
|
|
38
|
+
*.swo
|
|
39
|
+
*~
|
|
40
|
+
|
|
41
|
+
# OS
|
|
42
|
+
.DS_Store
|
|
43
|
+
Thumbs.db
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
|
2
|
+
Upstream-Name: wyzeapy
|
|
3
|
+
Upstream-Contact: Mulliken LLC <katie@mulliken.net>
|
|
4
|
+
Source: https://github.com/JoshuaMulliken/wyzeapy
|
|
5
|
+
|
|
6
|
+
# Sample paragraph, commented out:
|
|
7
|
+
#
|
|
8
|
+
# Files: src/*
|
|
9
|
+
# Copyright: $YEAR $NAME <$CONTACT>
|
|
10
|
+
# License: ...
|
|
11
|
+
Files: src/*
|
|
12
|
+
Copyright: 2021 Mulliken, LLC <katie@mulliken.net>
|
|
13
|
+
License: GPL-3.0-only
|
|
14
|
+
|
|
15
|
+
Files: docs/*
|
|
16
|
+
Copyright: 2021 Mulliken, LLC <katie@mulliken.net>
|
|
17
|
+
License: GPL-3.0-only
|
|
18
|
+
|
|
19
|
+
Files: tests/*
|
|
20
|
+
Copyright: 2021 Mulliken, LLC <katie@mulliken.net>
|
|
21
|
+
License: GPL-3.0-only
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
SPDX-FileCopyrightText: 2021 Katie Mulliken <katie@mulliken.net>
|
|
3
|
+
|
|
4
|
+
SPDX-License-Identifier: GPL-3.0-only
|
|
5
|
+
-->
|
|
6
|
+
|
|
7
|
+
# Changelog
|
|
8
|
+
All notable changes to this project will be documented in this file.
|
|
9
|
+
See [conventional commits](https://www.conventionalcommits.org/) for commit guidelines.
|
|
10
|
+
|
|
11
|
+
- - -
|
|
12
|
+
## 0.5.0..0.5.26 - 2023-12-08
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
* Update device UUID extraction logic in BaseService
|
|
17
|
+
* Add CodeQL configuration for improved security analysis
|
|
18
|
+
* Better handle token expiration (#83)
|
|
19
|
+
* Update notification endpoint (#81)
|
|
20
|
+
* Update motion properties (#82)
|
|
21
|
+
* Fix aiohttp conflict with homeassistant
|
|
22
|
+
* Fixed toggles and properties for many camera models
|
|
23
|
+
* Fix value error that might occur under certain conditions
|
|
24
|
+
* Pass mutex to DeviceUpdater (#64)
|
|
25
|
+
* Guard against empty queue in update_manager
|
|
26
|
+
* Fix lock querying - update access_token (#57)
|
|
27
|
+
* Protect update function in update_manager.py (#54)
|
|
28
|
+
* Handle sun match (#49)
|
|
29
|
+
* Remove color mode change (#47)
|
|
30
|
+
|
|
31
|
+
### Features
|
|
32
|
+
|
|
33
|
+
* Add support for UnLocking and Locking states for Wyze Lock (#75)
|
|
34
|
+
* Add support for outdoor plug energy sensors (#79)
|
|
35
|
+
* Add API Key/ID support (#70)
|
|
36
|
+
* Support for camera sirens (#42)
|
|
37
|
+
* Add option to unload entities (#37)
|
|
38
|
+
* Add cloud fallback when local control is unavailable (#35)
|
|
39
|
+
* Support for lightstrips (#32)
|
|
40
|
+
* Local control for color bulbs (#31)
|
|
41
|
+
* Support for Floodlight (#45)
|
|
42
|
+
* Support music mode (#44)
|
|
43
|
+
* Add global local control option (#38)
|
|
44
|
+
* Update manager - use a mutex (#60)
|
|
45
|
+
* Re-enable and fix thermostat presets (#59)
|
|
46
|
+
* Add Camera motion detection switch (#56)
|
|
47
|
+
* Handle music mode switch (#55)
|
|
48
|
+
* Add new Wyze wall switch (#52)
|
|
49
|
+
* Add notification property (#46)
|
|
50
|
+
|
|
51
|
+
### Dependencies
|
|
52
|
+
|
|
53
|
+
* Bump aiohttp from 3.8.1 to 3.8.5 (#69)
|
|
54
|
+
* Bump aiohttp from 3.10.9 to 3.10.11
|
|
55
|
+
* Bump idna from 3.6 to 3.7 (#90)
|
|
56
|
+
* Bump aiohttp from 3.9.3 to 3.9.4 (#89)
|
|
57
|
+
|
|
58
|
+
### Continuous Integration
|
|
59
|
+
|
|
60
|
+
* Add publish workflow and adjust job names
|
|
61
|
+
* Add prerelease github workflow
|
|
62
|
+
|
|
63
|
+
### Miscellaneous Chores
|
|
64
|
+
|
|
65
|
+
* Bump patch version
|
|
66
|
+
* Update repository name
|
|
67
|
+
* Update poetry
|
|
68
|
+
* Fix wall switch service compatibility
|
|
69
|
+
* Update exceptions handling
|
|
70
|
+
|
|
71
|
+
- - -
|
|
72
|
+
## 0.4.4..0.5.0 - 2021-10-06
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
### Continuous Integration
|
|
76
|
+
|
|
77
|
+
6751e7 - Add Semgrep CI - semgrep.dev on behalf of @JoshuaMulliken
|
|
78
|
+
cd937f - add codeql-analysis.yml - Katie Mulliken
|
|
79
|
+
|
|
80
|
+
### Bug Fixes
|
|
81
|
+
|
|
82
|
+
19146d - update manager inconsistencies and infinite loop (#1)* refactor: update_manager: Add some consistency to the updates_per_interval valuechange the name of this argument so that it is more clear that this should be the time between updates. Additionally add a doc string to give some context.This also means that we'll need to calculate the interval/updates_per_interval to get the actual countdown time.* fix: update_manger: fix the infinite loop while trying to conduct a backoffthis infinite loop was created because of an inconsitency in how the updates_per_interval value was being used between the classes. Now that it's being used an intended, the value should be used directly in these values.A smaller updates_per_interval will equate to a longer time between updates for a device. - Joe Schubert
|
|
83
|
+
4e6d3e - ensure that updates_per_interval cannot be reduced to zero - Katie Mulliken
|
|
84
|
+
|
|
85
|
+
### Features
|
|
86
|
+
|
|
87
|
+
da4455 - Utilize an update_manager to alleviate load on wyze's api (#1)Co-authored-by: Katie Mulliken <katie@mulliken.net> - Joe Schubert
|
|
88
|
+
|
|
89
|
+
### Miscellaneous Chores
|
|
90
|
+
|
|
91
|
+
a92950 - bump version to stable - Josh Mulliken
|
|
92
|
+
82b588 - bump version - Josh Mulliken
|
|
93
|
+
ed7eb5 - bump version - Katie Mulliken
|
|
94
|
+
fea63d - correct license information - Josh Mulliken
|
|
95
|
+
|
|
96
|
+
- - -
|
|
97
|
+
## 0.4.4 - 2021-09-27
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
### Bug Fixes
|
|
101
|
+
|
|
102
|
+
f08f6b - fix lock status being flipped - Katie Mulliken
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
### Miscellaneous Chores
|
|
106
|
+
|
|
107
|
+
b7cd51 - bump version in setup.cfg - Katie Mulliken
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
- - -
|
|
111
|
+
## 0.4.3 - 2021-09-26
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
### Bug Fixes
|
|
115
|
+
|
|
116
|
+
88e1bb - modify pypi version number - Katie Mulliken
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
- - -
|
|
120
|
+
## 0.4.2 - 2021-09-26
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
### Bug Fixes
|
|
124
|
+
|
|
125
|
+
8e26ff - remove redundent return before the logging functions - Katie Mulliken
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
### Documentation
|
|
129
|
+
|
|
130
|
+
532552 - update changelog to fit what cocogitto expects - Katie Mulliken
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
- - -
|
|
134
|
+
## 0.4.0..0.4.1 - 2021-09-26
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
### Miscellaneous Chores
|
|
138
|
+
|
|
139
|
+
8c9f7a - cleanup old files - Katie Mulliken
|
|
140
|
+
726a46 - bump version - Katie Mulliken
|
|
141
|
+
|
|
142
|
+
### Features
|
|
143
|
+
|
|
144
|
+
8bff85 - add logging for get, patch, and delete - Katie Mulliken
|
|
145
|
+
|
wyzeapy-0.5.29/PKG-INFO
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: wyzeapy
|
|
3
|
+
Version: 0.5.29
|
|
4
|
+
Summary: A library for interacting with Wyze devices
|
|
5
|
+
Author-email: Katie Mulliken <katie@mulliken.net>
|
|
6
|
+
License: GPL-3.0-only
|
|
7
|
+
Requires-Python: >=3.11.0
|
|
8
|
+
Requires-Dist: aiodns<4.0.0,>=3.2.0
|
|
9
|
+
Requires-Dist: aiohttp<4.0.0,>=3.11.12
|
|
10
|
+
Requires-Dist: pycryptodome<4.0.0,>=3.21.0
|
|
11
|
+
Provides-Extra: dev
|
|
12
|
+
Requires-Dist: pdoc<16.0.0,>=15.0.3; extra == 'dev'
|
|
13
|
+
Requires-Dist: pytest<9.0.0,>=7.0.0; extra == 'dev'
|
wyzeapy-0.5.29/README.md
ADDED
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
SPDX-FileCopyrightText: 2021 Mulliken, LLC <katie@mulliken.net>
|
|
3
|
+
|
|
4
|
+
SPDX-License-Identifier: GPL-3.0-only
|
|
5
|
+
-->
|
|
6
|
+
|
|
7
|
+
# Wyzeapy
|
|
8
|
+
|
|
9
|
+
A Python library for the (unofficial) Wyze Labs web APIs.
|
|
10
|
+
|
|
11
|
+
## Used By
|
|
12
|
+
|
|
13
|
+
This project is used by the [ha-wyzeapi](https://github.com/SecKatie/ha-wyzeapi) project. Let me know if you are utilizing it so that I can feature your project here!
|
|
14
|
+
|
|
15
|
+
## Usage/Examples
|
|
16
|
+
|
|
17
|
+
Getting logged in:
|
|
18
|
+
|
|
19
|
+
```python
|
|
20
|
+
import asyncio
|
|
21
|
+
from wyzeapy import Wyzeapy
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
async def async_main():
|
|
25
|
+
client = await Wyzeapy.create()
|
|
26
|
+
await client.login("EMAIL", "PASSWORD")
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
if __name__ == "__main__":
|
|
30
|
+
loop = asyncio.get_event_loop()
|
|
31
|
+
loop.run_until_complete(async_main())
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Thanks to:
|
|
35
|
+
|
|
36
|
+
- [@shauntarves](https://github.com/shauntarves): for contributing the App ID and Signing Secret
|
|
37
|
+
- [@yoinx](https://github.com/yoinx): for considerable contributions to the project
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
## License
|
|
41
|
+
|
|
42
|
+
[GNU GPLv3](https://choosealicense.com/licenses/gpl-3.0/)
|
|
43
|
+
|
|
44
|
+
## Author
|
|
45
|
+
|
|
46
|
+
Developed by Katie Mulliken ([SecKatie](https://github.com/SecKatie))
|
|
47
|
+
|
|
48
|
+
## Appendix
|
|
49
|
+
|
|
50
|
+
### Testing
|
|
51
|
+
|
|
52
|
+
This project uses Python's built-in `unittest` framework with `coverage` for code coverage reporting.
|
|
53
|
+
|
|
54
|
+
#### Prerequisites
|
|
55
|
+
|
|
56
|
+
First, install the development dependencies:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
uv sync --group dev
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
#### Running Tests
|
|
63
|
+
|
|
64
|
+
**Run all tests:**
|
|
65
|
+
```bash
|
|
66
|
+
.venv/bin/python -m unittest discover tests
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
**Run tests with verbose output:**
|
|
70
|
+
```bash
|
|
71
|
+
.venv/bin/python -m unittest discover tests -v
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
**Run a specific test file:**
|
|
75
|
+
```bash
|
|
76
|
+
.venv/bin/python -m unittest tests.test_camera_service
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
**Run a specific test method:**
|
|
80
|
+
```bash
|
|
81
|
+
.venv/bin/python -m unittest tests.test_camera_service.TestCameraService.test_get_cameras
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
#### Code Coverage
|
|
85
|
+
|
|
86
|
+
**Run tests with coverage:**
|
|
87
|
+
```bash
|
|
88
|
+
.venv/bin/coverage run -m unittest discover tests
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
**View coverage report in terminal:**
|
|
92
|
+
```bash
|
|
93
|
+
.venv/bin/coverage report -m
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
**Generate HTML coverage report:**
|
|
97
|
+
```bash
|
|
98
|
+
.venv/bin/coverage html
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Then open `htmlcov/index.html` in your web browser to view the detailed coverage report.
|
|
102
|
+
|
|
103
|
+
**One-liner to run tests and view coverage:**
|
|
104
|
+
```bash
|
|
105
|
+
.venv/bin/coverage run -m unittest discover tests && .venv/bin/coverage report -m
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### Documentation
|
|
109
|
+
|
|
110
|
+
Docs are generated using [pdoc](https://pdoc.dev/). To generate docs for this project, run:
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
# Install development dependencies
|
|
114
|
+
uv sync --group dev
|
|
115
|
+
|
|
116
|
+
# Generate docs
|
|
117
|
+
uv run pdoc --output-dir=docs src/wyzeapy
|
|
118
|
+
```
|
wyzeapy-0.5.29/bin/act
ADDED
|
Binary file
|