itavero/homebridge-z2m

[Device] Aqara ZNLDP13LM - full brightness instead of previous when switched ON via Home App

mrmaximas opened this issue · 6 comments

Device Model

Aqara ZNLDP13LM

Is there an existing issue for this?

  • I have searched the existing issues and did not find an existing issue.

Supported by Zigbee2MQTT?

  • Device is supported by Zigbee2MQTT

Missing features / functionality

When switching on via the Home app, the lamp lights up at full brightness instead of the previous brightness.
Plugin v1.11.0-beta.3 or 1.9.3 - no matter

HomeKit Services and Characteristics

https://z2m.dev/devices/xiaomi/znldp13lm.html

Exposes information from Zigbee2MQTT

{
    "brightness": 76,
    "color": {
        "hue": 32,
        "saturation": 82,
        "x": 0.4599,
        "y": 0.4106
    },
    "color_mode": "color_temp",
    "color_options": {
        "execute_if_off": false
    },
    "color_temp": 370,
    "color_temp_startup": 65535,
    "device_temperature": 33,
    "last_seen": "2024-02-08T17:38:59+03:00",
    "level_config": {
        "execute_if_off": false,
        "off_transition_time": 1,
        "on_level": "previous",
        "on_off_transition_time": 1,
        "on_transition_time": 1
    },
    "linkquality": 109,
    "power_outage_count": 10,
    "power_outage_memory": true,
    "state": "ON",
    "update": {
        "installed_version": 40,
        "latest_version": 40,
        "state": "idle"
    }
}

Additional information / Other remarks

This is ON/OFF cycle via Z2M Web UI. Brightness NOT affected.


debug 2024-02-08 16:54:32: Received MQTT message on 'zigbee2mqtt/Kitchen Table Lamp/set' with data '{"state":"ON"}'
debug 2024-02-08 16:54:32: Publishing 'set' 'state' to 'Kitchen Table Lamp'

info  2024-02-08 16:54:32: MQTT publish: topic 'zigbee2mqtt/Kitchen Table Lamp', payload '{"brightness":1,"color":{"hue":null,"saturation":null,"x":0,"y":0},"color_mode":"color_temp","color_options":{"execute_if_off":false},"color_temp":370,"color_temp_startup":65535,"device_temperature":31,"last_seen":"2024-02-08T16:54:32+03:00","level_config":{"execute_if_off":false,"off_transition_time":1,"on_level":"previous","on_off_transition_time":1,"on_transition_time":1},"linkquality":87,"power_outage_count":10,"power_outage_memory":true,"state":"OFF","update":{"installed_version":40,"latest_version":40,"state":"idle"}}'

info  2024-02-08 16:54:32: MQTT publish: topic 'zigbee2mqtt/Kitchen Table Lamp', payload '{"brightness":85,"color":{"hue":null,"saturation":null,"x":0,"y":0},"color_mode":"color_temp","color_options":{"execute_if_off":false},"color_temp":370,"color_temp_startup":65535,"device_temperature":31,"last_seen":"2024-02-08T16:54:32+03:00","level_config":{"execute_if_off":false,"off_transition_time":1,"on_level":"previous","on_off_transition_time":1,"on_transition_time":1},"linkquality":87,"power_outage_count":10,"power_outage_memory":true,"state":"ON","update":{"installed_version":40,"latest_version":40,"state":"idle"}}'

debug 2024-02-08 16:54:32: Received Zigbee message from 'Kitchen Table Lamp', type 'attributeReport', cluster 'genOnOff', data '{"245":16111245,"onOff":1}' from endpoint 1 with groupID 0
info  2024-02-08 16:54:32: MQTT publish: topic 'zigbee2mqtt/Kitchen Table Lamp', payload '{"brightness":85,"color":{"hue":null,"saturation":null,"x":0,"y":0},"color_mode":"color_temp","color_options":{"execute_if_off":false},"color_temp":370,"color_temp_startup":65535,"device_temperature":31,"last_seen":"2024-02-08T16:54:32+03:00","level_config":{"execute_if_off":false,"off_transition_time":1,"on_level":"previous","on_off_transition_time":1,"on_transition_time":1},"linkquality":83,"power_outage_count":10,"power_outage_memory":true,"state":"ON","update":{"installed_version":40,"latest_version":40,"state":"idle"}}'

