Skip to content

[SL-ONLY] Provide prints for hooks for customer on demo application - #1236

Open
Rohan Sahay (rosahay-silabs) wants to merge 1 commit into
bugfix/tls-memory-leaksfrom
feature/add-event-prints
Open

Rohan Sahay (rosahay-silabs) wants to merge 1 commit into
bugfix/tls-memory-leaksfrom
feature/add-event-prints

Conversation

@rosahay-silabs

Copy link
Copy Markdown
Contributor

Summary

As requested by agarwal57 , adding sample of OnPlatform handler and printing the events requested by customer on the demo application.

Related issues

N/A

Testing

Verified the prints on disconnection and reconnection events, the commissioning events are not seen completely as the service starts post WiFi connectivity.

@rosahay-silabs
Rohan Sahay (rosahay-silabs) requested a review from a team as a code owner October 2, 2026 21:03
@rosahay-silabs
Rohan Sahay (rosahay-silabs) added this pull request to stack #1237 October 2, 2026 21:03
@rosahay-silabs

Copy link
Copy Markdown
Contributor Author

bugbot review

@cursor

cursor Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

PR Summary

Low Risk
Example-only logging and event registration in the MQTT demo; no production Matter stack or security behavior changes.

Overview
Adds a sample CHIP device-layer event hook to the Silabs thermostat MQTT demo so customers can see how to react to connectivity and commissioning lifecycle events.

On first MQTT client init, the demo now registers OnPlatformEvent via PlatformMgr().AddEventHandler and logs progress messages for WiFi connect/disconnect (kWiFiConnectivityChange), commissioning complete, and secure session established (labeled as commissioning started). Registration failures are logged and cause mqtt_client_demo_start to return failure.

Reviewed by Cursor Bugbot for commit 1b198be. Configure here.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 1b198be. Configure here.


case DeviceEventType::kSecureSessionEstablished:
ChipLogProgress(DeviceLayer, "MQTT demo: Commissioning Started");
break;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrong event for commissioning started

Medium Severity

kSecureSessionEstablished is logged as commissioning start, but that event fires for every PASE and CASE session. After commissioning, each controller reconnect prints Commissioning Started, which misleads the customer logs this sample is meant to provide.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 1b198be. Configure here.

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.

1 participant