Skip to content

Commit 9222c48

Browse files
authored
Merge pull request #38 from rlippmann/master
1.2.0-1.2.9
2 parents bac9d3c + 75794f1 commit 9222c48

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+23291
-1662
lines changed

Diff for: .github/workflows/black.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@ jobs:
66
lint:
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v3
9+
- uses: actions/setup-python@v4
10+
- uses: actions/checkout@v4
1011
- uses: psf/black@stable

Diff for: .github/workflows/name: pre-commit.yml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: pre-commit
2+
3+
on:
4+
[push, pull_request]
5+
6+
jobs:
7+
pre-commit:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
- uses: actions/setup-python@v4
12+
with:
13+
python-version: "3.11"
14+
- uses: pre-commit/action@v3.0.0

Diff for: .gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ __pycache__
1010
.mypy_cache
1111
*.swp
1212
.vscode/settings.json
13+
.coverage

Diff for: .pre-commit-config.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ repos:
44
hooks:
55
- id: trailing-whitespace
66
- id: end-of-file-fixer
7+
- repo: https://github.com/asottile/pyupgrade
8+
rev: v3.15.0
9+
hooks:
10+
- id: pyupgrade
11+
args: [--py39-plus]
712
- repo: https://github.com/psf/black
813
rev: 24.3.0
914
hooks:
@@ -32,3 +37,4 @@ repos:
3237
rev: 'v0.3.4'
3338
hooks:
3439
- id: ruff
40+

Diff for: .vscode/launch.json

+9
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,15 @@
44
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
55
"version": "0.2.0",
66
"configurations": [
7+
{
8+
"name": "Python: Debug Tests",
9+
"type": "python",
10+
"request": "launch",
11+
"program": "${file}",
12+
"purpose": ["debug-test"],
13+
"console": "integratedTerminal",
14+
"justMyCode": false
15+
},
716
{
817
"name": "Python: Current File",
918
"type": "python",

Diff for: .vscode/settings.json

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
{
22
"python.analysis.typeCheckingMode": "basic",
3-
"python.terminal.activateEnvironment": true
3+
"python.terminal.activateEnvironment": true,
4+
"python.testing.pytestArgs": [
5+
"tests"
6+
],
7+
"python.testing.unittestEnabled": false,
8+
"python.testing.pytestEnabled": true
49
}

Diff for: .vscode/tasks.json

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
// See https://go.microsoft.com/fwlink/?LinkId=733558
3+
// for the documentation about the tasks.json format
4+
// .vscode/tasks.json
5+
{
6+
"version": "2.0.0",
7+
"tasks": [
8+
{
9+
"label": "Run pytest with coverage",
10+
"type": "shell",
11+
"command": "pytest",
12+
"args": [
13+
"--cov=pyadtpulse",
14+
"--cov-report=html",
15+
"${workspaceFolder}/tests"
16+
],
17+
"group": {
18+
"kind": "test",
19+
"isDefault": false
20+
}
21+
},
22+
{
23+
"label": "Run pytest without coverage",
24+
"type": "shell",
25+
"command": "pytest",
26+
"args": [
27+
"${workspaceFolder}/tests"
28+
],
29+
"group": {
30+
"kind": "test",
31+
"isDefault": true
32+
}
33+
}
34+
]
35+
}

Diff for: CHANGELOG.md

+61
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,64 @@
1+
## 1.2.9 (2024-04-21)
2+
3+
* ignore query string in check_login_errors(). This should fix a bug where the task was logged out
4+
but not correctly being identified
5+
* remove unnecessary warning in alarm status check
6+
* add arm night
7+
* refactor update_alarm_from_etree()
8+
* bump to newer user agent
9+
* skip sync check if it will back off
10+
* fix linter issue in _initialize_sites
11+
12+
## 1.2.8 (2024-03-07)
13+
14+
* add more detail to "invalid sync check" error logging
15+
* don't exit sync check task on service temporarily unavailable or invalid login
16+
* don't use empty site id for logins
17+
18+
## 1.2.7 (2024-02-23)
19+
20+
* catch site is None on logout to prevent "have you logged in" errors
21+
* speed improvements via aiohttp-zlib-ng
22+
23+
## 1.2.6 (2024-02-23)
24+
25+
Performance improvements including:
26+
27+
* switch from BeautifulSoup to lxml for faster parsing
28+
* optimize zone parsing to only update zones which have changed
29+
* change wait_for_update() to pass the changed zones/alarm state to caller
30+
31+
## 1.2.5 (2024-02-10)
32+
33+
* don't raise not logged in exception when sync check task logs out
34+
* change full logout interval to approximately every 6 hours
35+
36+
## 1.2.4 (2024-02-08)
37+
38+
* change yarl dependencies
39+
40+
## 1.2.3 (2024-02-08)
41+
42+
* change aiohttp dependencies
43+
44+
## 1.2.2 (2024-02-07)
45+
46+
* add yarl as dependency
47+
48+
## 1.2.1 (2024-02-07)
49+
50+
* add timing loggin for zone/site updates
51+
* do full logout once per day
52+
* have keepalive task wait for sync check task to sleep before logging out
53+
54+
## 1.2.0 (2024-01-30)
55+
56+
* add exceptions and exception handling
57+
* make code more robust for error handling
58+
* refactor code into smaller objects
59+
* add testing framework
60+
* add poetry
61+
162
## 1.1.5 (2023-12-22)
263

364
* fix more zone html parsing due to changes in Pulse v27

Diff for: README.md

+5-2
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,12 @@ ADT Pulse requires 2 factor authentication to log into their site. When you perf
9898

9999
Internally, ADT uses some Javascript code to create a browser fingerprint. This (very long) string is used to check that the browser has been saved upon subsequent logins. It is the "fingerprint" parameter required to be passed in to the PyADTPulse object constructor.
100100

101-
### Note:
101+
### Notes:
102+
103+
The browser fingerprint will change with a browser/OS upgrade. While it is not strictly necessary to create a separate username/password for logging in through pyadtpulse, it is recommended to do so.
104+
105+
**<ins>Warning:</ins> If another connection is made to the Pulse portal with the same fingerprint, the first connection will be logged out. For this reason it is recommended to use a browser/machine you would not normally use to log into the Pulse web site to generate the fingerprint.**
102106

103-
The browser fingerprint will change with a browser/OS upgrade. For this reason, it is recommended to create a separate username in ADT Pulse just for monitoring.
104107

105108
There are 2 ways to determine this fingerprint:
106109

0 commit comments

Comments
 (0)