debug 2024-02-08 16:54:33: Received Zigbee message from 'Kitchen Table Lamp', type 'attributeReport', cluster 'genLevelCtrl', data '{"245":16111245,"currentLevel":85}' from endpoint 1 with groupID 0

info  2024-02-08 16:54:33: MQTT publish: topic 'zigbee2mqtt/Kitchen Table Lamp', payload '{"brightness":85,"color":{"hue":null,"saturation":null,"x":0,"y":0},"color_mode":"color_temp","color_options":{"execute_if_off":false},"color_temp":370,"color_temp_startup":65535,"device_temperature":31,"last_seen":"2024-02-08T16:54:33+03:00","level_config":{"execute_if_off":false,"off_transition_time":1,"on_level":"previous","on_off_transition_time":1,"on_transition_time":1},"linkquality":87,"power_outage_count":10,"power_outage_memory":true,"state":"ON","update":{"installed_version":40,"latest_version":40,"state":"idle"}}'


debug 2024-02-08 16:54:34: Received MQTT message on 'zigbee2mqtt/Kitchen Table Lamp/set' with data '{"state":"OFF"}'
debug 2024-02-08 16:54:34: Publishing 'set' 'state' to 'Kitchen Table Lamp'

info  2024-02-08 16:54:34: MQTT publish: topic 'zigbee2mqtt/Kitchen Table Lamp', payload '{"brightness":85,"color":{"hue":null,"saturation":null,"x":0,"y":0},"color_mode":"color_temp","color_options":{"execute_if_off":false},"color_temp":370,"color_temp_startup":65535,"device_temperature":31,"last_seen":"2024-02-08T16:54:34+03:00","level_config":{"execute_if_off":false,"off_transition_time":1,"on_level":"previous","on_off_transition_time":1,"on_transition_time":1},"linkquality":87,"power_outage_count":10,"power_outage_memory":true,"state":"ON","update":{"installed_version":40,"latest_version":40,"state":"idle"}}'

info  2024-02-08 16:54:34: MQTT publish: topic 'zigbee2mqtt/Kitchen Table Lamp', payload '{"brightness":85,"color":{"hue":null,"saturation":null,"x":0,"y":0},"color_mode":"color_temp","color_options":{"execute_if_off":false},"color_temp":370,"color_temp_startup":65535,"device_temperature":31,"last_seen":"2024-02-08T16:54:34+03:00","level_config":{"execute_if_off":false,"off_transition_time":1,"on_level":"previous","on_off_transition_time":1,"on_transition_time":1},"linkquality":87,"power_outage_count":10,"power_outage_memory":true,"state":"OFF","update":{"installed_version":40,"latest_version":40,"state":"idle"}}'

debug 2024-02-08 16:54:35: Received Zigbee message from 'Kitchen Table Lamp', type 'attributeReport', cluster 'genLevelCtrl', data '{"245":16111246,"currentLevel":1}' from endpoint 1 with groupID 0
info  2024-02-08 16:54:35: MQTT publish: topic 'zigbee2mqtt/Kitchen Table Lamp', payload '{"brightness":1,"color":{"hue":null,"saturation":null,"x":0,"y":0},"color_mode":"color_temp","color_options":{"execute_if_off":false},"color_temp":370,"color_temp_startup":65535,"device_temperature":31,"last_seen":"2024-02-08T16:54:35+03:00","level_config":{"execute_if_off":false,"off_transition_time":1,"on_level":"previous","on_off_transition_time":1,"on_transition_time":1},"linkquality":83,"power_outage_count":10,"power_outage_memory":true,"state":"OFF","update":{"installed_version":40,"latest_version":40,"state":"idle"}}'

debug 2024-02-08 16:54:35: Received Zigbee message from 'Kitchen Table Lamp', type 'attributeReport', cluster 'genOnOff', data '{"245":16111246,"onOff":0}' from endpoint 1 with groupID 0
info  2024-02-08 16:54:35: MQTT publish: topic 'zigbee2mqtt/Kitchen Table Lamp', payload '{"brightness":1,"color":{"hue":null,"saturation":null,"x":0,"y":0},"color_mode":"color_temp","color_options":{"execute_if_off":false},"color_temp":370,"color_temp_startup":65535,"device_temperature":31,"last_seen":"2024-02-08T16:54:35+03:00","level_config":{"execute_if_off":false,"off_transition_time":1,"on_level":"previous","on_off_transition_time":1,"on_transition_time":1},"linkquality":87,"power_outage_count":10,"power_outage_memory":true,"state":"OFF","update":{"installed_version":40,"latest_version":40,"state":"idle"}}'

This is ON/OFF cycle via Home App on iOS. Brightness FULL instead of previous.

debug 2024-02-08 16:55:07: Received MQTT message on 'zigbee2mqtt/0x54ef441000a7e0ba/set' with data '{"state":"ON","brightness":254}'
debug 2024-02-08 16:55:07: Publishing 'set' 'brightness' to 'Kitchen Table Lamp'

info  2024-02-08 16:55:07: MQTT publish: topic 'zigbee2mqtt/Kitchen Table Lamp', payload '{"brightness":1,"color":{"hue":null,"saturation":null,"x":0,"y":0},"color_mode":"color_temp","color_options":{"execute_if_off":false},"color_temp":370,"color_temp_startup":65535,"device_temperature":31,"last_seen":"2024-02-08T16:55:07+03:00","level_config":{"execute_if_off":false,"off_transition_time":1,"on_level":"previous","on_off_transition_time":1,"on_transition_time":1},"linkquality":80,"power_outage_count":10,"power_outage_memory":true,"state":"OFF","update":{"installed_version":40,"latest_version":40,"state":"idle"}}'

info  2024-02-08 16:55:07: MQTT publish: topic 'zigbee2mqtt/Kitchen Table Lamp', payload '{"brightness":254,"color":{"hue":null,"saturation":null,"x":0,"y":0},"color_mode":"color_temp","color_options":{"execute_if_off":false},"color_temp":370,"color_temp_startup":65535,"device_temperature":31,"last_seen":"2024-02-08T16:55:07+03:00","level_config":{"execute_if_off":false,"off_transition_time":1,"on_level":"previous","on_off_transition_time":1,"on_transition_time":1},"linkquality":80,"power_outage_count":10,"power_outage_memory":true,"state":"ON","update":{"installed_version":40,"latest_version":40,"state":"idle"}}'

debug 2024-02-08 16:55:07: Received Zigbee message from 'Kitchen Table Lamp', type 'attributeReport', cluster 'genOnOff', data '{"245":16111250,"onOff":1}' from endpoint 1 with groupID 0

info  2024-02-08 16:55:07: MQTT publish: topic 'zigbee2mqtt/Kitchen Table Lamp', payload '{"brightness":254,"color":{"hue":null,"saturation":null,"x":0,"y":0},"color_mode":"color_temp","color_options":{"execute_if_off":false},"color_temp":370,"color_temp_startup":65535,"device_temperature":31,"last_seen":"2024-02-08T16:55:07+03:00","level_config":{"execute_if_off":false,"off_transition_time":1,"on_level":"previous","on_off_transition_time":1,"on_transition_time":1},"linkquality":83,"power_outage_count":10,"power_outage_memory":true,"state":"ON","update":{"installed_version":40,"latest_version":40,"state":"idle"}}'

debug 2024-02-08 16:55:08: Received Zigbee message from 'Kitchen Table Lamp', type 'attributeReport', cluster 'genLevelCtrl', data '{"245":16111250,"currentLevel":254}' from endpoint 1 with groupID 0

info  2024-02-08 16:55:08: MQTT publish: topic 'zigbee2mqtt/Kitchen Table Lamp', payload '{"brightness":254,"color":{"hue":null,"saturation":null,"x":0,"y":0},"color_mode":"color_temp","color_options":{"execute_if_off":false},"color_temp":370,"color_temp_startup":65535,"device_temperature":31,"last_seen":"2024-02-08T16:55:08+03:00","level_config":{"execute_if_off":false,"off_transition_time":1,"on_level":"previous","on_off_transition_time":1,"on_transition_time":1},"linkquality":80,"power_outage_count":10,"power_outage_memory":true,"state":"ON","update":{"installed_version":40,"latest_version":40,"state":"idle"}}'



debug 2024-02-08 16:55:09: Received MQTT message on 'zigbee2mqtt/0x54ef441000a7e0ba/set' with data '{"state":"OFF"}'
debug 2024-02-08 16:55:09: Publishing 'set' 'state' to 'Kitchen Table Lamp'

