Remember State when losing power


Is there a way to tell a bulb to remember the last state after power loss for eg osram bulbs in zha?

It is possible in zigbee2mqtt (LEDVANCE 4058075208360 control via MQTT | Zigbee2MQTT for example)

Thanks a lot.

My method is to lookup the responsible code:

Leading to the code:

Which I think means that these are manufacturer specific commands.

You can try my newly implemented Cluster command in my fork of zha_custom .

1 Like

Thank you. Seems that i have to read more about your addon to figure out what the cluster message needs to look like for my command😁

First you need to determine if your device CAN do this. Just because Z2MqTT can do something doesn’t mean the device supports it.

Osram bulbs for instance - I know for a FACT that older ones don’t, (I used to run Osrams as my bulb of choice) a few years ago it was a tossup - depending on firmware, and newer ones do.

If the bulb, doesn’t you can always build a DIY ‘canary’ solution to determine if you had an unexpected power cut, go look up the last known state of the bulbs and reapply it but that gets messy fast.

So before you go down that path - research your bulbs by MODEL and firmware revision to determine if you can first.

It’s a command without parameters, so it should be something like:

service: zha_custom.execute
  ieee: 5c:02:72:ff:fe:92:c2:5d # The Id of the devce
  command: zcl_cmd
    cmd: 1 # The ID of the command
    cluster: 64527 # I suppose that the ID in the zigbee2mqtt definition is the cluster id.
    endpoint: 1 # Not sure, you need to check the device details to find the ID.
    manf:  0x1189 # You can check this in the device details

You can first check if your device supports this or just send the command and verify in practice.
As your bulb is powered, there should be be an issue in receiving the command (it’s always awake).

Personnally I’ld test: the device is from the same manufacturer and it’s likely that their manufacturer commands are consistent accross models (even if not all support them).