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

[Python] Process attribute cache updates in Python thread #35557

Merged
merged 3 commits into from
Sep 17, 2024

Conversation

agners
Copy link
Contributor

@agners agners commented Sep 12, 2024

Instead of processing the attribute update in the SDK thread, process them on request in the Python thread. This avoids acks being sent back too late to the device after the last DataReport if there are many attribute updates sent at once.

Currently still the same data model and processing is done. There is certainly also room for optimization to make this more efficient.

This also removes some obsolete/unused functions and cleans up the Read function argument list.

Copy link

semanticdiff-com bot commented Sep 12, 2024

Review changes with SemanticDiff.

Analyzed 3 of 4 files.

Overall, the semantic diff is 69% smaller than the GitHub diff.

Filename Status
✔️ src/controller/python/test/test_scripts/cluster_objects.py Analyzed
✔️ src/controller/python/chip/ChipDeviceCtrl.py 95.22% smaller
✔️ src/controller/python/chip/clusters/Attribute.py 6.37% smaller
docs/guides/repl/Matter_Basic_Interactions.ipynb Unsupported file format

@agners agners force-pushed the avoid-processing-attribute-cache-update-on-sdk-thread branch from d66652c to a9cfd91 Compare September 12, 2024 17:15
Instead of processing the attribute update in the SDK thread, process
them on request in the Python thread. This avoids acks being sent back
too late to the device  after the last DataReport if there are many
attribute updates sent at once.

Currently still the same data model and processing is done. There is
certainly also room for optimization to make this more efficient.
@agners agners force-pushed the avoid-processing-attribute-cache-update-on-sdk-thread branch from a9cfd91 to f378cb6 Compare September 12, 2024 17:27
Copy link

github-actions bot commented Sep 12, 2024

PR #35557: Size comparison from d04a667 to f378cb6

Full report (15 builds for esp32, linux, nrfconnect, nxp, qpg, tizen)
platform target config section d04a667 f378cb6 change % change
esp32 all-clusters-app c3devkit DRAM 94168 94168 0 0.0
FLASH 1539596 1539596 0 0.0
IRAM 82538 82538 0 0.0
m5stack DRAM 115112 115112 0 0.0
FLASH 1549894 1549894 0 0.0
IRAM 117039 117039 0 0.0
linux chip-tool-ipv6only arm64 unknown 20384 20384 0 0.0
FLASH 11341508 11341508 0 0.0
RAM 612376 612376 0 0.0
thermostat-no-ble arm64 unknown 9336 9336 0 0.0
FLASH 4333156 4333156 0 0.0
RAM 242400 242400 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 915168 915168 0 0.0
RAM 142272 142272 0 0.0
nrf7002dk_nrf5340_cpuapp FLASH 886472 886472 0 0.0
RAM 140411 140411 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 FLASH 846520 846520 0 0.0
RAM 141090 141090 0 0.0
nxp contact k32w1+release FLASH 593176 593176 0 0.0
RAM 62536 62536 0 0.0
mcxw71+release FLASH 592936 592936 0 0.0
RAM 62536 62536 0 0.0
light k32w1+release FLASH 679448 679448 0 0.0
RAM 48160 48160 0 0.0
mcxw71+release FLASH 679464 679464 0 0.0
RAM 48160 48160 0 0.0
qpg lighting-app qpg6105+debug FLASH 659060 659060 0 0.0
RAM 105220 105220 0 0.0
lock-app qpg6105+debug FLASH 616968 616968 0 0.0
RAM 99688 99688 0 0.0
tizen all-clusters-app arm unknown 4852 4852 0 0.0
FLASH 1724808 1724808 0 0.0
RAM 89608 89608 0 0.0
chip-tool-ubsan arm unknown 10284 10284 0 0.0
FLASH 17532010 17532010 0 0.0
RAM 7609740 7609740 0 0.0

Copy link

PR #35557: Size comparison from d04a667 to eba1724

Full report (2 builds for nxp)
platform target config section d04a667 eba1724 change % change
nxp contact k32w1+release FLASH 593176 593176 0 0.0
RAM 62536 62536 0 0.0
light k32w1+release FLASH 679448 679448 0 0.0
RAM 48160 48160 0 0.0

@agners agners force-pushed the avoid-processing-attribute-cache-update-on-sdk-thread branch from eba1724 to 1f0182b Compare September 13, 2024 10:45
Copy link

github-actions bot commented Sep 13, 2024

PR #35557: Size comparison from 7a54490 to 1f0182b

Full report (49 builds for bl602, bl702, bl702l, linux, nrfconnect, qpg, stm32, telink)
platform target config section 7a54490 1f0182b change % change
bl602 lighting-app bl602 FLASH 1278156 1278156 0 0.0
RAM 95832 95832 0 0.0
bl602+mfd FLASH 1292010 1292010 0 0.0
RAM 95968 95968 0 0.0
bl602+rpc FLASH 1317120 1317120 0 0.0
RAM 104256 104256 0 0.0
bl702 lighting-app bl702 FLASH 943860 943860 0 0.0
RAM 15153 15153 0 0.0
bl702+mfd FLASH 946260 946260 0 0.0
RAM 15305 15305 0 0.0
bl702+rpc FLASH 1039180 1039180 0 0.0
RAM 24173 24173 0 0.0
bl706-eth FLASH 646056 646056 0 0.0
RAM 25241 25241 0 0.0
bl706-wifi FLASH 894048 894048 0 0.0
RAM 14477 14477 0 0.0
bl702l lighting-app bl702l FLASH 960520 960520 0 0.0
RAM 16812 16812 0 0.0
bl702l+mfd FLASH 963142 963142 0 0.0
RAM 16964 16964 0 0.0
linux air-purifier-app debug unknown 4688 4688 0 0.0
FLASH 2771087 2771087 0 0.0
RAM 128928 128928 0 0.0
all-clusters-app debug unknown 5456 5456 0 0.0
FLASH 6082608 6082608 0 0.0
RAM 514432 514432 0 0.0
all-clusters-minimal-app debug unknown 5352 5352 0 0.0
FLASH 5406670 5406670 0 0.0
RAM 240784 240784 0 0.0
bridge-app debug unknown 5336 5336 0 0.0
FLASH 4740144 4740144 0 0.0
RAM 217824 217824 0 0.0
chip-tool debug unknown 5888 5888 0 0.0
FLASH 12676228 12676228 0 0.0
RAM 562250 562250 0 0.0
chip-tool-ipv6only arm64 unknown 20384 20384 0 0.0
FLASH 11341508 11341508 0 0.0
RAM 612376 612376 0 0.0
fabric-admin debug unknown 5720 5720 0 0.0
FLASH 10978783 10978783 0 0.0
RAM 561306 561306 0 0.0
fabric-bridge-app debug unknown 4568 4568 0 0.0
FLASH 4562880 4562880 0 0.0
RAM 204440 204440 0 0.0
lighting-app debug+rpc+ui unknown 5984 5984 0 0.0
FLASH 5676465 5676465 0 0.0
RAM 228112 228112 0 0.0
lock-app debug unknown 5272 5272 0 0.0
FLASH 4789428 4789428 0 0.0
RAM 203912 203912 0 0.0
ota-provider-app debug unknown 4648 4648 0 0.0
FLASH 4422612 4422612 0 0.0
RAM 197616 197616 0 0.0
ota-requestor-app debug unknown 4584 4584 0 0.0
FLASH 4561356 4561356 0 0.0
RAM 202184 202184 0 0.0
shell debug unknown 4216 4216 0 0.0
FLASH 3107773 3107773 0 0.0
RAM 159624 159624 0 0.0
thermostat-no-ble arm64 unknown 9336 9336 0 0.0
FLASH 4333156 4333156 0 0.0
RAM 242400 242400 0 0.0
tv-app debug unknown 5552 5552 0 0.0
FLASH 6022117 6022117 0 0.0
RAM 587104 587104 0 0.0
tv-casting-app debug unknown 5208 5208 0 0.0
FLASH 10883789 10883789 0 0.0
RAM 650224 650224 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 915168 915168 0 0.0
RAM 142272 142272 0 0.0
nrf7002dk_nrf5340_cpuapp FLASH 886464 886464 0 0.0
RAM 140411 140411 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 FLASH 846520 846520 0 0.0
RAM 141090 141090 0 0.0
qpg lighting-app qpg6105+debug FLASH 659060 659060 0 0.0
RAM 105220 105220 0 0.0
lock-app qpg6105+debug FLASH 616968 616968 0 0.0
RAM 99688 99688 0 0.0
stm32 light STM32WB5MM-DK FLASH 480544 480544 0 0.0
RAM 144676 144676 0 0.0
telink air-quality-sensor-app tlsr9528a_retention FLASH 621718 621718 0 0.0
RAM 50964 50964 0 0.0
all-clusters-app tlsr9118bdk40d FLASH 687326 687326 0 0.0
RAM 149608 149608 0 0.0
all-clusters-minimal-app tlsr9528a FLASH 779908 779908 0 0.0
RAM 110768 110768 0 0.0
bridge-app tlsr9258a FLASH 680802 680802 0 0.0
RAM 91620 91620 0 0.0
contact-sensor-app tlsr9528a_retention FLASH 621482 621482 0 0.0
RAM 50916 50916 0 0.0
light-switch-app-ota-shell-factory-data tlsr9528a FLASH 707514 707514 0 0.0
RAM 74256 74256 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 623742 623742 0 0.0
RAM 145500 145500 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 810036 810036 0 0.0
RAM 99424 99424 0 0.0
lock-app-dfu tlsr9528a FLASH 655346 655346 0 0.0
RAM 66976 66976 0 0.0
ota-requestor-app tlsr9258a FLASH 696776 696776 0 0.0
RAM 91212 91212 0 0.0
pump-app-usb tlsr9518adk80d FLASH 633094 633094 0 0.0
RAM 55784 55784 0 0.0
pump-controller-app tlsr9518adk80d FLASH 610282 610282 0 0.0
RAM 53028 53028 0 0.0
shell tlsr9518adk80d FLASH 467196 467196 0 0.0
RAM 68668 68668 0 0.0
smoke_co_alarm-app tlsr9528a_retention FLASH 628264 628264 0 0.0
RAM 52636 52636 0 0.0
temperature-measurement-app-mars-ota tlsr9518adk80d FLASH 652418 652418 0 0.0
RAM 56576 56576 0 0.0
thermostat tlsr9518adk80d FLASH 637014 637014 0 0.0
RAM 53432 53432 0 0.0
window-covering tlsr9118bdk40d FLASH 522276 522276 0 0.0
RAM 98476 98476 0 0.0

