Skip to content

Commit

Permalink
Merge pull request #31 from rlippmann/1.1.0
Browse files Browse the repository at this point in the history
1.1.0
  • Loading branch information
rlippmann authored Sep 28, 2023
2 parents 3848aca + 1af0139 commit 0714410
Show file tree
Hide file tree
Showing 17 changed files with 1,767 additions and 1,054 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ build
__pycache__
.mypy_cache
*.swp

.vscode/settings.json
12 changes: 6 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ repos:
hooks:
- id: pycln
args: [--config=pyproject.toml]
#- repo: https://github.com/pycqa/isort
# rev: 5.12.0
# hooks:
# - id: isort
# files: "\\.(py)$"
# args: [--settings-path=pyproject.toml]
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
files: "\\.(py)$"
args: [--settings-path=pyproject.toml]
- repo: https://github.com/dosisod/refurb
rev: v1.15.0
hooks:
Expand Down
4 changes: 2 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
"module": "example-client",
"justMyCode": true,
"args": [
"/home/rlippmann/pulse.json"
"~/pulse.json"
]
}
]
}
}
5 changes: 3 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"python.analysis.typeCheckingMode": "basic"
}
"python.analysis.typeCheckingMode": "basic",
"python.terminal.activateEnvironment": true
}
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
## 1.1 (2023-09-20)

* bug fixes
* relogin support
* device dataclasses

## 1.0 (2023-03-28)

* async support
* background refresh
* bug fixes

## 0.1.0 (2019-12-16)

* added ability to override the ADT API host (example: Canada endpoint portal-ca.adtpulse.com)
Expand Down
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,18 @@ for site in adt.sites:
await site.async_arm_away(force=True)
```

The pyadtpulse object runs background tasks and refreshes its data automatically.

Certain parameters can be set to control how often certain actions are run.

Namely:

```python
adt.poll_interval = 0.75 # check for updates every 0.75 seconds
adt.relogin_interval = 60 # relogin every 60 minutes
adt.keepalive_interval = 10 # run keepalive (prevent logout) every 10 minutes
```

See [example-client.py](example-client.py) for a working example.

## Browser Fingerprinting
Expand Down
6 changes: 5 additions & 1 deletion example-client.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,9 @@
"debug_locks": false,
"adtpulse_user": "[email protected]",
"adtpulse_password": "supersecretpassword",
"adtpulse_fingerprint": "areallyreallyreallyreallyreallylongstring"
"adtpulse_fingerprint": "areallyreallyreallyreallyreallylongstring",
"service_host": "https://portal.adtpulse.com",
"relogin_interval": 60,
"keepalive_interval": 10,
"poll_interval": 0.9
}
Loading

0 comments on commit 0714410

Please sign in to comment.