info  2024-02-08 16:55:09: MQTT publish: topic 'zigbee2mqtt/Kitchen Table Lamp', payload '{"brightness":254,"color":{"hue":null,"saturation":null,"x":0,"y":0},"color_mode":"color_temp","color_options":{"execute_if_off":false},"color_temp":370,"color_temp_startup":65535,"device_temperature":31,"last_seen":"2024-02-08T16:55:09+03:00","level_config":{"execute_if_off":false,"off_transition_time":1,"on_level":"previous","on_off_transition_time":1,"on_transition_time":1},"linkquality":80,"power_outage_count":10,"power_outage_memory":true,"state":"ON","update":{"installed_version":40,"latest_version":40,"state":"idle"}}'

info  2024-02-08 16:55:09: MQTT publish: topic 'zigbee2mqtt/Kitchen Table Lamp', payload '{"brightness":254,"color":{"hue":null,"saturation":null,"x":0,"y":0},"color_mode":"color_temp","color_options":{"execute_if_off":false},"color_temp":370,"color_temp_startup":65535,"device_temperature":31,"last_seen":"2024-02-08T16:55:09+03:00","level_config":{"execute_if_off":false,"off_transition_time":1,"on_level":"previous","on_off_transition_time":1,"on_transition_time":1},"linkquality":80,"power_outage_count":10,"power_outage_memory":true,"state":"OFF","update":{"installed_version":40,"latest_version":40,"state":"idle"}}'

debug 2024-02-08 16:55:11: Received Zigbee message from 'Kitchen Table Lamp', type 'attributeReport', cluster 'genLevelCtrl', data '{"245":16111251,"currentLevel":1}' from endpoint 1 with groupID 0
info  2024-02-08 16:55:11: MQTT publish: topic 'zigbee2mqtt/Kitchen Table Lamp', payload '{"brightness":1,"color":{"hue":null,"saturation":null,"x":0,"y":0},"color_mode":"color_temp","color_options":{"execute_if_off":false},"color_temp":370,"color_temp_startup":65535,"device_temperature":31,"last_seen":"2024-02-08T16:55:11+03:00","level_config":{"execute_if_off":false,"off_transition_time":1,"on_level":"previous","on_off_transition_time":1,"on_transition_time":1},"linkquality":83,"power_outage_count":10,"power_outage_memory":true,"state":"OFF","update":{"installed_version":40,"latest_version":40,"state":"idle"}}'

debug 2024-02-08 16:55:11: Received Zigbee message from 'Kitchen Table Lamp', type 'attributeReport', cluster 'genOnOff', data '{"245":16111251,"onOff":0}' from endpoint 1 with groupID 0
info  2024-02-08 16:55:11: MQTT publish: topic 'zigbee2mqtt/Kitchen Table Lamp', payload '{"brightness":1,"color":{"hue":null,"saturation":null,"x":0,"y":0},"color_mode":"color_temp","color_options":{"execute_if_off":false},"color_temp":370,"color_temp_startup":65535,"device_temperature":31,"last_seen":"2024-02-08T16:55:11+03:00","level_config":{"execute_if_off":false,"off_transition_time":1,"on_level":"previous","on_off_transition_time":1,"on_transition_time":1},"linkquality":80,"power_outage_count":10,"power_outage_memory":true,"state":"OFF","update":{"installed_version":40,"latest_version":40,"state":"idle"}}'

Probably right is '{"state":"ON"}' instead of '{"state":"ON","brightness":254}' ????
Thanks!

@itavero I apologise for finding the bug again, but my wife is going to kill me soon ;)

I checked some lights in my home. For these HomeKit (and this the plugin) only changes the state.
I'm not sure why it does something different on your end, but the plugin only sends brightness if it receives a change from HomeKit.

Are you sure you don't have any automations turned on?
How are you switching the light on (e.g. via which app and where in the app)?

Which version of iOS are you using?
Do you have an Home hub and what version of OS is it running?

@itavero I only turn on the lamp in the app not via automation.
It may be a problem that the lamp also has a temperature sensor (but I have disabled these sensors globally)?
I'm using latest ios release on iphone xs. home hubs are is 2 apple tv 4 hd + homepod 2, atv 4 hd is the current hub.

@itavero
I think i found the problem. i tried controlling the lamp via home+, eve and controller apps.
Everything works correctly. Most likely the problem is in the home app.
I'll tell my wife to write email to Tim Cook.)
Thank you so much for your time.
The only remaining problem is the limit of 20 devices for the scene (but it's not certain) ;)

@itavero I deleted and re-paired the lamp from z2m.
The problem in the Home app on iOS and MacOS disappeared 🤔