Make sure to get the attribute values again after each command to get
the updated attribute cache.
@agners agners force-pushed the avoid-processing-attribute-cache-update-on-sdk-thread branch from 1f0182b to 61a1106 Compare September 16, 2024 09:42
Copy link

github-actions bot commented Sep 16, 2024

PR #35557: Size comparison from 9de3c6b to 61a1106

Full report (38 builds for esp32, linux, nrfconnect, qpg, telink)
platform target config section 9de3c6b 61a1106 change % change
esp32 all-clusters-app c3devkit DRAM 94160 94160 0 0.0
FLASH 1539514 1539514 0 0.0
IRAM 82538 82538 0 0.0
m5stack DRAM 115096 115096 0 0.0
FLASH 1549838 1549838 0 0.0
IRAM 117039 117039 0 0.0
linux air-purifier-app debug unknown 4688 4688 0 0.0
FLASH 2771107 2771107 0 0.0
RAM 128928 128928 0 0.0
all-clusters-app debug unknown 5456 5456 0 0.0
FLASH 6082602 6082602 0 0.0
RAM 514272 514272 0 0.0
all-clusters-minimal-app debug unknown 5352 5352 0 0.0
FLASH 5406690 5406690 0 0.0
RAM 240624 240624 0 0.0
bridge-app debug unknown 5336 5336 0 0.0
FLASH 4740170 4740170 0 0.0
RAM 217824 217824 0 0.0
chip-tool debug unknown 5888 5888 0 0.0
FLASH 12676228 12676228 0 0.0
RAM 562250 562250 0 0.0
fabric-admin debug unknown 5720 5720 0 0.0
FLASH 10978783 10978783 0 0.0
RAM 561306 561306 0 0.0
fabric-bridge-app debug unknown 4568 4568 0 0.0
FLASH 4562906 4562906 0 0.0
RAM 204440 204440 0 0.0
lighting-app debug+rpc+ui unknown 5984 5984 0 0.0
FLASH 5676481 5676481 0 0.0
RAM 228112 228112 0 0.0
lock-app debug unknown 5272 5272 0 0.0
FLASH 4789448 4789448 0 0.0
RAM 203912 203912 0 0.0
ota-provider-app debug unknown 4648 4648 0 0.0
FLASH 4422638 4422638 0 0.0
RAM 197616 197616 0 0.0
ota-requestor-app debug unknown 4584 4584 0 0.0
FLASH 4561382 4561382 0 0.0
RAM 202184 202184 0 0.0
shell debug unknown 4216 4216 0 0.0
FLASH 3107773 3107773 0 0.0
RAM 159432 159432 0 0.0
tv-app debug unknown 5552 5552 0 0.0
FLASH 6022133 6022133 0 0.0
RAM 587104 587104 0 0.0
tv-casting-app debug unknown 5208 5208 0 0.0
FLASH 10883805 10883805 0 0.0
RAM 650224 650224 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 915124 915124 0 0.0
RAM 142259 142259 0 0.0
nrf7002dk_nrf5340_cpuapp FLASH 886428 886428 0 0.0
RAM 140398 140398 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 FLASH 846468 846468 0 0.0
RAM 141077 141077 0 0.0
qpg lighting-app qpg6105+debug FLASH 659084 659084 0 0.0
RAM 105220 105220 0 0.0
lock-app qpg6105+debug FLASH 616976 616976 0 0.0
RAM 99688 99688 0 0.0
telink air-quality-sensor-app tlsr9528a_retention FLASH 621704 621704 0 0.0
RAM 50964 50964 0 0.0
all-clusters-app tlsr9118bdk40d FLASH 688206 688206 0 0.0
RAM 148388 148388 0 0.0
all-clusters-minimal-app tlsr9528a FLASH 779888 779888 0 0.0
RAM 110756 110756 0 0.0
bridge-app tlsr9258a FLASH 680724 680724 0 0.0
RAM 91620 91620 0 0.0
contact-sensor-app tlsr9528a_retention FLASH 621468 621468 0 0.0
RAM 50916 50916 0 0.0
light-switch-app-ota-shell-factory-data tlsr9528a FLASH 707400 707400 0 0.0
RAM 74256 74256 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 624622 624622 0 0.0
RAM 144292 144292 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 810030 810030 0 0.0
RAM 99424 99424 0 0.0
lock-app-dfu tlsr9528a FLASH 655220 655220 0 0.0
RAM 66976 66976 0 0.0
ota-requestor-app tlsr9258a FLASH 696700 696700 0 0.0
RAM 91212 91212 0 0.0
pump-app-usb tlsr9518adk80d FLASH 633056 633056 0 0.0
RAM 55792 55792 0 0.0
pump-controller-app tlsr9518adk80d FLASH 610246 610246 0 0.0
RAM 53036 53036 0 0.0
shell tlsr9518adk80d FLASH 467176 467176 0 0.0
RAM 68668 68668 0 0.0
smoke_co_alarm-app tlsr9528a_retention FLASH 628246 628246 0 0.0
RAM 52636 52636 0 0.0
temperature-measurement-app-mars-ota tlsr9518adk80d FLASH 652382 652382 0 0.0
RAM 56584 56584 0 0.0
thermostat tlsr9518adk80d FLASH 636976 636976 0 0.0
RAM 53428 53428 0 0.0
window-covering tlsr9118bdk40d FLASH 523152 523152 0 0.0
RAM 97268 97268 0 0.0

