I’ve got a sunset automation that works to turn a light on, but the state of the light doesn’t get updated. After the light is on, both the GUI and the state of the light.* device in developer tools shows state == off.
The light is a HomeSeer HS-WD200+ Zwave dimmer.
- There is nothing in home-assistant.log around the time when the automation is triggered
- Logbook shows an entry for the automation.
- Any manual updates to this or other zwave switches show up immediately.
Here’s the activity from OZW_log:
2019-11-24 16:57:19.038 Info, Node005, Value::Set - COMMAND_CLASS_SWITCH_MULTILEVEL - Level - 0 - 1 - 255
2019-11-24 16:57:19.038 Info, Node005, SwitchMultilevel::Set - Setting to level 255
2019-11-24 16:57:19.038 Detail, Node005, Queuing (Send) SwitchMultilevelCmd_Set (Node=5): 0x01, 0x0a, 0x00, 0x13, 0x05, 0x03, 0x26, 0x01, 0xff,
0x25, 0xb5, 0xa8
2019-11-24 16:57:19.038 Detail, Node005, Queuing (Send) SwitchMultilevelCmd_Get (Node=5): 0x01, 0x09, 0x00, 0x13, 0x05, 0x02, 0x26, 0x02, 0x25,
0xb6, 0x55
2019-11-24 16:57:19.039 Detail,
2019-11-24 16:57:19.039 Info, Node005, Sending (Send) message (Callback ID=0xb5, Expected Reply=0x13) - SwitchMultilevelCmd_Set (Node=5): 0x01,
0x0a, 0x00, 0x13, 0x05, 0x03, 0x26, 0x01, 0xff, 0x25, 0xb5, 0xa8
2019-11-24 16:57:19.048 Detail, Node005, Received: 0x01, 0x04, 0x01, 0x13, 0x01, 0xe8
2019-11-24 16:57:19.048 Detail, Node005, ZW_SEND_DATA delivered to Z-Wave stack
2019-11-24 16:57:19.068 Detail, Node005, Received: 0x01, 0x07, 0x00, 0x13, 0xb5, 0x00, 0x00, 0x02, 0x5c
2019-11-24 16:57:19.068 Detail, Node005, ZW_SEND_DATA Request with callback ID 0xb5 received (expected 0xb5)
2019-11-24 16:57:19.068 Info, Node005, Request RTT 29 Average Request RTT 28
2019-11-24 16:57:19.069 Detail, Expected callbackId was received
2019-11-24 16:57:19.069 Detail, Expected reply was received
2019-11-24 16:57:19.069 Detail, Message transaction complete
2019-11-24 16:57:19.069 Detail,
2019-11-24 16:57:19.069 Detail, Node005, Removing current message
2019-11-24 16:57:19.069 Detail,
2019-11-24 16:57:19.069 Info, Node005, Sending (Send) message (Callback ID=0xb6, Expected Reply=0x04) - SwitchMultilevelCmd_Get (Node=5): 0x01,
0x09, 0x00, 0x13, 0x05, 0x02, 0x26, 0x02, 0x25, 0xb6, 0x55
2019-11-24 16:57:19.078 Detail, Node005, Received: 0x01, 0x04, 0x01, 0x13, 0x01, 0xe8
2019-11-24 16:57:19.078 Detail, Node005, ZW_SEND_DATA delivered to Z-Wave stack
2019-11-24 16:57:19.098 Detail, Node005, Received: 0x01, 0x07, 0x00, 0x13, 0xb6, 0x00, 0x00, 0x02, 0x5f
2019-11-24 16:57:19.103 Detail, Node005, ZW_SEND_DATA Request with callback ID 0xb6 received (expected 0xb6)
2019-11-24 16:57:19.103 Info, Node005, Request RTT 33 Average Request RTT 30
2019-11-24 16:57:19.103 Detail, Expected callbackId was received
2019-11-24 16:57:19.117 Detail, Node005, Received: 0x01, 0x0b, 0x00, 0x04, 0x00, 0x05, 0x05, 0x26, 0x03, 0x00, 0x00, 0x00, 0xd5
2019-11-24 16:57:19.118 Detail,
2019-11-24 16:57:19.118 Info, Node005, Response RTT 48 Average Response RTT 47
2019-11-24 16:57:19.118 Info, Node005, Received SwitchMultiLevel report: level=0
2019-11-24 16:57:19.118 Detail, Node005, Refreshed Value: old value=0, new value=0, type=byte
2019-11-24 16:57:19.118 Detail, Node005, Changes to this value are not verified
2019-11-24 16:57:19.118 Detail, Node005, Expected reply and command class was received
2019-11-24 16:57:19.118 Detail, Node005, Message transaction complete
2019-11-24 16:57:19.118 Detail,
2019-11-24 16:57:19.118 Detail, Node005, Removing current message
2019-11-24 16:57:19.118 Detail, Node005, Notification: ValueChanged
Making some big guesses since I don’t know much about Z-wave/OZW – A SwitchMultilevelCmd_Set
and SwitchMultilevelCmd_Get
look like the relevant z-wave commands. They are queued back-to-back as soon as the automation fires.
The SwitchMultilevelCmd_Get
got back Received SwitchMultiLevel report: level=0
which makes it look like the dimmer is off because it hasn’t had enough time to transition to on.
If I go into Configuration->Zwave->refresh the node, home assistant’s state gets updated. Possibly because as part of the refresh it got back Received SwitchMultiLevel report: level=35
Another curiousity, while the hass state and GUI did get updates, this doesn’t trigger an entry in logbook so there is no record of the light now being on.
System Details:
- version 0.101.3 on rpi 3, 32 bit, installed via Hassbian buster
- Aeotec Gen 5 Z-stick
Automation that turns the light on:
- id: '1571141653154'
alias: Sunset Outside Lights turn on
description: Automation test
trigger:
- below: '-6.0'
entity_id: sun.sun
platform: numeric_state
value_template: '{{ state.attributes.elevation }}'
condition: []
action:
- data:
entity_id: light.outside_main_entrance_light
service: light.turn_on