Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
980 commits
Select commit Hold shift + click to select a range
e0cb7b5
Try 3
bouwew Apr 6, 2025
e975209
Fix timestamp for added log
bouwew Apr 6, 2025
8e3a4b4
Change frozen time
bouwew Apr 6, 2025
26593c8
Fix wrong asserts
bouwew Apr 6, 2025
62233de
Correct timestamps for collected_pulses()
bouwew Apr 10, 2025
5250b51
Lower frozen time
bouwew Apr 6, 2025
3c10b8b
Add asserts, correct from_timestamps
bouwew Apr 6, 2025
5f80358
Fix last-day assert
bouwew Apr 6, 2025
4b89110
Add/update collected_pulses asserts for pulse-counter reset
bouwew Apr 6, 2025
85eccc2
Test-updates
bouwew Apr 6, 2025
764ec8b
Drop log when exact 24hrs old
bouwew Apr 6, 2025
cb07947
Remove no longer available hourly_reset assert
bouwew Apr 10, 2025
03ef20c
Adapt test-assert
bouwew Apr 10, 2025
cbffb73
Enable extra tests
bouwew Apr 10, 2025
5a1fac1
Fix assert
bouwew Apr 10, 2025
efebab1
Uncomment disabled test-asserts
bouwew Apr 11, 2025
f7165b5
Cleanup
bouwew Apr 18, 2025
f3b108f
HOI debug
bouwew Apr 21, 2025
03881d7
Full test-output
bouwew Apr 21, 2025
e754279
Call allow_join_request() via accept_join_request setter
bouwew Apr 21, 2025
2149fd9
Revert
bouwew Apr 21, 2025
95a6019
Enable/disable automatic joining based on accept_join_request
bouwew Apr 21, 2025
44d4602
Limit sending allow_join_request()
bouwew Apr 21, 2025
b96b74e
Bump to a90
bouwew Apr 21, 2025
4c457ef
Update _old_acc_join_req
bouwew Apr 21, 2025
c17f100
Bump to a91
bouwew Apr 21, 2025
f8d78a6
Execute allow_join_requests() after network.is_running
bouwew Apr 21, 2025
c6317f7
Break out
bouwew Apr 22, 2025
61a0681
Execute allow_join_requests() with accept_join_request state being set
bouwew Apr 22, 2025
479816f
Clean up, add logger
bouwew Apr 22, 2025
9623138
Bump to a92
bouwew Apr 22, 2025
2045242
Handle async function-call properly
bouwew Apr 22, 2025
c6a9ef0
Correct syntax
bouwew Apr 22, 2025
e458c11
Remove double code
bouwew Apr 22, 2025
ef84f98
Try async setter construct
bouwew Apr 22, 2025
bbf65a9
Fix testing
bouwew Apr 22, 2025
887f307
Try calling allow_join_requests via create_task()
bouwew Apr 22, 2025
7808bac
Bump to a93
bouwew Apr 22, 2025
9142104
Remove unused
bouwew Apr 23, 2025
b84d1c4
Register node in node_join_available_message()
bouwew Apr 23, 2025
4fcd0eb
Bump to a94
bouwew Apr 23, 2025
0e3192a
Improve debug-message
bouwew Apr 23, 2025
0b836e9
Add missing await
bouwew Apr 23, 2025
7f706d9
Bump to a95
bouwew Apr 23, 2025
bff21f0
Change debug-message
bouwew Apr 23, 2025
235d448
Set asyncio_default_fixture_loop_scope to "session"
bouwew Apr 23, 2025
8b99c71
Update actions/* versions
bouwew Apr 23, 2025
6266dde
More version-updates
bouwew Apr 23, 2025
df7c234
Disable testcase
bouwew Apr 24, 2025
bf01dd4
Bump to a96
bouwew Apr 25, 2025
d92a806
Base NodeAddRequest on StickResponse
bouwew Apr 25, 2025
e3a9a5a
Add new found firmware version
bouwew Apr 25, 2025
96cae34
Bump to a97
bouwew Apr 25, 2025
64aefd9
Change max version to 2.5 for added firware
bouwew Apr 25, 2025
c66fd0e
Bump to a98
bouwew Apr 25, 2025
5cea70d
Correct corrected_pulses to 0 when negative
bouwew Apr 25, 2025
b3ed80b
Bump to a99
bouwew Apr 25, 2025
d8bc959
Revert "Correct corrected_pulses to 0 when negative"
bouwew Apr 26, 2025
f7fedb1
Update __init__.py
bouwew May 1, 2025
71a9501
Update connection-files
bouwew May 1, 2025
7e9cf84
Update messages files
bouwew May 1, 2025
3059b50
Update network files
bouwew May 1, 2025
4e10f93
Update node-helper files
bouwew May 1, 2025
5587db0
Update test-files
bouwew May 1, 2025
007712f
Fix formatting
bouwew May 1, 2025
1d4c590
Fix double logging
bouwew May 1, 2025
9a6855e
Clean up
bouwew May 1, 2025
426dcd8
Update network-register_node fault handling
bouwew May 1, 2025
9b8ef1e
Back to normal test output
bouwew May 1, 2025
fa92146
Set to latest a-version on testpypi
bouwew May 1, 2025
4299d19
Revert back to standard uses: actions notation
bouwew May 1, 2025
7770fe8
Fix typo
bouwew May 1, 2025
fdc5523
Improve queue - submit()
bouwew May 1, 2025
38cc073
Bump to a112
bouwew May 1, 2025
620e42b
Add CirclePlusAllowJoiningRequest with response to RESPONSE_MESSAGES
bouwew May 2, 2025
75c9efa
Alternative method of getting/setting accept_joiN_request
bouwew May 2, 2025
305d4b7
Test: move unneeded line
bouwew May 4, 2025
0099e73
Bump to a113
bouwew May 4, 2025
528f88f
Update pyproject.toml - fix license
bouwew May 4, 2025
e2a3404
Clean up packaging config
bouwew May 4, 2025
4015c48
Bump verify CACHE_VERSION
bouwew May 4, 2025
4d2c54a
Update CODEOWNERS
bouwew May 4, 2025
2a63799
pyproject corrections
bouwew May 4, 2025
94ba236
Set setuptools to v80.3
bouwew May 4, 2025
24aa452
Try v80.2
bouwew May 4, 2025
d050dbb
Hard-fix to v80.2.0
bouwew May 4, 2025
a524e8c
Bump CACHE_VERSION
bouwew May 4, 2025
bc0185b
Force update
bouwew May 4, 2025
5c5dc1d
Bump setuptools to v80.3.1
bouwew May 5, 2025
c700ff8
Guard subscribing to NODE_JOIN_ID
bouwew May 5, 2025
f8f1252
Clean up
bouwew May 5, 2025
403d503
Fix subscription-guarding
bouwew May 5, 2025
5b1b533
Re-enable test_stick_node_join_subscription test case
bouwew May 5, 2025
fa75498
Re-fix guarding
bouwew May 5, 2025
24ef2df
Revert "Re-enable test_stick_node_join_subscription test case"
bouwew May 5, 2025
d85c23f
Improve network.register_node()
bouwew May 5, 2025
38d693d
Add NodeAddRequest with NodeJoinAckResponse
bouwew May 6, 2025
59a6807
Disable no_response_expected for NodeAddRequest
bouwew May 6, 2025
913d9e4
Add back response-code to register_node()
bouwew May 6, 2025
34c6cbe
Revert part of node_join_available_message() changes
bouwew May 6, 2025
ecf131e
Add NODE_REJOIN_ID indentifier and corresponding response
bouwew May 6, 2025
79a1276
Enable test_stick_node_join_subscription test case
bouwew May 6, 2025
2d616c1
Fixes
bouwew May 6, 2025
fd42978
Don't check ack_id, might be not applicable
bouwew May 6, 2025
27fc2e1
Bump to a114
bouwew May 6, 2025
8762776
Remove unused import
bouwew May 6, 2025
0d5a86a
Disable logger
bouwew May 6, 2025
e2a80bb
Bump to a115
bouwew May 6, 2025
d04c37b
Walrus fix
bouwew May 6, 2025
af9b632
Increase the node_response-timeout to 45 seconds
bouwew May 6, 2025
65ae1ab
Create NodeResponseType REJOINING and use
bouwew May 7, 2025
c9d69d7
Import NodeResponseType
bouwew May 7, 2025
d97c819
Implement try-except for unregistering node
bouwew May 7, 2025
66dc7db
Implement more try-excepts
bouwew May 7, 2025
5e598be
Add missing import
bouwew May 7, 2025
c750bc0
Bump to a116
bouwew May 7, 2025
5105d8d
Improve error-propagation
bouwew May 7, 2025
531a5e0
Bump to a117
bouwew May 7, 2025
10865fa
Handle last_address < first_address
bouwew May 8, 2025
ab167d1
Improve
bouwew May 8, 2025
e6c2d6b
Revert all no_node_response_expected changes
bouwew May 8, 2025
1638364
Fix NodeAddRequest response
bouwew May 8, 2025
30fce53
Guard for 6015 to 1 address-rollover
bouwew May 8, 2025
f6733c8
Bump to a118
bouwew May 8, 2025
3361ab3
Don't guard in node_join_available_message()
bouwew May 10, 2025
03f749a
Guard in register_node() instead
bouwew May 10, 2025
81cd95c
Bump to a119
bouwew May 10, 2025
c2d7ebd
Make sure to return False
bouwew May 10, 2025
8192801
Remove unreachable code
bouwew May 10, 2025
e2f1d53
Call register_node() in node_join_available_message()
bouwew May 10, 2025
e535cd6
Disable test-code, fix seq_id
bouwew May 10, 2025
c6c9825
Bump to a120
bouwew May 10, 2025
fff3be8
Fix log-message formatting
bouwew May 10, 2025
518606c
Revert to async-original-like, add debug-logging to registry-register…
bouwew May 12, 2025
4648eb3
Add more debug-logging
bouwew May 12, 2025
a2a9f25
Pylint fixes
bouwew May 12, 2025
cd614a7
Bump to a121
bouwew May 12, 2025
e4db78b
NodeAddRequest: change for testing
bouwew May 13, 2025
9a66466
Also change register_node() for testing
bouwew May 13, 2025
0ec1959
Bump to a122
bouwew May 13, 2025
5afbda5
Fix Priority class header
bouwew May 13, 2025
a0e3733
Set STICK_TIMEOUT to 30 secs
bouwew May 13, 2025
2c7e2d9
Bump to a123
bouwew May 13, 2025
7815d54
Debug network_address()
bouwew May 13, 2025
844b0cb
Add missing "f"
bouwew May 13, 2025
743f929
Fix typo
bouwew May 13, 2025
e8038b6
Bump to a124
bouwew May 13, 2025
5b3036f
Add register_rejoined_node() function
bouwew May 13, 2025
60cdb75
And implement
bouwew May 13, 2025
908d1a0
Bump to a125
bouwew May 14, 2025
7bb6a28
Fix
bouwew May 14, 2025
f0de9dd
Update debug-header message
bouwew May 14, 2025
b19e730
Revert STICK_TIMEOUT change
bouwew May 14, 2025
fcdb26f
Improve register_node()
bouwew May 14, 2025
ef895ad
Improve unregister_node()
bouwew May 14, 2025
4c35bba
Optimize: change function-name to update_node_registration
bouwew May 14, 2025
fc8016a
Increase timeouts for testing
bouwew May 14, 2025
366871e
Bump to a126
bouwew May 14, 2025
962d59a
Add _reply_identifiler for NodeAddRequest
bouwew May 15, 2025
8236041
NodeAddRequest: re-add responsetype-checking
bouwew May 15, 2025
1c6531d
Remove unused constant
bouwew May 15, 2025
6e9d756
Bump to a127
bouwew May 15, 2025
f334a1a
Add noderesponse-type comments
bouwew May 15, 2025
3fbdd58
Implement no_stick_response work-around for NodeAddRequest
bouwew May 15, 2025
d033aa5
Fix ident
bouwew May 15, 2025
de2dff9
Add missing return
bouwew May 15, 2025
08e79d6
Bump to a128
bouwew May 15, 2025
2ce7b2c
Set retries to 6 for NodeAddRequest
bouwew May 16, 2025
c4e3177
Remove failing debug-logging, improve MessageError
bouwew May 16, 2025
00ccbe2
Bump to a129
bouwew May 16, 2025
59d7fee
Pylint fix
bouwew May 16, 2025
87eb5e5
Revert timeout-changes
bouwew May 16, 2025
ab633f2
Simplify NodeAddRequest and adapt related
bouwew May 16, 2025
8a227aa
Remove unused imports
bouwew May 16, 2025
2a4455f
Bump to a130
bouwew May 16, 2025
84b2b97
Clean up all !r
bouwew May 17, 2025
6650ca7
Revert blocking stick_response for NodeAddRequest
bouwew May 17, 2025
29f7ce8
Bump to a132
bouwew May 17, 2025
69b1ba1
Revert NodeAddRequest related changes
bouwew May 17, 2025
8006df0
Bump to a133
bouwew May 17, 2025
9f8fc6c
Improve debug message
bouwew May 18, 2025
79a4528
Revert "Clean up all !r"
bouwew May 18, 2025
df6e295
Revert 2 more !r removals
bouwew May 18, 2025
b946dba
Force response to prio-queue with nowait
bouwew May 18, 2025
cfec979
Bump to a134
bouwew May 18, 2025
4dd7581
Improve debug-message
bouwew May 18, 2025
be62a2a
Revert "Force response to prio-queue with nowait"
bouwew May 18, 2025
f800e02
Fix logic for node_join_available_message() and node_rejoin_message()
bouwew May 18, 2025
4e7c633
Add helper-comment
bouwew May 19, 2025
9a45d76
Don't expect a node response for NodeAddRequest
bouwew May 19, 2025
4b0f576
Adapt related
bouwew May 19, 2025
1f319d2
Improve debug-message
bouwew May 19, 2025
8b07447
Adapt connection-sender for no response expected
bouwew May 19, 2025
6f2ac29
Cleanup
bouwew May 19, 2025
041a3c3
Don't notify node_event_subscriber, will be done when the NodeRejoin …
bouwew May 19, 2025
4d3d3d2
Set NodeAddRequest _reply_identifier to None
bouwew May 19, 2025
c69689d
Bump to a135
bouwew May 19, 2025
f7b400c
Revert use of None in subscribe to response
bouwew May 19, 2025
b7fff92
Bump to a136
bouwew May 19, 2025
3a11f86
Improve set_accept_join_request()
bouwew May 20, 2025
d213399
Bump to a137
bouwew May 20, 2025
3806bac
Fix
bouwew May 20, 2025
a8654dd
Revert NODE_TIMEOUT back to 15
bouwew May 20, 2025
95fafb6
Remove unused request-response pair
bouwew May 20, 2025
aa468f1
Make sure to set accept_join_request
bouwew May 20, 2025
4a8bd7f
Bump to a138
bouwew May 20, 2025
96ddeeb
Output bool from set_accept_join_request()
bouwew May 21, 2025
9aaa9fa
Bump to a139
bouwew May 21, 2025
e8091cb
Update_node_registration() should not be async
bouwew May 21, 2025
c057027
Bump to a140
bouwew May 21, 2025
d074dcb
NodeAddRequest: return to default retrying
bouwew May 22, 2025
434f853
Add fault-handling in registry-register_node()
bouwew May 22, 2025
b92ed96
Bump to a141
bouwew May 22, 2025
0d86054
Bump to v0.40.0b2
bouwew May 23, 2025
190caf9
Fix network-node_awake_message()
bouwew May 23, 2025
76d360c
Fix node-initialize()
bouwew May 23, 2025
e245c84
Sed format fixes
bouwew May 23, 2025
d735f8e
Fix taskId
bouwew May 23, 2025
f3fc3d3
Nodes-helpers-pulses: remove unused lines
bouwew May 23, 2025
4b6641a
Test_usb: add missing switch-asserts
bouwew May 23, 2025
35e1e0b
Merge if statements with enclosing one
bouwew May 23, 2025
5e0a2d0
Responses: optimize
bouwew May 23, 2025
d69a677
Network-init: optimize
bouwew May 23, 2025
aa84271
Fix doubles
bouwew May 23, 2025
1b572aa
Add comment for pass
bouwew May 23, 2025
d7912a1
Use negative to avoid pass
bouwew May 23, 2025
fcb01c3
Clean up
bouwew May 23, 2025
1d300f0
Improve _process_stick_response()
bouwew May 23, 2025
e94f0c8
Improve PlugwiseCelsius class
bouwew May 23, 2025
448217d
Implement switch improvements
bouwew May 23, 2025
9b4da7a
Implement another two improvement suggestions
bouwew May 23, 2025
35ee5ee
More improvements
bouwew May 23, 2025
b7a1e13
More improvements 2
bouwew May 23, 2025
23a515a
Format total_seconds to int
bouwew May 24, 2025
6e8694e
Scan: sensitivity-fixes
bouwew May 24, 2025
3b5e551
Switch: remove unused self
bouwew May 24, 2025
efbbfd5
Pulses: fix wrong logic
bouwew May 24, 2025
ed503f8
Sed: remove unneeded code, implement suggested lock-fixes
bouwew May 24, 2025
a1d179a
_last_known_duration(): add extra guarding
bouwew May 24, 2025
eef7c48
define constants for reused errors
ArnoutD May 24, 2025
ccd1493
Pulses: correct mistake
bouwew May 24, 2025
07459a2
Implement suggested port-related improvements
bouwew May 24, 2025
0fad395
Add missing space
bouwew May 24, 2025
0364a36
Revert port-related deletion/change
bouwew May 24, 2025
a482a35
Bump to b3 for testing
bouwew May 24, 2025
a87b8d0
Merge pull request #244 from plugwise/bump_b3
bouwew May 24, 2025
e6afe02
Update CHANGELOG
bouwew May 25, 2025
d708f94
CHANGELOG format fix
bouwew May 25, 2025
43bfb01
Improve/amend CHANGELOG
bouwew May 25, 2025
cba53b1
Set to v0.40.0 release-version
bouwew May 25, 2025
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
1 change: 1 addition & 0 deletions .github/workflows/merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ on:
types: closed
branches:
- main
- async

jobs:
publishing:
Expand Down
20 changes: 9 additions & 11 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
name: Latest commit

env:
CACHE_VERSION: 22
CACHE_VERSION: 24
DEFAULT_PYTHON: "3.13"
PRE_COMMIT_HOME: ~/.cache/pre-commit

Expand Down Expand Up @@ -48,9 +48,8 @@ jobs:
pip install virtualenv --upgrade
python -m venv venv
. venv/bin/activate
pip install uv
uv pip install -U pip setuptools wheel
uv pip install -r requirements_test.txt -r requirements_commit.txt
pip install -U pip setuptools wheel
pip install -r requirements_test.txt -r requirements_commit.txt
- name: Restore pre-commit environment from cache
id: cache-precommit
uses: actions/cache@v4
Expand Down Expand Up @@ -98,7 +97,7 @@ jobs:
- name: Ruff (check)
run: |
. venv/bin/activate
#ruff check plugwise_usb/*py tests/*py
#ruff plugwise_usb/*py tests/*py
echo "***"
echo "***"
echo "Code is not up to par for ruff, skipping"
Expand All @@ -108,7 +107,7 @@ jobs:
if: failure()
run: |
. venv/bin/activate
ruff check --fix plugwise_usb/*py tests/*py
ruff --fix plugwise_usb/*py tests/*py
git config --global user.name 'autoruff'
git config --global user.email 'plugwise_usb@users.noreply.github.com'
git remote set-url origin https://x-access-token:${{ secrets.PAT_CT }}@github.com/$GITHUB_REPOSITORY
Expand Down Expand Up @@ -200,12 +199,11 @@ jobs:
run: |
python -m venv venv
. venv/bin/activate
pip install uv
uv pip install -U pip setuptools wheel
# uv pip install -r requirements_test.txt
pip install -U pip setuptools wheel
#pip install -r requirements_test.txt
# 20220124 Mimic setup_test.sh
uv pip install --upgrade -r requirements_test.txt -c https://raw.githubusercontent.com/home-assistant/core/dev/homeassistant/package_constraints.txt -r https://raw.githubusercontent.com/home-assistant/core/dev/requirements_test.txt -r https://raw.githubusercontent.com/home-assistant/core/dev/requirements_test_pre_commit.txt
uv pip install --upgrade pytest-asyncio
pip install --upgrade -r requirements_test.txt -c https://raw.githubusercontent.com/home-assistant/core/dev/homeassistant/package_constraints.txt -r https://raw.githubusercontent.com/home-assistant/core/dev/requirements_test.txt -r https://raw.githubusercontent.com/home-assistant/core/dev/requirements_test_pre_commit.txt
pip install --upgrade pytest-asyncio

pytest:
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ tests/__pycache__
.coverage
.vscode
venv
.venv
fixtures/*
!fixtures/.keep
*.sedbck
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ci:

default_language_version:
# force all unspecified python hooks to run python3
python: python3.12
python: python3.13

repos:
# Run manually in CI skipping the branch checks
Expand Down
35 changes: 30 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,43 @@
# Changelog

## Ongoing
## v0.40.0

- Ensure CI process remains operational
- Bumped pip to now prepend uv for using quicker dependency resolving and installing
- As for latest HA Core USB team should rework to python 3.12 (not still 3.10)
- Make auto-joining work: (@bouwew)
- Correct setting of accept_join_request which enables the auto-joining (only temporarily!)
- Change NodeAddRequest to not expect a response, the NodeRejoinResponse is often delayed past the NODE_TIMEOUT
- Use the already present response-subscription to capture the NodeRejoinResponse and initialize to joining of a Node
- Improve async task-handling, this should stress the CPU less (@bouwew)
- Limit cache-size to 24hrs instead of to 1 week (@bouwew, @ArnoutD)
- Implement support for devices with production enabled (@bouwew)
- Collect Stick NodeInfo for use in HA (@bouwew)
- Several bugfixes (@ArnoutD)
- Github improvements/fixes, python 3.13 (@CoMPaTech, @bouwew)
- Async fixes - implement queue-based message processing (@ArnoutD - #141)

## v0.40.0 (a22)

- Correcting messageflow to HA (@ArnoutD)

## v0.40.0 (a4)

Full rewrite of library into async version (@brefra).
Main list of changes:

- Full async and typed
- Improved protocol handling
- Support for local caching of collected data to improve startup and device detection
- Improved handling of edge cases especially for energy data collection
- Based on detected firmware version enable the supported features
- API details about supported data is combined into api.py
- Added tests

## v0.31.4(a0)

- Re-add python 3.12 checks and compatibility

## v0.31.3

- Bugfix midnight rollover for cicrles without power usage registered during first hour(s)
- Bugfix midnight rollover for circles without power usage registered during first hour(s)

## v0.31.2

Expand Down
4 changes: 1 addition & 3 deletions CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@

# Specific files
setup.cfg @plugwise/plugwise-usb
setup.py @plugwise/plugwise-usb
pyproject.toml @plugwise/plugwise-usb
requirements*.txt @plugwise/plugwise-usb

# Main code
/plugwise/ @plugwise/plugwise-usb
/userdata/ @plugwise/plugwise-usb
/plugwise_usb/ @plugwise/plugwise-usb

# Tests and development support
/tests/ @plugwise/plugwise-usb
Expand Down
Loading
Loading