@github-actions github-actions bot added the documentation Improvements or additions to documentation label Sep 17, 2024
Copy link

github-actions bot commented Sep 17, 2024

PR #35557: Size comparison from 9de3c6b to 420963a

Full report (51 builds for bl602, bl702, bl702l, cyw30739, esp32, linux, nrfconnect, nxp, psoc6, stm32)
platform target config section 9de3c6b 420963a change % change
bl602 lighting-app bl602 FLASH 1278156 1278168 12 0.0
RAM 95832 95824 -8 -0.0
bl602+mfd FLASH 1292266 1292278 12 0.0
RAM 95968 95968 0 0.0
bl602+rpc FLASH 1317120 1317132 12 0.0
RAM 104256 104248 -8 -0.0
bl702 lighting-app bl702 FLASH 943866 943874 8 0.0
RAM 15153 15145 -8 -0.1
bl702+mfd FLASH 946266 946274 8 0.0
RAM 15305 15305 0 0.0
bl702+rpc FLASH 1039186 1039194 8 0.0
RAM 24173 24173 0 0.0
bl706-eth FLASH 646062 646070 8 0.0
RAM 25241 25233 -8 -0.0
bl706-wifi FLASH 894064 894082 18 0.0
RAM 14477 14477 0 0.0
bl702l lighting-app bl702l FLASH 960526 960534 8 0.0
RAM 16812 16804 -8 -0.0
bl702l+mfd FLASH 963148 963156 8 0.0
RAM 16964 16964 0 0.0
cyw30739 light CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 677249 677261 12 0.0
RAM 78492 78492 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 697101 697113 12 0.0
RAM 81132 81124 -8 -0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 697101 697113 12 0.0
RAM 81132 81124 -8 -0.0
CYW930739M2EVB-02 unknown 2040 2040 0 0.0
FLASH 654037 654041 4 0.0
RAM 73560 73560 0 0.0
light-switch CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 613441 613453 12 0.0
RAM 71460 71452 -8 -0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 633077 633081 4 0.0
RAM 74004 74004 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 633077 633081 4 0.0
RAM 74004 74004 0 0.0
lock CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 632561 632573 12 0.0
RAM 74508 74500 -8 -0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 652277 652289 12 0.0
RAM 77052 77052 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 652277 652289 12 0.0
RAM 77052 77052 0 0.0
thermostat CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 607985 607989 4 0.0
RAM 68588 68588 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 627837 627841 4 0.0
RAM 71228 71220 -8 -0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 627837 627841 4 0.0
RAM 71228 71220 -8 -0.0
esp32 all-clusters-app c3devkit DRAM 94160 94152 -8 -0.0
FLASH 1539514 1539526 12 0.0
IRAM 82538 82538 0 0.0
m5stack DRAM 115096 115096 0 0.0
FLASH 1549838 1549846 8 0.0
IRAM 117039 117039 0 0.0
linux air-purifier-app debug unknown 4688 4688 0 0.0
FLASH 2771107 2771233 126 0.0
RAM 128928 128944 16 0.0
all-clusters-app debug unknown 5456 5456 0 0.0
FLASH 6082602 6082726 124 0.0
RAM 514272 514288 16 0.0
all-clusters-minimal-app debug unknown 5352 5352 0 0.0
FLASH 5406690 5406782 92 0.0
RAM 240624 240640 16 0.0
bridge-app debug unknown 5336 5336 0 0.0
FLASH 4740170 4740294 124 0.0
RAM 217824 217840 16 0.0
chip-tool debug unknown 5888 5888 0 0.0
FLASH 12676228 12676354 126 0.0
RAM 562250 562282 32 0.0
chip-tool-ipv6only arm64 unknown 20384 20384 0 0.0
FLASH 11341508 11341604 96 0.0
RAM 612376 612384 8 0.0
fabric-admin debug unknown 5720 5720 0 0.0
FLASH 10978783 10978909 126 0.0
RAM 561306 561322 16 0.0
fabric-bridge-app debug unknown 4568 4568 0 0.0
FLASH 4562906 4563032 126 0.0
RAM 204440 204456 16 0.0
lighting-app debug+rpc+ui unknown 5984 5984 0 0.0
FLASH 5676481 5676609 128 0.0
RAM 228112 228128 16 0.0
lock-app debug unknown 5272 5272 0 0.0
FLASH 4789448 4789574 126 0.0
RAM 203912 203928 16 0.0
ota-provider-app debug unknown 4648 4648 0 0.0
FLASH 4422638 4422762 124 0.0
RAM 197616 197632 16 0.0
ota-requestor-app debug unknown 4584 4584 0 0.0
FLASH 4561382 4561508 126 0.0
RAM 202184 202200 16 0.0
shell debug unknown 4216 4216 0 0.0
FLASH 3107773 3107901 128 0.0
RAM 159432 159448 16 0.0
thermostat-no-ble arm64 unknown 9336 9336 0 0.0
FLASH 4333164 4333260 96 0.0
RAM 242256 242256 0 0.0
tv-app debug unknown 5552 5552 0 0.0
FLASH 6022133 6022261 128 0.0
RAM 587104 587088 -16 -0.0
tv-casting-app debug unknown 5208 5208 0 0.0
FLASH 10883805 10883805 0 0.0
RAM 650224 650256 32 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 915124 915124 0 0.0
RAM 142259 142259 0 0.0
nrf7002dk_nrf5340_cpuapp FLASH 886428 886440 12 0.0
RAM 140398 140398 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 FLASH 846468 846468 0 0.0
RAM 141077 141077 0 0.0
nxp contact k32w0+release FLASH 580516 580520 4 0.0
RAM 70720 70720 0 0.0
light k32w0+release FLASH 616312 616316 4 0.0
RAM 70184 70184 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1646908 1646916 8 0.0
RAM 210960 210952 -8 -0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1550532 1550556 24 0.0
RAM 207672 207664 -8 -0.0
light cy8ckit_062s2_43012 FLASH 1466436 1466468 32 0.0
RAM 200672 200672 0 0.0
lock cy8ckit_062s2_43012 FLASH 1462956 1462988 32 0.0
RAM 225024 225024 0 0.0
stm32 light STM32WB5MM-DK FLASH 480560 480568 8 0.0
RAM 144676 144668 -8 -0.0

@mergify mergify bot merged commit d292892 into master Sep 17, 2024
131 of 133 checks passed
@mergify mergify bot deleted the avoid-processing-attribute-cache-update-on-sdk-thread branch September 17, 2024 13:51
agners added a commit to home-assistant-libs/chip-wheels that referenced this pull request Sep 17, 2024
This adds Attribute cache update improvements and some other minor fixes
from the master branch to our 1.3 branch.

Specifically, this integrates changes from the following PRs
- project-chip/connectedhomeip#35380
- project-chip/connectedhomeip#34833
- project-chip/connectedhomeip#35557
yyzhong-g pushed a commit to yyzhong-g/connectedhomeip that referenced this pull request Dec 12, 2024
…ip#35557)

* [Python] Process attribute cache updates in Python thread

Instead of processing the attribute update in the SDK thread, process
them on request in the Python thread. This avoids acks being sent back
too late to the device  after the last DataReport if there are many
attribute updates sent at once.

Currently still the same data model and processing is done. There is
certainly also room for optimization to make this more efficient.

* Get updated attribute values

Make sure to get the attribute values again after each command to get
the updated attribute cache.

* Reference ReadEvent/ReadAttribute APIs on dev controller object
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
controller documentation Improvements or additions to documentation review - approved
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants