This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

New Mesh SDK Default Lightness implementation

Hi,

I am using Mesh SDK4.1.0 and BLE SDK 16.0.0.

I was testing the Light lightness implementation and I see that the Default value of default lightness is 0xFFFF.

But the specification says that the default value is meant to be 0x0000 so that by default the light goes to its last known lightness when powered up(OnPowerUp is 0x01) or when sent an ON/OFF message.

Any specific reason for setting the default value to be 0xFFFF?

Next test was that, I changed the value to be 0x0000 and test the performance. It was working okay till I reset it. The node is stuck on the last known lightness after it was reset from the network. Isn't it supposed to default to max brightness (0xFFFF) which is last lightness default value after the reset and clear the last lightness value stored before the reset?

Thank you.

Parents Reply
  • Sorry, that was a mistake. It was 0x0. One of my teammates changed it.
    But still the second question behavior is observed. 
    If we have default value for default lightness as 0x0, light is at max brightness, we provision the node, change the lightness level and reset it.

    Shouldn't the reset force the device to go to maximum brightness? I see it is going to last known brightness.
    If the last lightness before reset was 1%, the device is resetting to 1% lightness.

    Thank you.

Children
  • I'm quite new to the light lightness model, so my understanding could be wrong, but let's have a look at the spec: 

    If the Light lightness is 0x0000, the device should set the light lightness to "Light Lightness Last" value. This "Light Lightness Last" changed if there is a command that changes the value of the lightness. 
    My understanding is that, on the first ever reset, the light should be set to max brightness. If there is no command to change it to anything else and there is a reset, it should still be turn on at max brightness. But if before a reset, it receives a command to change the lightness to anything else (for example 20%), and then it get a reset, then it should set the light lightness to to this last known lightness (20%). 

Related