Bug? Ledvance P40S does minimum 3 events/changes for 1 command

Device: Ledvance P40S TW E14 bulb

If this light get a command to change brightness (or any other change) it first report the new state, then bounce back and report the old state and then a third report of the new state.
So to be more clear:
If this light have “40” brightness at start:

  1. Send command brightness “254” to light.
  2. In deCONZ events it first report brightness changed to “254”.
  3. Some millisecond later it reports the light have changed to brightness “40” (state before command sent).
  4. Some millisecond later it reports again brightness “254”.

No other brands like Hue, Ikea, Icasa etc. do like this. They only send one changed event after sent command.
My main issue for this is I have written a “dim-to-warm” function in Node-RED that works will all lights except Ledvance since it send out to many events just for 1 change/command.
But also when change brightness in GUI like HA, Phoscon, Google Home or HomeKit I actually see the slider “jumps” back and forth. No other lights do that.

Any suggestions?

I don’t think there a special stuff for this device, it’s probably normal.
Can try with enabling more logs to see if it’s from deconz or the device.

But remember the api send a state change BEFORE sending the zigbee request and it adjust later when the device make its report.

As I see it this device reports its changes a few times between the initial state and the sent command. This is just the events logs pulled from phoscon from initial brightness 40 and 1 command send 254 brightness:

{
    "21:47:32:772": {
        "e": "changed",
        "id": "6",
        "r": "lights",
        "state": {
            "alert": null,
            "bri": 254,
            "colormode": "ct",
            "ct": 370,
            "on": true,
            "reachable": true
        },
        "t": "event",
        "uniqueid": "f0:d1:b8:00:00:1c:14:8c-01"
    },
    "21:47:32:848": {
        "e": "changed",
        "id": "6",
        "r": "lights",
        "state": {
            "alert": null,
            "bri": 40,
            "colormode": "ct",
            "ct": 370,
            "on": true,
            "reachable": true
        },
        "t": "event",
        "uniqueid": "f0:d1:b8:00:00:1c:14:8c-01"
    },
    "21:47:33:835": {
        "e": "changed",
        "id": "6",
        "r": "lights",
        "state": {
            "alert": null,
            "bri": 211,
            "colormode": "ct",
            "ct": 370,
            "on": true,
            "reachable": true
        },
        "t": "event",
        "uniqueid": "f0:d1:b8:00:00:1c:14:8c-01"
    },
    "21:47:34:832": {
        "e": "changed",
        "id": "6",
        "r": "lights",
        "state": {
            "alert": null,
            "bri": 254,
            "colormode": "ct",
            "ct": 370,
            "on": true,
            "reachable": true
        },
        "t": "event",
        "uniqueid": "f0:d1:b8:00:00:1c:14:8c-01"
    }
}

This light have some transition time on change, but it say 0 in deconz. If monitoring events in phoscon and send command directly in deconz → Level Control → Move to Level with 0 transition time. Then it only get just 1 event on change as it should. Can transition time be overridden somehow?

Ha yes I have a bulb that that do that too, when I change the brightness, I have report for all values.
From your logs it seem you have

  • bri": 254 > this one is send by the API before sending the zigbee request
  • “bri”: 40, > this one is an intermediate value send by the device
  • “bri”: 211, > another one
  • “bri”: 254, > the last one, on the final value.

All seem normal.

Can transition time be overridden somehow?

Yes in the same deconz request with adding "transitiontime":0 Lights - deCONZ REST-API

But not sure it will work at 100%.

Thank you for at least confirm it is not the only device that do that kind of reporting. Have around 50 lights from other brands and none does this. This behavior is for sure not optimal either for dragging slider in GUI or for written monitoring rules.
Deconz settings did not work when called from API. But as for the monitoring brightness I wrote special rule for this lights in node-red with a small delay and always send transition time to 0 that fix the brightness monitoring not going crazy. :slight_smile: