Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.2.0-1.2.9 #38

Merged
merged 29 commits into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
a514340
1.2.0 (#5)
rlippmann Feb 2, 2024
1664fb2
1.2.0 (#6)
rlippmann Feb 5, 2024
c3dc061
1.2.1 (#7)
rlippmann Feb 7, 2024
bba47a9
1.2.4 (#8)
rlippmann Feb 8, 2024
40e88fa
don't set not logged in exception when sync check task logs out
rlippmann Feb 10, 2024
2673d9a
change full logout to approximately every 6 hours randomized
rlippmann Feb 10, 2024
21299e2
update changelog and bump version to 1.2.5
rlippmann Feb 10, 2024
ae3c466
Optimizations - released as 1.2.7 (#10)
rlippmann Feb 24, 2024
85024ff
add more detailed loggin for invalid sync check
rlippmann Mar 7, 2024
9b5eb54
don't use empty site id for async_do_login_query()
rlippmann Mar 7, 2024
0982915
don't exit sync check task if service temporarily unavailable or not …
rlippmann Mar 7, 2024
aed28b8
bump version, update changelog
rlippmann Mar 7, 2024
6d67f93
Merge pull request #11 from rlippmann/1.2.8-fixes
rlippmann Mar 7, 2024
d9508d2
ignore query string on check_login_errors
rlippmann Mar 11, 2024
9958d91
remove warning in alarm panel for status unavailable
rlippmann Mar 11, 2024
21a09c5
fix typo
rlippmann Mar 11, 2024
1b93082
add arm night
rlippmann Mar 11, 2024
5008d62
refactor update_alarm_from_etree
rlippmann Mar 11, 2024
702e070
drop max backoff interval to 5 minutes
rlippmann Mar 11, 2024
c935629
bump to newer user agent
rlippmann Mar 11, 2024
2815a83
skip sync check if have backoff_count > WARN_TRANSIENT_THRESHOLD
rlippmann Mar 11, 2024
4091bd1
fix linter issue in _initialize_sites
rlippmann Mar 11, 2024
b2da586
update changelog, bump version to 1.2.9b0
rlippmann Mar 11, 2024
3fc9803
add async_arm_night to site
rlippmann Apr 21, 2024
b04f44c
bump version to 1.2.9-b1
rlippmann Apr 21, 2024
34f8372
bump version to 1.2.9
rlippmann Apr 21, 2024
305b76e
change release date in changelog
rlippmann Apr 21, 2024
a1164f4
Merge pull request #12 from rlippmann/1.2.9-fixes
rlippmann Apr 21, 2024
75794f1
Merge branch 'master' into master
rlippmann Apr 21, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/black.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: psf/black@stable
14 changes: 14 additions & 0 deletions .github/workflows/name: pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: pre-commit

on:
[push, pull_request]

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.11"
- uses: pre-commit/[email protected]
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ __pycache__
.mypy_cache
*.swp
.vscode/settings.json
.coverage
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ repos:
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- repo: https://github.com/asottile/pyupgrade
rev: v3.15.0
hooks:
- id: pyupgrade
args: [--py39-plus]
- repo: https://github.com/psf/black
rev: 24.3.0
hooks:
Expand Down Expand Up @@ -32,3 +37,4 @@ repos:
rev: 'v0.3.4'
hooks:
- id: ruff

9 changes: 9 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python: Debug Tests",
"type": "python",
"request": "launch",
"program": "${file}",
"purpose": ["debug-test"],
"console": "integratedTerminal",
"justMyCode": false
},
{
"name": "Python: Current File",
"type": "python",
Expand Down
7 changes: 6 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{
"python.analysis.typeCheckingMode": "basic",
"python.terminal.activateEnvironment": true
"python.terminal.activateEnvironment": true,
"python.testing.pytestArgs": [
"tests"
],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true
}
35 changes: 35 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
// .vscode/tasks.json
{
"version": "2.0.0",
"tasks": [
{
"label": "Run pytest with coverage",
"type": "shell",
"command": "pytest",
"args": [
"--cov=pyadtpulse",
"--cov-report=html",
"${workspaceFolder}/tests"
],
"group": {
"kind": "test",
"isDefault": false
}
},
{
"label": "Run pytest without coverage",
"type": "shell",
"command": "pytest",
"args": [
"${workspaceFolder}/tests"
],
"group": {
"kind": "test",
"isDefault": true
}
}
]
}
61 changes: 61 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,64 @@
## 1.2.9 (2024-04-21)

* ignore query string in check_login_errors(). This should fix a bug where the task was logged out
but not correctly being identified
* remove unnecessary warning in alarm status check
* add arm night
* refactor update_alarm_from_etree()
* bump to newer user agent
* skip sync check if it will back off
* fix linter issue in _initialize_sites

## 1.2.8 (2024-03-07)

* add more detail to "invalid sync check" error logging
* don't exit sync check task on service temporarily unavailable or invalid login
* don't use empty site id for logins

## 1.2.7 (2024-02-23)

* catch site is None on logout to prevent "have you logged in" errors
* speed improvements via aiohttp-zlib-ng

## 1.2.6 (2024-02-23)

Performance improvements including:

* switch from BeautifulSoup to lxml for faster parsing
* optimize zone parsing to only update zones which have changed
* change wait_for_update() to pass the changed zones/alarm state to caller

## 1.2.5 (2024-02-10)

* don't raise not logged in exception when sync check task logs out
* change full logout interval to approximately every 6 hours

## 1.2.4 (2024-02-08)

* change yarl dependencies

## 1.2.3 (2024-02-08)

* change aiohttp dependencies

## 1.2.2 (2024-02-07)

* add yarl as dependency

## 1.2.1 (2024-02-07)

* add timing loggin for zone/site updates
* do full logout once per day
* have keepalive task wait for sync check task to sleep before logging out

## 1.2.0 (2024-01-30)

* add exceptions and exception handling
* make code more robust for error handling
* refactor code into smaller objects
* add testing framework
* add poetry

## 1.1.5 (2023-12-22)

* fix more zone html parsing due to changes in Pulse v27
Expand Down
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,12 @@ ADT Pulse requires 2 factor authentication to log into their site. When you perf

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.

### Note:
### Notes:

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.

**<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.**

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.

There are 2 ways to determine this fingerprint:

Expand Down
Loading
Loading