wyzeapy 0.5.30__tar.gz → 0.5.31__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.30 → wyzeapy-0.5.31}/.github/CODEOWNERS +3 -3
- wyzeapy-0.5.31/.github/workflows/auto-approve.yml +19 -0
- wyzeapy-0.5.31/.github/workflows/auto-assign.yml +25 -0
- {wyzeapy-0.5.30 → wyzeapy-0.5.31}/.github/workflows/codeql.yml +13 -7
- {wyzeapy-0.5.30 → wyzeapy-0.5.31}/.github/workflows/lint.yml +6 -3
- {wyzeapy-0.5.30 → wyzeapy-0.5.31}/.github/workflows/pre-release.yml +6 -3
- {wyzeapy-0.5.30 → wyzeapy-0.5.31}/.github/workflows/publish.yml +6 -3
- wyzeapy-0.5.31/.github/workflows/scorecard.yml +78 -0
- {wyzeapy-0.5.30 → wyzeapy-0.5.31}/.github/workflows/test.yml +7 -4
- wyzeapy-0.5.31/.pre-commit-config.yaml +18 -0
- {wyzeapy-0.5.30 → wyzeapy-0.5.31}/PKG-INFO +4 -4
- {wyzeapy-0.5.30 → wyzeapy-0.5.31}/README.md +3 -3
- wyzeapy-0.5.31/SECURITY.md +79 -0
- {wyzeapy-0.5.30 → wyzeapy-0.5.31}/pyproject.toml +5 -5
- {wyzeapy-0.5.30 → wyzeapy-0.5.31}/src/wyzeapy/__init__.py +1 -1
- {wyzeapy-0.5.30 → wyzeapy-0.5.31}/src/wyzeapy/payload_factory.py +23 -19
- {wyzeapy-0.5.30 → wyzeapy-0.5.31}/src/wyzeapy/services/base_service.py +73 -35
- {wyzeapy-0.5.30 → wyzeapy-0.5.31}/src/wyzeapy/services/bulb_service.py +25 -4
- {wyzeapy-0.5.30 → wyzeapy-0.5.31}/src/wyzeapy/services/irrigation_service.py +104 -47
- {wyzeapy-0.5.30 → wyzeapy-0.5.31}/src/wyzeapy/tests/test_irrigation_service.py +373 -177
- {wyzeapy-0.5.30 → wyzeapy-0.5.31}/src/wyzeapy/utils.py +14 -4
- {wyzeapy-0.5.30 → wyzeapy-0.5.31}/uv.lock +6 -6
- wyzeapy-0.5.30/bin/act +0 -0
- {wyzeapy-0.5.30 → wyzeapy-0.5.31}/.coveragerc +0 -0
- {wyzeapy-0.5.30 → wyzeapy-0.5.31}/.github/dependabot.yml +0 -0
- {wyzeapy-0.5.30 → wyzeapy-0.5.31}/.gitignore +0 -0
- {wyzeapy-0.5.30 → wyzeapy-0.5.31}/.reuse/dep5 +0 -0
- {wyzeapy-0.5.30 → wyzeapy-0.5.31}/CHANGELOG.md +0 -0
- {wyzeapy-0.5.30 → wyzeapy-0.5.31}/LICENSES/GPL-3.0-only.txt +0 -0
- {wyzeapy-0.5.30 → wyzeapy-0.5.31}/docs/index.html +0 -0
- {wyzeapy-0.5.30 → wyzeapy-0.5.31}/docs/search.js +0 -0
- {wyzeapy-0.5.30 → wyzeapy-0.5.31}/docs/wyzeapy/const.html +0 -0
- {wyzeapy-0.5.30 → wyzeapy-0.5.31}/docs/wyzeapy/crypto.html +0 -0
- {wyzeapy-0.5.30 → wyzeapy-0.5.31}/docs/wyzeapy/exceptions.html +0 -0
- {wyzeapy-0.5.30 → wyzeapy-0.5.31}/docs/wyzeapy/payload_factory.html +0 -0
- {wyzeapy-0.5.30 → wyzeapy-0.5.31}/docs/wyzeapy/services/base_service.html +0 -0
- {wyzeapy-0.5.30 → wyzeapy-0.5.31}/docs/wyzeapy/services/bulb_service.html +0 -0
- {wyzeapy-0.5.30 → wyzeapy-0.5.31}/docs/wyzeapy/services/camera_service.html +0 -0
- {wyzeapy-0.5.30 → wyzeapy-0.5.31}/docs/wyzeapy/services/hms_service.html +0 -0
- {wyzeapy-0.5.30 → wyzeapy-0.5.31}/docs/wyzeapy/services/lock_service.html +0 -0
- {wyzeapy-0.5.30 → wyzeapy-0.5.31}/docs/wyzeapy/services/sensor_service.html +0 -0
- {wyzeapy-0.5.30 → wyzeapy-0.5.31}/docs/wyzeapy/services/switch_service.html +0 -0
- {wyzeapy-0.5.30 → wyzeapy-0.5.31}/docs/wyzeapy/services/thermostat_service.html +0 -0
- {wyzeapy-0.5.30 → wyzeapy-0.5.31}/docs/wyzeapy/services/update_manager.html +0 -0
- {wyzeapy-0.5.30 → wyzeapy-0.5.31}/docs/wyzeapy/services/wall_switch_service.html +0 -0
- {wyzeapy-0.5.30 → wyzeapy-0.5.31}/docs/wyzeapy/services.html +0 -0
- {wyzeapy-0.5.30 → wyzeapy-0.5.31}/docs/wyzeapy/types.html +0 -0
- {wyzeapy-0.5.30 → wyzeapy-0.5.31}/docs/wyzeapy/utils.html +0 -0
- {wyzeapy-0.5.30 → wyzeapy-0.5.31}/docs/wyzeapy/wyze_auth_lib.html +0 -0
- {wyzeapy-0.5.30 → wyzeapy-0.5.31}/docs/wyzeapy.html +0 -0
- {wyzeapy-0.5.30 → wyzeapy-0.5.31}/scripts/create_pre_release.sh +0 -0
- {wyzeapy-0.5.30 → wyzeapy-0.5.31}/src/wyzeapy/const.py +0 -0
- {wyzeapy-0.5.30 → wyzeapy-0.5.31}/src/wyzeapy/crypto.py +0 -0
- {wyzeapy-0.5.30 → wyzeapy-0.5.31}/src/wyzeapy/exceptions.py +0 -0
- {wyzeapy-0.5.30 → wyzeapy-0.5.31}/src/wyzeapy/services/__init__.py +0 -0
- {wyzeapy-0.5.30 → wyzeapy-0.5.31}/src/wyzeapy/services/camera_service.py +0 -0
- {wyzeapy-0.5.30 → wyzeapy-0.5.31}/src/wyzeapy/services/hms_service.py +0 -0
- {wyzeapy-0.5.30 → wyzeapy-0.5.31}/src/wyzeapy/services/lock_service.py +0 -0
- {wyzeapy-0.5.30 → wyzeapy-0.5.31}/src/wyzeapy/services/sensor_service.py +0 -0
- {wyzeapy-0.5.30 → wyzeapy-0.5.31}/src/wyzeapy/services/switch_service.py +0 -0
- {wyzeapy-0.5.30 → wyzeapy-0.5.31}/src/wyzeapy/services/thermostat_service.py +0 -0
- {wyzeapy-0.5.30 → wyzeapy-0.5.31}/src/wyzeapy/services/update_manager.py +0 -0
- {wyzeapy-0.5.30 → wyzeapy-0.5.31}/src/wyzeapy/services/wall_switch_service.py +0 -0
- {wyzeapy-0.5.30 → wyzeapy-0.5.31}/src/wyzeapy/types.py +0 -0
- {wyzeapy-0.5.30 → wyzeapy-0.5.31}/src/wyzeapy/wyze_auth_lib.py +0 -0
- {wyzeapy-0.5.30 → wyzeapy-0.5.31}/tests/__init__.py +0 -0
- {wyzeapy-0.5.30 → wyzeapy-0.5.31}/tests/test_bulb_service.py +0 -0
- {wyzeapy-0.5.30 → wyzeapy-0.5.31}/tests/test_camera_service.py +0 -0
- {wyzeapy-0.5.30 → wyzeapy-0.5.31}/tests/test_hms_service.py +0 -0
- {wyzeapy-0.5.30 → wyzeapy-0.5.31}/tests/test_lock_service.py +0 -0
- {wyzeapy-0.5.30 → wyzeapy-0.5.31}/tests/test_payload_factory.py +0 -0
- {wyzeapy-0.5.30 → wyzeapy-0.5.31}/tests/test_sensor_service.py +0 -0
- {wyzeapy-0.5.30 → wyzeapy-0.5.31}/tests/test_switch_service.py +0 -0
- {wyzeapy-0.5.30 → wyzeapy-0.5.31}/tests/test_thermostat_service.py +0 -0
- {wyzeapy-0.5.30 → wyzeapy-0.5.31}/tests/test_types.py +0 -0
- {wyzeapy-0.5.30 → wyzeapy-0.5.31}/tests/test_update_manager.py +0 -0
- {wyzeapy-0.5.30 → wyzeapy-0.5.31}/tests/test_utils.py +0 -0
- {wyzeapy-0.5.30 → wyzeapy-0.5.31}/tests/test_wall_switch_service.py +0 -0
- {wyzeapy-0.5.30 → wyzeapy-0.5.31}/tests/test_wyze_auth_lib.py +0 -0
- {wyzeapy-0.5.30 → wyzeapy-0.5.31}/tests/test_wyzeapy.py +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
# Lines starting with
|
|
1
|
+
# Lines starting with '#' are comments.
|
|
2
2
|
# Each line is a file pattern followed by one or more owners.
|
|
3
3
|
|
|
4
4
|
# These owners will be the default owners for everything in the repo.
|
|
5
|
-
* @
|
|
5
|
+
* @SecKatie
|
|
6
6
|
|
|
7
7
|
# Order is important. The last matching pattern has the most precedence.
|
|
8
8
|
# So if a pull request only touches javascript files, only these owners
|
|
@@ -10,4 +10,4 @@
|
|
|
10
10
|
# *.js @octocat @github/js
|
|
11
11
|
|
|
12
12
|
# You can also use email addresses if you prefer.
|
|
13
|
-
# docs/* docs@example.com
|
|
13
|
+
# docs/* docs@example.com
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
name: Auto Approve Owner PRs
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request_target:
|
|
5
|
+
types: [opened, synchronize, reopened]
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
pull-requests: write
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
auto-approve:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
# Only auto-approve PRs from the repository owner
|
|
14
|
+
if: github.event.pull_request.user.login == github.repository_owner
|
|
15
|
+
steps:
|
|
16
|
+
- name: Auto Approve
|
|
17
|
+
uses: hmarr/auto-approve-action@8f929096a962e83ccdfa8afcf855f39f12d4dac7 # v4
|
|
18
|
+
with:
|
|
19
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
name: Auto Assign Issues
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
issues:
|
|
5
|
+
types: [opened]
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: read
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
assign:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
permissions:
|
|
14
|
+
issues: write
|
|
15
|
+
steps:
|
|
16
|
+
- name: Assign issue to SecKatie
|
|
17
|
+
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
|
|
18
|
+
with:
|
|
19
|
+
script: |
|
|
20
|
+
await github.rest.issues.addAssignees({
|
|
21
|
+
owner: context.repo.owner,
|
|
22
|
+
repo: context.repo.repo,
|
|
23
|
+
issue_number: context.issue.number,
|
|
24
|
+
assignees: ['SecKatie']
|
|
25
|
+
});
|
|
@@ -11,6 +11,9 @@ on:
|
|
|
11
11
|
schedule:
|
|
12
12
|
- cron: '0 0 * * *'
|
|
13
13
|
|
|
14
|
+
permissions:
|
|
15
|
+
contents: read
|
|
16
|
+
|
|
14
17
|
jobs:
|
|
15
18
|
analyze:
|
|
16
19
|
name: Analyze
|
|
@@ -28,21 +31,23 @@ jobs:
|
|
|
28
31
|
|
|
29
32
|
strategy:
|
|
30
33
|
fail-fast: false
|
|
31
|
-
|
|
34
|
+
matrix:
|
|
35
|
+
language: [ 'python' ]
|
|
32
36
|
|
|
33
37
|
steps:
|
|
34
38
|
- name: Checkout repository
|
|
35
|
-
uses: actions/checkout@
|
|
39
|
+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
|
36
40
|
|
|
37
41
|
# Initializes the CodeQL tools for scanning.
|
|
38
42
|
- name: Initialize CodeQL
|
|
39
|
-
uses: github/codeql-action/init@
|
|
40
|
-
|
|
43
|
+
uses: github/codeql-action/init@5d4e8d1aca955e8d8589aabd499c5cae939e33c7 # v4
|
|
44
|
+
with:
|
|
45
|
+
languages: ${{ matrix.language }}
|
|
41
46
|
|
|
42
47
|
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
|
|
43
48
|
# If this step fails, then you should remove it and run the build manually (see below)
|
|
44
49
|
- name: Autobuild
|
|
45
|
-
uses: github/codeql-action/autobuild@
|
|
50
|
+
uses: github/codeql-action/autobuild@5d4e8d1aca955e8d8589aabd499c5cae939e33c7 # v4
|
|
46
51
|
|
|
47
52
|
# Command-line programs to run using the OS shell.
|
|
48
53
|
# See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
|
|
@@ -55,5 +60,6 @@ jobs:
|
|
|
55
60
|
# ./location_of_script_within_repo/buildscript.sh
|
|
56
61
|
|
|
57
62
|
- name: Perform CodeQL Analysis
|
|
58
|
-
uses: github/codeql-action/analyze@
|
|
59
|
-
|
|
63
|
+
uses: github/codeql-action/analyze@5d4e8d1aca955e8d8589aabd499c5cae939e33c7 # v4
|
|
64
|
+
with:
|
|
65
|
+
category: "/language:${{matrix.language}}"
|
|
@@ -6,20 +6,23 @@ on:
|
|
|
6
6
|
pull_request:
|
|
7
7
|
branches: [ main, develop ]
|
|
8
8
|
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
|
|
9
12
|
jobs:
|
|
10
13
|
lint:
|
|
11
14
|
runs-on: ubuntu-latest
|
|
12
15
|
|
|
13
16
|
steps:
|
|
14
|
-
- uses: actions/checkout@
|
|
17
|
+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v4
|
|
15
18
|
|
|
16
19
|
- name: Set up Python
|
|
17
|
-
uses: actions/setup-python@
|
|
20
|
+
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v5
|
|
18
21
|
with:
|
|
19
22
|
python-version: '3.11'
|
|
20
23
|
|
|
21
24
|
- name: Install uv
|
|
22
|
-
uses: astral-sh/setup-uv@
|
|
25
|
+
uses: astral-sh/setup-uv@61cb8a9741eeb8a550a1b8544337180c0fc8476b # v7.2.0
|
|
23
26
|
|
|
24
27
|
- name: Install dependencies
|
|
25
28
|
run: |
|
|
@@ -5,19 +5,22 @@ on:
|
|
|
5
5
|
branches:
|
|
6
6
|
- release/*
|
|
7
7
|
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
8
11
|
jobs:
|
|
9
12
|
test-publish:
|
|
10
13
|
runs-on: ubuntu-latest
|
|
11
14
|
|
|
12
15
|
steps:
|
|
13
|
-
- uses: actions/checkout@
|
|
16
|
+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v4
|
|
14
17
|
|
|
15
|
-
- uses: actions/setup-python@
|
|
18
|
+
- uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v5
|
|
16
19
|
with:
|
|
17
20
|
python-version: "3.12"
|
|
18
21
|
|
|
19
22
|
- name: Install uv
|
|
20
|
-
uses: astral-sh/setup-uv@
|
|
23
|
+
uses: astral-sh/setup-uv@61cb8a9741eeb8a550a1b8544337180c0fc8476b # v4
|
|
21
24
|
with:
|
|
22
25
|
enable-cache: true
|
|
23
26
|
|
|
@@ -4,6 +4,9 @@ on:
|
|
|
4
4
|
release:
|
|
5
5
|
types: [published]
|
|
6
6
|
|
|
7
|
+
permissions:
|
|
8
|
+
contents: read
|
|
9
|
+
|
|
7
10
|
jobs:
|
|
8
11
|
publish:
|
|
9
12
|
runs-on: ubuntu-latest
|
|
@@ -12,14 +15,14 @@ jobs:
|
|
|
12
15
|
id-token: write # Required for trusted publishing
|
|
13
16
|
|
|
14
17
|
steps:
|
|
15
|
-
- uses: actions/checkout@
|
|
18
|
+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v4
|
|
16
19
|
|
|
17
|
-
- uses: actions/setup-python@
|
|
20
|
+
- uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v5
|
|
18
21
|
with:
|
|
19
22
|
python-version: "3.12"
|
|
20
23
|
|
|
21
24
|
- name: Install uv
|
|
22
|
-
uses: astral-sh/setup-uv@
|
|
25
|
+
uses: astral-sh/setup-uv@61cb8a9741eeb8a550a1b8544337180c0fc8476b # v4
|
|
23
26
|
with:
|
|
24
27
|
enable-cache: true
|
|
25
28
|
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# This workflow uses actions that are not certified by GitHub. They are provided
|
|
2
|
+
# by a third-party and are governed by separate terms of service, privacy
|
|
3
|
+
# policy, and support documentation.
|
|
4
|
+
|
|
5
|
+
name: Scorecard supply-chain security
|
|
6
|
+
on:
|
|
7
|
+
# For Branch-Protection check. Only the default branch is supported. See
|
|
8
|
+
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
|
|
9
|
+
branch_protection_rule:
|
|
10
|
+
# To guarantee Maintained check is occasionally updated. See
|
|
11
|
+
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
|
|
12
|
+
schedule:
|
|
13
|
+
- cron: '29 2 * * 4'
|
|
14
|
+
push:
|
|
15
|
+
branches: [ "main" ]
|
|
16
|
+
|
|
17
|
+
# Declare default permissions as read only.
|
|
18
|
+
permissions: read-all
|
|
19
|
+
|
|
20
|
+
jobs:
|
|
21
|
+
analysis:
|
|
22
|
+
name: Scorecard analysis
|
|
23
|
+
runs-on: ubuntu-latest
|
|
24
|
+
# `publish_results: true` only works when run from the default branch. conditional can be removed if disabled.
|
|
25
|
+
if: github.event.repository.default_branch == github.ref_name || github.event_name == 'pull_request'
|
|
26
|
+
permissions:
|
|
27
|
+
# Needed to upload the results to code-scanning dashboard.
|
|
28
|
+
security-events: write
|
|
29
|
+
# Needed to publish results and get a badge (see publish_results below).
|
|
30
|
+
id-token: write
|
|
31
|
+
# Uncomment the permissions below if installing in a private repository.
|
|
32
|
+
# contents: read
|
|
33
|
+
# actions: read
|
|
34
|
+
|
|
35
|
+
steps:
|
|
36
|
+
- name: "Checkout code"
|
|
37
|
+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
|
38
|
+
with:
|
|
39
|
+
persist-credentials: false
|
|
40
|
+
|
|
41
|
+
- name: "Run analysis"
|
|
42
|
+
uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a # v2.4.3
|
|
43
|
+
with:
|
|
44
|
+
results_file: results.sarif
|
|
45
|
+
results_format: sarif
|
|
46
|
+
# (Optional) "write" PAT token. Uncomment the `repo_token` line below if:
|
|
47
|
+
# - you want to enable the Branch-Protection check on a *public* repository, or
|
|
48
|
+
# - you are installing Scorecard on a *private* repository
|
|
49
|
+
# To create the PAT, follow the steps in https://github.com/ossf/scorecard-action?tab=readme-ov-file#authentication-with-fine-grained-pat-optional.
|
|
50
|
+
# repo_token: ${{ secrets.SCORECARD_TOKEN }}
|
|
51
|
+
|
|
52
|
+
# Public repositories:
|
|
53
|
+
# - Publish results to OpenSSF REST API for easy access by consumers
|
|
54
|
+
# - Allows the repository to include the Scorecard badge.
|
|
55
|
+
# - See https://github.com/ossf/scorecard-action#publishing-results.
|
|
56
|
+
# For private repositories:
|
|
57
|
+
# - `publish_results` will always be set to `false`, regardless
|
|
58
|
+
# of the value entered here.
|
|
59
|
+
publish_results: true
|
|
60
|
+
|
|
61
|
+
# (Optional) Uncomment file_mode if you have a .gitattributes with files marked export-ignore
|
|
62
|
+
# file_mode: git
|
|
63
|
+
|
|
64
|
+
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
|
|
65
|
+
# format to the repository Actions tab.
|
|
66
|
+
- name: "Upload artifact"
|
|
67
|
+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
|
|
68
|
+
with:
|
|
69
|
+
name: SARIF file
|
|
70
|
+
path: results.sarif
|
|
71
|
+
retention-days: 5
|
|
72
|
+
|
|
73
|
+
# Upload the results to GitHub's code scanning dashboard (optional).
|
|
74
|
+
# Commenting out will disable upload of results to your repo's Code Scanning dashboard
|
|
75
|
+
- name: "Upload to code-scanning"
|
|
76
|
+
uses: github/codeql-action/upload-sarif@5d4e8d1aca955e8d8589aabd499c5cae939e33c7 # v4
|
|
77
|
+
with:
|
|
78
|
+
sarif_file: results.sarif
|
|
@@ -6,6 +6,9 @@ on:
|
|
|
6
6
|
pull_request:
|
|
7
7
|
branches: [ main, develop ]
|
|
8
8
|
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
|
|
9
12
|
jobs:
|
|
10
13
|
test:
|
|
11
14
|
runs-on: ubuntu-latest
|
|
@@ -14,15 +17,15 @@ jobs:
|
|
|
14
17
|
python-version: ['3.11', '3.12']
|
|
15
18
|
|
|
16
19
|
steps:
|
|
17
|
-
- uses: actions/checkout@
|
|
20
|
+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v4
|
|
18
21
|
|
|
19
22
|
- name: Set up Python ${{ matrix.python-version }}
|
|
20
|
-
uses: actions/setup-python@
|
|
23
|
+
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v5
|
|
21
24
|
with:
|
|
22
25
|
python-version: ${{ matrix.python-version }}
|
|
23
26
|
|
|
24
27
|
- name: Install uv
|
|
25
|
-
uses: astral-sh/setup-uv@
|
|
28
|
+
uses: astral-sh/setup-uv@61cb8a9741eeb8a550a1b8544337180c0fc8476b # v7.2.0
|
|
26
29
|
|
|
27
30
|
- name: Install dependencies
|
|
28
31
|
run: |
|
|
@@ -39,7 +42,7 @@ jobs:
|
|
|
39
42
|
coverage xml
|
|
40
43
|
|
|
41
44
|
- name: Upload coverage reports to Codecov
|
|
42
|
-
uses: codecov/codecov-action@
|
|
45
|
+
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v4
|
|
43
46
|
if: matrix.python-version == '3.11'
|
|
44
47
|
with:
|
|
45
48
|
file: ./coverage.xml
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
repos:
|
|
2
|
+
- repo: https://github.com/gitleaks/gitleaks
|
|
3
|
+
rev: v8.16.3
|
|
4
|
+
hooks:
|
|
5
|
+
- id: gitleaks
|
|
6
|
+
- repo: https://github.com/jumanjihouse/pre-commit-hooks
|
|
7
|
+
rev: 3.0.0
|
|
8
|
+
hooks:
|
|
9
|
+
- id: shellcheck
|
|
10
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
11
|
+
rev: v4.4.0
|
|
12
|
+
hooks:
|
|
13
|
+
- id: end-of-file-fixer
|
|
14
|
+
- id: trailing-whitespace
|
|
15
|
+
- repo: https://github.com/pylint-dev/pylint
|
|
16
|
+
rev: v2.17.2
|
|
17
|
+
hooks:
|
|
18
|
+
- id: pylint
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: wyzeapy
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.31
|
|
4
4
|
Summary: A library for interacting with Wyze devices
|
|
5
5
|
Author-email: Katie Mulliken <katie@mulliken.net>
|
|
6
6
|
License: GPL-3.0-only
|
|
7
7
|
Requires-Python: >=3.11.0
|
|
8
|
-
Requires-Dist: aiodns<
|
|
8
|
+
Requires-Dist: aiodns<5.0.0,>=3.2.0
|
|
9
9
|
Requires-Dist: aiohttp<4.0.0,>=3.11.12
|
|
10
10
|
Requires-Dist: pycryptodome<4.0.0,>=3.21.0
|
|
11
11
|
Provides-Extra: dev
|
|
12
|
-
Requires-Dist: pdoc<
|
|
13
|
-
Requires-Dist: pytest<
|
|
12
|
+
Requires-Dist: pdoc<17.0.0,>=15.0.3; extra == 'dev'
|
|
13
|
+
Requires-Dist: pytest<10.0.0,>=7.0.0; extra == 'dev'
|
|
@@ -23,13 +23,13 @@ from wyzeapy import Wyzeapy
|
|
|
23
23
|
|
|
24
24
|
async def async_main():
|
|
25
25
|
client = await Wyzeapy.create()
|
|
26
|
-
await client.login("EMAIL", "PASSWORD")
|
|
26
|
+
await client.login(email="EMAIL", password="PASSWORD", key_id="KEY_ID", api_key="API_KEY")
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
if __name__ == "__main__":
|
|
30
|
-
|
|
31
|
-
loop.run_until_complete(async_main())
|
|
30
|
+
asyncio.run(async_main())
|
|
32
31
|
```
|
|
32
|
+
Note: Visit the [Wyze developer console](https://developer-api-console.wyze.com/#/apikey/view) to generate an Key Id and Api Key.
|
|
33
33
|
|
|
34
34
|
## Thanks to:
|
|
35
35
|
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# Security Policy
|
|
2
|
+
|
|
3
|
+
## Supported Versions
|
|
4
|
+
|
|
5
|
+
The following versions of Wyzeapy are currently supported with security updates:
|
|
6
|
+
|
|
7
|
+
| Version | Supported |
|
|
8
|
+
| ------- | ------------------ |
|
|
9
|
+
| Latest | :white_check_mark: |
|
|
10
|
+
|
|
11
|
+
## Reporting a Vulnerability
|
|
12
|
+
|
|
13
|
+
We take the security of Wyzeapy seriously. If you believe you have found a security vulnerability in this project, please report it to us responsibly.
|
|
14
|
+
|
|
15
|
+
### How to Report
|
|
16
|
+
|
|
17
|
+
**Please do not report security vulnerabilities through public GitHub issues.**
|
|
18
|
+
|
|
19
|
+
Instead, please use one of the following methods:
|
|
20
|
+
|
|
21
|
+
1. **GitHub Private Vulnerability Reporting (Preferred):** Use GitHub's [private vulnerability reporting feature](https://github.com/SecKatie/wyzeapy/security/advisories/new) to submit your report directly through the repository.
|
|
22
|
+
|
|
23
|
+
2. **Email:** Send an email to [katie@mulliken.net](mailto:katie@mulliken.net) with the subject line "Wyzeapy Security Vulnerability Report".
|
|
24
|
+
|
|
25
|
+
### What to Include
|
|
26
|
+
|
|
27
|
+
Please include the following information in your report:
|
|
28
|
+
|
|
29
|
+
- A clear description of the vulnerability
|
|
30
|
+
- Steps to reproduce the issue
|
|
31
|
+
- Affected versions
|
|
32
|
+
- Potential impact of the vulnerability
|
|
33
|
+
- Any suggested fixes or mitigations (optional)
|
|
34
|
+
|
|
35
|
+
### What to Expect
|
|
36
|
+
|
|
37
|
+
After you submit a vulnerability report:
|
|
38
|
+
|
|
39
|
+
1. **Acknowledgment:** You will receive an acknowledgment of your report within 48 hours.
|
|
40
|
+
|
|
41
|
+
2. **Initial Assessment:** Within 7 days, we will provide an initial assessment of the vulnerability and an estimated timeline for a fix.
|
|
42
|
+
|
|
43
|
+
3. **Resolution Timeline:** We aim to resolve critical vulnerabilities within 30 days and other vulnerabilities within 90 days of the initial report.
|
|
44
|
+
|
|
45
|
+
4. **Disclosure:** We follow coordinated vulnerability disclosure practices. We will work with you to determine an appropriate disclosure timeline once a fix is available.
|
|
46
|
+
|
|
47
|
+
5. **Credit:** If you would like to be credited for the discovery, please let us know how you would like to be acknowledged.
|
|
48
|
+
|
|
49
|
+
### Scope
|
|
50
|
+
|
|
51
|
+
The following are considered in-scope for security vulnerability reports:
|
|
52
|
+
|
|
53
|
+
- Authentication and authorization issues
|
|
54
|
+
- Credential exposure or leakage
|
|
55
|
+
- Injection vulnerabilities
|
|
56
|
+
- Sensitive data exposure
|
|
57
|
+
- Security misconfigurations in the library code
|
|
58
|
+
|
|
59
|
+
The following are generally out of scope:
|
|
60
|
+
|
|
61
|
+
- Issues in third-party dependencies (please report these to the respective maintainers)
|
|
62
|
+
- Issues related to the Wyze API itself (please report these to Wyze)
|
|
63
|
+
- Social engineering attacks
|
|
64
|
+
- Denial of service attacks
|
|
65
|
+
|
|
66
|
+
## Security Best Practices for Users
|
|
67
|
+
|
|
68
|
+
When using Wyzeapy:
|
|
69
|
+
|
|
70
|
+
- Never commit credentials or API keys to version control
|
|
71
|
+
- Store sensitive configuration in environment variables or secure vaults
|
|
72
|
+
- Keep the library updated to the latest version
|
|
73
|
+
- Review the permissions and scopes requested by your integration
|
|
74
|
+
|
|
75
|
+
## Contact
|
|
76
|
+
|
|
77
|
+
For security-related inquiries, contact: [katie@mulliken.net](mailto:katie@mulliken.net)
|
|
78
|
+
|
|
79
|
+
For general questions and non-security issues, please use [GitHub Issues](https://github.com/SecKatie/wyzeapy/issues).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "wyzeapy"
|
|
3
|
-
version = "0.5.
|
|
3
|
+
version = "0.5.31"
|
|
4
4
|
description = "A library for interacting with Wyze devices"
|
|
5
5
|
authors = [
|
|
6
6
|
{ name = "Katie Mulliken", email = "katie@mulliken.net" },
|
|
@@ -9,14 +9,14 @@ license = { text = "GPL-3.0-only" }
|
|
|
9
9
|
requires-python = ">=3.11.0"
|
|
10
10
|
dependencies = [
|
|
11
11
|
"aiohttp>=3.11.12,<4.0.0",
|
|
12
|
-
"aiodns>=3.2.0,<
|
|
12
|
+
"aiodns>=3.2.0,<5.0.0",
|
|
13
13
|
"pycryptodome>=3.21.0,<4.0.0",
|
|
14
14
|
]
|
|
15
15
|
|
|
16
16
|
[project.optional-dependencies]
|
|
17
17
|
dev = [
|
|
18
|
-
"pdoc>=15.0.3,<
|
|
19
|
-
"pytest>=7.0.0,<
|
|
18
|
+
"pdoc>=15.0.3,<17.0.0",
|
|
19
|
+
"pytest>=7.0.0,<10.0.0",
|
|
20
20
|
]
|
|
21
21
|
|
|
22
22
|
[build-system]
|
|
@@ -26,6 +26,6 @@ build-backend = "hatchling.build"
|
|
|
26
26
|
[dependency-groups]
|
|
27
27
|
dev = [
|
|
28
28
|
"ruff>=0.12.3",
|
|
29
|
-
"pytest>=7.0.0,<
|
|
29
|
+
"pytest>=7.0.0,<10.0.0",
|
|
30
30
|
"coverage>=7.9.2",
|
|
31
31
|
]
|
|
@@ -443,7 +443,7 @@ class Wyzeapy:
|
|
|
443
443
|
if self._sensor_service is None:
|
|
444
444
|
self._sensor_service = SensorService(self._auth_lib)
|
|
445
445
|
return self._sensor_service
|
|
446
|
-
|
|
446
|
+
|
|
447
447
|
@property
|
|
448
448
|
async def irrigation_service(self) -> IrrigationService:
|
|
449
449
|
"""Returns an instance of the irrigation service"""
|
|
@@ -51,37 +51,41 @@ def olive_create_get_payload(device_mac: str, keys: str) -> Dict[str, Any]:
|
|
|
51
51
|
|
|
52
52
|
return {"keys": keys, "did": device_mac, "nonce": nonce}
|
|
53
53
|
|
|
54
|
+
|
|
54
55
|
def olive_create_get_payload_irrigation(device_mac: str) -> Dict[str, Any]:
|
|
55
56
|
nonce = int(time.time() * 1000)
|
|
56
57
|
|
|
57
|
-
return {
|
|
58
|
-
'device_id': device_mac,
|
|
59
|
-
'nonce': str(nonce)
|
|
60
|
-
}
|
|
58
|
+
return {"device_id": device_mac, "nonce": str(nonce)}
|
|
61
59
|
|
|
62
|
-
|
|
60
|
+
|
|
61
|
+
def olive_create_post_payload_irrigation_stop(
|
|
62
|
+
device_mac: str, action: str
|
|
63
|
+
) -> Dict[str, Any]:
|
|
63
64
|
nonce = int(time.time() * 1000)
|
|
64
65
|
|
|
65
|
-
return {
|
|
66
|
-
'device_id': device_mac,
|
|
67
|
-
'nonce': str(nonce),
|
|
68
|
-
"action": action
|
|
69
|
-
}
|
|
66
|
+
return {"device_id": device_mac, "nonce": str(nonce), "action": action}
|
|
70
67
|
|
|
71
|
-
|
|
68
|
+
|
|
69
|
+
def olive_create_post_payload_irrigation_quickrun(
|
|
70
|
+
device_mac: str, zone_number: int, duration: int
|
|
71
|
+
) -> Dict[str, Any]:
|
|
72
72
|
nonce = int(time.time() * 1000)
|
|
73
73
|
|
|
74
74
|
return {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
"zone_runs": [
|
|
78
|
-
{
|
|
79
|
-
"zone_number": zone_number,
|
|
80
|
-
"duration": duration
|
|
81
|
-
}
|
|
82
|
-
]
|
|
75
|
+
"device_id": device_mac,
|
|
76
|
+
"nonce": str(nonce),
|
|
77
|
+
"zone_runs": [{"zone_number": zone_number, "duration": duration}],
|
|
83
78
|
}
|
|
84
79
|
|
|
80
|
+
|
|
81
|
+
def olive_create_get_payload_irrigation_schedule_runs(
|
|
82
|
+
device_mac: str,
|
|
83
|
+
) -> Dict[str, Any]:
|
|
84
|
+
nonce = int(time.time() * 1000)
|
|
85
|
+
|
|
86
|
+
return {"device_id": device_mac, "nonce": str(nonce)}
|
|
87
|
+
|
|
88
|
+
|
|
85
89
|
def olive_create_post_payload(
|
|
86
90
|
device_mac: str, device_model: str, prop_key: str, value: Any
|
|
87
91
|
) -> Dict[str, Any]:
|