Skip to content

Commit

Permalink
Update to Matter SDK wheels 2024.9.0
Browse files Browse the repository at this point in the history
The 2024.9.0 wheels come with an improved attribute cache handling: The
Attribute cache only gets updated when actually uesd. This will save
Attribute cache updates in Subscriptions typically, and moves Attribute
cache updates for reads out of the SDK thread.
  • Loading branch information
agners committed Sep 18, 2024
1 parent bd2ddf3 commit e1f50b6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
10 changes: 6 additions & 4 deletions matter_server/server/sdk.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,15 +338,17 @@ async def read(
allowPASE=False,
timeoutMs=None,
)
transaction = Attribute.AsyncReadTransaction(
future, self.server.loop, self._chip_controller, True
)
Attribute.Read(
future=future,
eventLoop=self.server.loop,
transaction=transaction,
device=device.deviceProxy,
devCtrl=self._chip_controller,
attributes=attributes,
fabricFiltered=fabric_filtered,
).raise_on_error()
return await future
await future
return transaction.GetReadResponse()

async def write_attribute(
self,
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ dependencies = [
"async-timeout",
"coloredlogs",
"orjson",
"home-assistant-chip-clusters==2024.7.1",
"home-assistant-chip-clusters==2024.9.0",
]
description = "Python Matter WebSocket Server"
license = {text = "Apache-2.0"}
Expand All @@ -39,7 +39,7 @@ server = [
"cryptography==43.0.1",
"orjson==3.10.7",
"zeroconf==0.134.0",
"home-assistant-chip-core==2024.7.1",
"home-assistant-chip-core==2024.9.0",
]
test = [
"aioresponses==0.7.6",
Expand Down

0 comments on commit e1f50b6

Please sign in to comment.