Bug in Matter Light_Bulb Example on nRF52840 Development Board

Dear Nordic Support Team,

I am currently using the nRF52840 development board and working on developing a dimmer switch. During the development process, I encountered a bug. I have tried updating the SDKs to resolve the issue, but even after upgrading to SDK version 2.9, the problem persists.

Here is the issue:
When running the Matter light_bulb example without making any modifications and flashing it to the development board, the dimming and on/off functionality work perfectly when controlled through the Apple HomeKit app. However, the issue occurs in the following scenario:

  1. I turn off the light using the HomeKit app.
  2. Then, I turn it back on using the physical button on the development board.

In this case, the light turns on at 1% brightness, but the HomeKit app incorrectly shows the brightness level as 100%.

This issue has been present since SDK version 2.5 and persists in version 2.9. Despite my efforts, I have not been able to resolve it.

Could you please provide guidance or a solution to address this issue?

Thank you for your support.

Parents
  • Hi Marte,

    Thank you for your response.

    I’ve been trying to retrieve the application logs from my nRF52840 development board but haven’t been successful so far. I attempted to use Segger RTT Viewer for this purpose, but I couldn’t get it to work.

    Could you please guide me on how to properly retrieve hardware logs from the device? Any specific steps or recommendations would be greatly appreciated.

    Looking forward to your advice.

    Best regards,

  • Hi,

    The Matter samples use UART for logging by default, so you should be able to see the log in a terminal emulator. Some options we provide are the Serial Terminal app in nRF Connect for Desktop or using the terminal in our nRF Connect for VS Code extension. You can also use other programs such as PuTTy, TeraTerm, Picocom, etc.

    Our documentation provides more detailed information about logging here: Testing and optimization.

    Best regards,
    Marte

  • Hi,

    The developers have started looking into this. I will most likely have an update by Tuesday or Wednesday next week.

    Best regards,
    Marte

  • Thank you, Marte
    I am eagerly waiting for the developers' response so we can resolve this issue.

  • Hi,

    The developers ran some tests. They can confirm that the light does not turn on with a brightness of 100% when performing the same steps as you, but in their tests, the Apple Home app reported the brightness as between 1%-3% after turning it on with the button on the DK, and not 100% as you experience.

    When it comes to what is expected behavior, this is something that depends on your demands and can be changed in your implementation.

    In our sample, when the slider is down to 0%, we set the level to 0% and OnOff to 0. When button 2 is pressed, OnOff is changed to 1, but the level is still 0%. In the app, the developers see that this is shown as 1%, most likely because the app cannot show 0% as the light being turned on, so if OnOff is 1, i.e. the light is on, the app shows it as 1% instead.

    However, you can change the sample to match the behavior you expect and make the light turn on to 100% when the button is pressed rather than the previous level.

    Best regards,
    Marte

  • Thank you for your response.

    Actually, 

    If we set aside the dimming behavior of the system and focus only on the on/off functionality, the issue still persists. When the light is at 100% brightness and we turn it off using the toggle in the Apple Home app (not the slider), and then turn it back on using button 2 on the DK, the light should return to 100% brightness as it was before. However, the light turns on at 1% brightness, and we can only see a very dim glow on LED 2.

    If we also consider the dimming functionality, When we turn off the light at 50% brightness using the Apple Home app toggle and then turn it back on with the same toggle, the light correctly turns back on at 50% brightness. However, if we perform the same action using the physical button on the DK, the LED turns on at 1% brightness.

    Development on Matter examples should be based on a proper platform and correct implementation. I have customized the Light Bulb example to suit my needs, but I cannot resolve this specific issue. My expectation is that when the light is turned off from 100% brightness using the toggle and then turned back on with the physical button o n DK, it should turn on at 100% brightness, not at 1%.

  • Hi,

    Currently, only On Action or Off Actions are initiated in LightingActionEventHandler() upon a button press, but you can get it to set the brightness to 100% by initiating a Level Action, i.e. Nrf::PWMDevice::LEVEL_ACTION when the button is pressed. For example, in the Window Covering sample, InitiateAction() is called to set the level in window_covering.cpp#L248-L256.

    Best regards,
    Marte

Reply Children
No Data
Related