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

Add Bismuth Matter testification bypass #101

Open
wants to merge 49 commits into
base: main
Choose a base branch
from

Conversation

cka-dev
Copy link

@cka-dev cka-dev commented Sep 21, 2024

No description provided.

leonardmgh and others added 30 commits March 21, 2024 18:08
Do not print to the console but use the Python logging module
explicitly.
…e-python-logging-always

Add patch to use Python logging everywhere
The call GetConnectedDeviceSync may block for an extended period of
time, especially when the CASE session needs to get reestablished. This
adds an implementation of GetConnectedDeviceSync which uses asyncio to
keep the asyncio event loop running.
…ync-friendly-get-connected-device

Add patch which implements async GetConnectedDevice
Upload wheels from the connectedhomeip directory which is now where the
Matter SDK lives. This makes sure that wheel builds for macOS are
available as well.
…x-upload-path-release

Upload all wheels from correct path
The patch which implements async GetConnectedDevice requires the
_DeviceAvailableCallback which got introduced with the fix which
keeps a reference to callback function when using a timeout.

Reorder the patch in a sensible order.

The main/v1.3 branch already has this change upstream.
…d-dependent-patch

Add dependent patch which introduces _DeviceAvailableCallback
Node ID logging is already part of v1.3. Simply enable it by default for
our purpose.
…date-node-id-logging-patch

Rebase node ID logging patch
…bug-status-16-issue

[Python] Fix Event callback for ARM64 Apple Platform devices
…date-to-latest-v1.3-branch

Update Matter SDK to `648d7bf3d2` from v1.3-branch
…d-untyped-attribute-callback

Add untyped attribute callback support
This adds a patch which removes some obsolte callback handling. This
especially fixes race condition when calling the Python Device Controller
from multiple Threads. Commands with callbacks (e.g. commissioning or
opening the commissioning window) have a high likelyhood to get released
early when other functions of the Python Device Controller were called
simultaniously.

Note that this doesn't make the Python Device Controller fully
reentrant: All calls which have callbacks still share a single event
object. This fixes merly some unnecessary non-reentrancy.
…x-race-with-commissioning

Add patch to fix race condition especially during commissioning
Add patches from upstream master branch which improve the Python
controller bindings. Notable this makes use of more asyncio calls in the
SDK stack, updates some defines around logging, drops unnecessary and
obsolete logging code, and removes quite some unnecessary code in
general.
- [Python] Remove Python Bluetooth and ChipStack event loop integration
- [Python] Add TriggerResubscribeIfScheduled to SubscriptionTransaction
This adds more cleanups from the master branch to keep our 1.3 based
branch close to upstream. Most noteworthy here are a patch which stops
mDNS discovery when using the on-network commissioning API, fixes when
commissioning using WiFi/Thread setup through BLE directly (the Python
Matter Server isn't using this APIs currently), dropping unnecessary
code and and general messaging cleanup.

Specifically, this integrates changes from the following PRs
- project-chip/connectedhomeip#33882
- project-chip/connectedhomeip#33896
- project-chip/connectedhomeip#33891
- project-chip/connectedhomeip#33880
- project-chip/connectedhomeip#33914
- project-chip/connectedhomeip#33915
- project-chip/connectedhomeip#33933
…re-python-controller-cleanups

Update Python controller bindings with latest patches
agners and others added 19 commits June 20, 2024 18:17
This adds commissioning API updates from the master branch to our 1.3
based branch. This makes the commissioning API more Pythonic and allows
to call them from the asyncio event loop directly.

Specifically, this integrates changes from the following PRs
- project-chip/connectedhomeip#33954
- project-chip/connectedhomeip#33905
- project-chip/connectedhomeip#34001
- project-chip/connectedhomeip#33989
…tegrate-commissioning-api-async-refactor

Update Python controller bindings with latest Commissioning API updates
Increase the limit of maximum amount of devices supported. This avoids
CASE session getting evicted prematurely which leads to errors like:
Data received on an unknown session (LSID=4729). Dropping it!
…crease-maximum-devices-supported

Increase the maximum amount of devices supported
Instead of relying on the in-tree config headers in config/standalone/
pass a path to the project config to let the framework use our own
config header files. This avoids using patches to adjust build specific
configs.

Note that previously the builds in this repository used config/standalone/
instead of config/python/. The CHIP project config headers in config/python/
is what the script ./scripts/build_python.sh uses. This script is sometimes
used to build the Python library during development. And was the reason
why the wrong file got patched in home-assistant-libs#79.

There are minor differences between the standalone and python specific
configs, specifically in CHIPProjectConfig.h. This PR adds a header file
based on the config in config/python/, but with small adjustments.

Compared to the previous configuration, the effective change at build
time should work out to:
- Dropping device specific configs (CHIP_DEVICE_CONFIG_*). These should
  not have an effect for our controller builds.
- Increae of CHIP_CONFIG_CONTROLLER_MAX_ACTIVE_DEVICES to 1024 (this
  time the new configruation gets applied correclty).
- Increase of CHIP_CONFIG_MAX_EXCHANGE_CONTEXTS from 150 (standalone
  config) to 256 which feels more natural.
…e-local-chip-project-config

Add and use local CHIP project config headers
Specifically, this integrates changes from the following PRs
- project-chip/connectedhomeip#34033
…date-python-controller-discovery-api

Update Python controller bindings with latest API updates
Make sure that we use the local CHIP project config headers on macOS too
so that the Matter SDK configuration are the same for our Linux and macOS
builds.
It seems that when ICD Manager is used there is a limit of maximum
exchange contexts. This got noticed on the master branch, but isn't
triggered on 1.3 branch. But to have the same config let's go safe
and use this lower value here too.
…e-local-chip-project-config-on-mac

Use local CHIP project config headers on macOS too
Increase the maximum amount of secure sessions to 4 times the device
limit. This allows to have multiple sessions per device (if required) or
multiple fabrics of up to 1024 devices.

The size of a secure session is currently 264 bytes, so this will
increase memory usage by about 1MB.
Co-authored-by: Marcel van der Veldt <[email protected]>
…crease-secure-session-pool-size

Increase secure session pool size to 4096
By default the Python controller gets built with unit test configuration
enabled. This adds extra functionality to inject errors etc. for
testing. There is no known negative effect to have it enabled, but it is
certainly better to disable it for a production setup.

Furthermore this fixes error handling for APIs with callbacks and
improves logging somewhat.

Specifically, this integrates changes from the following PRs
- project-chip/connectedhomeip#34346
- project-chip/connectedhomeip#34354
- project-chip/connectedhomeip#34368
…sable-host-test-mode

[1.3-branch] Disable host unit test config
This adds Subscription fixes from the master branch to our 1.3 branch.
Specifically, this only auto re-subscribes after an initial subscription
succeeded. With that the Read call no longer hangs forver in case there
is a communication issue with the device.

Specifically, this integrates changes from the following PRs
- project-chip/connectedhomeip#34370
- project-chip/connectedhomeip#34372
…ke-subscription-setup-fail-early

Update Python controller bindings with latest Subscription fixes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants