[SOLVED] Control Zwave dimmer EVALOGIK ZW39

I’m a HA and Zwave total beginner, running HA 0.103.6 on RPi4. I have one controller: Zooz S2 USB stick, and exactly one device: EVALogik ZW39 Z-Wave Smart Plug (Dimmer). There is one entry for each of those things shown at http://192.168.1.239:8123/config/devices/dashboard

However on http://192.168.1.239:8123/developer-tools/state I see three related entries:
zwave.zooz_zst10_s2_z_wave_plus_usb_stick
zwave.inovelli_unknown_type_c000_id_c002
light.inovelli_unknown_type_c000_id_c002_level

Now when I turn the dimmer on and off with its own hardware button, it works, and I know the Zwave info is transmitted because each state change is logged correctly on the GUI window at http://192.168.1.239:8123/logbook and also shows correctly in the timeline at http://192.168.1.239:8123/history

However my attempts to control this device by creating a new automation at http://192.168.1.239:8123/config/automation
are so far unsuccessful. Under Config/Devices/Device Info/Entities I see there are two different things (“Entities”?) shown, one with a Zwave icon and one with a lightbulb icon. I am wondering if I am trying to control the Zwave part, but what I need is the dimmer (lightbulb) part, with name ending in “…c002_level” (or the other way around?) Does this make any sense?

When I manually trigger my automation attempting to turn on the light, I do see something appear from that moment in time in the “OZW log” at http://192.168.1.239:8123/config/zwave, but with no resulting effect at the actual dimmer. For example, the log result of my automation triggering:

2020-01-14 21:20:25.480 Info, Node005, Value::Set - COMMAND_CLASS_SWITCH_MULTILEVEL - Level - 0 - 1 - 255
2020-01-14 21:20:25.480 Info, Node005, SwitchMultilevel::Set - Setting to level 255
2020-01-14 21:20:25.480 Detail, Node005, Queuing (Send) SwitchMultilevelCmd_Set (Node=5): 0x01, 0x0a, 0x00, 0x13, 0x05, 0x03, 0x26, 0x01, 0xff, 0x25, 0x87, 0x9a
2020-01-14 21:20:25.480 Detail, Node005, Queuing (Send) SwitchMultilevelCmd_Get (Node=5): 0x01, 0x09, 0x00, 0x13, 0x05, 0x02, 0x26, 0x02, 0x25, 0x88, 0x6b

By contrast, this is what the log says after a manual turn on with the hardware button:

2020-01-14 21:27:40.926 Detail, Node005,   Received: 0x01, 0x0b, 0x00, 0x04, 0x10, 0x05, 0x03, 0x20, 0x03, 0x63, 0xde, 0x00, 0x78
2020-01-14 21:27:40.926 Detail,
2020-01-14 21:27:40.926 Info, Node005, Received Basic report from node 5: level=99
2020-01-14 21:27:40.926 Detail, Node005, Queuing (Send) SwitchMultilevelCmd_Get (Node=5): 0x01, 0x09, 0x00, 0x13, 0x05, 0x02, 0x26, 0x02, 0x25, 0x89, 0x6a
2020-01-14 21:27:41.376 Detail, Node005,   Received: 0x01, 0x0d, 0x00, 0x04, 0x10, 0x05, 0x05, 0x26, 0x03, 0x63, 0x63, 0x00, 0xde, 0x00, 0x1d
2020-01-14 21:27:41.376 Detail,
2020-01-14 21:27:41.376 Info, Node005, Received SwitchMultiLevel report: level=99
2020-01-14 21:27:41.376 Detail, Node005, Refreshed Value: old value=0, new value=99, type=byte
2020-01-14 21:27:41.376 Detail, Node005, Changes to this value are not verified
2020-01-14 21:27:41.377 Detail, Node005, Notification: ValueChanged

Here are the two device listing:

light.inovelli_unknown_type_c000_id_c002_level	off	node_id: 5
value_index: 0
value_instance: 1
value_id: 72057594126630913
friendly_name: Garage_Dimmer_1
supported_features: 1
zwave.inovelli_unknown_type_c000_id_c002	ready	node_id: 5
node_name: Inovelli Unknown: type=c000, id=c002
manufacturer_name: Inovelli
product_name: Unknown: type=c000, id=c002
query_stage: Complete
is_awake: true
is_ready: true
is_failed: false
is_info_received: true
max_baud_rate: 40000
is_zwave_plus: true
capabilities: routing,beaming,listening,zwave_plus
neighbors: 1
sentCnt: 20
sentFailed: 0
retries: 0
receivedCnt: 28
receivedDups: 0
receivedUnsolicited: 16
sentTS: 2020-01-14 18:46:48:143 
receivedTS: 2020-01-14 21:27:41:376 
lastRequestRTT: 32
averageRequestRTT: 31
lastResponseRTT: 98
averageResponseRTT: 72
application_version: 2.00
friendly_name: Dimmer1

You would use the light.inovelli_unknown_type_c000_id_c002_level entity to control the light. The zwave is sort of a management entity, mostly provides information but can also be used with events.

Node005, Value::Set - COMMAND_CLASS_SWITCH_MULTILEVEL - Level - 0 - 1 - 255
Node005, SwitchMultilevel::Set - Setting to level 255

That’s just a “toggle on” command (255 means “Restore most recent (non-zero) level.”). HA is telling the dimmer to turn on without modifying the brightness. If the brightness was previously 75% before being turned off, it should be 75% again when toggled back on.

Node005, Received SwitchMultiLevel report: level=99
Node005, Refreshed Value: old value=0, new value=99, type=byte

This means the dimmer was turned on (it was off) and the switch is reporting it is at 100% brightness (99 == 100%).

Maybe you could post your automation code.

Thank you very much for your reply. That’s just the problem, I’m a total beginner and have been unable to find an example Zwave dimmer code. I guess it uses command 0x26 SwitchMultiLevelCmd_Set but that’s all I know. So far I just used the “Create Automation” GUI which I presume created some code somewhere(?) If it’s in /config/automations.yaml then here is an example. Maybe the problem is it’s trying action:type:turn on but what I need is to set this dimmer level to 0x63 (decimal 99) and not 0xff or decimal 255 (?) Can I edit this automations.yaml file to set the dimmer to 0x63 ? I don’t know how to do this.

Using: http://hassio:8123/hassio/ingress/core_configurator
viewing: /config/automations.yaml

- id: '1579057768057'
  alias: SunsetLight1
  description: Turn on garage dimmer when sun sets
  trigger:
  - at: '19:30'
    platform: time
  condition: []
  action:
  - device_id: 5c628ec259a24837b99b74aa5d1e1213
    domain: light
    entity_id: light.inovelli_unknown_type_c000_id_c002_level
    type: turn_on

The most relevant thing I’ve found online so far is https://www.home-assistant.io/integrations/light/ which says that a dimmer device can be controlled by code like:

# Example configuration.yaml entry
automation:
- id: one
  alias: Turn on light when motion is detected
  trigger:
    - platform: state
      entity_id: binary_sensor.motion_1
      to: 'on'
  action:
    - service: light.turn_on
      data:
        entity_id: light.living_room
        brightness: 255

which has a similar structure to my existing configuration.yaml file but when I try to simply splice the data: brightness: 255 part into my file I get an error at http://hassio:8123/config/server_control “reload automations” saying automations could not be loaded and the logfile at http://hassio:8123/developer-tools/logs says:
Invalid config for [automation]: [data] is an invalid option for [automation]. Check: automation->data.

Please post the original code of your automation.

Without a clear understanding of the syntax and structures I’m just stumbling around. I found the below code seems to have valid syntax at least, because loading this automations.yaml does not give me an error:

- id: '1579065612487'
  alias: Turn dimmer to 99
  description: turn on dimmer to 99
  trigger:
  - event: sunset
    platform: sun
  condition: []
  action:
  - device_id: 5c628ec259a24837b99b74aa5d1e1213
    domain: light
    entity_id: light.inovelli_unknown_type_c000_id_c002_level
    type: turn_on
  - service: light.turn_on
    data:
      entity_id: light.inovelli_unknown_type_c000_id_c002_level
      brightness: 99

However when I manually trigger it, nothing happens and the dimmer device remains completely off. The OZW log at http://hassio:8123/config/zwave says this:

2020-01-15 08:22:00.537 Info, Node005, Value::Set - COMMAND_CLASS_SWITCH_MULTILEVEL - Level - 0 - 1 - 255
2020-01-15 08:22:00.537 Info, Node005, SwitchMultilevel::Set - Setting to level 255
2020-01-15 08:22:00.537 Detail, Node005, Queuing (Send) SwitchMultilevelCmd_Set (Node=5): 0x01, 0x0a, 0x00, 0x13, 0x05, 0x03, 0x26, 0x01, 0xff, 0x25, 0xad, 0xb0
2020-01-15 08:22:00.537 Detail, Node005, Queuing (Send) SwitchMultilevelCmd_Get (Node=5): 0x01, 0x09, 0x00, 0x13, 0x05, 0x02, 0x26, 0x02, 0x25, 0xae, 0x4d
2020-01-15 08:22:00.543 Info, Node005, Value::Set - COMMAND_CLASS_SWITCH_MULTILEVEL - Level - 0 - 1 - 38
2020-01-15 08:22:00.543 Info, Node005, SwitchMultilevel::Set - Setting to level 38
2020-01-15 08:22:00.543 Detail, Node005, Queuing (Send) SwitchMultilevelCmd_Set (Node=5): 0x01, 0x0a, 0x00, 0x13, 0x05, 0x03, 0x26, 0x01, 0x26, 0x25, 0xaf, 0x6b
2020-01-15 08:22:00.543 Detail, Node005, Queuing (Send) SwitchMultilevelCmd_Get (Node=5): 0x01, 0x09, 0x00, 0x13, 0x05, 0x02, 0x26, 0x02, 0x25, 0xb0, 0x53

which looks like it’s making two different level setting commands of 99 and 38, neither of which should be fully off. I also note there are Set and Get commands sent, but nothing shown as “received”. By contrast, when I manually turn the device on with its hardware button I see the log includes “received” data:

2020-01-15 08:36:19.177 Detail, Node005,   Received: 0x01, 0x0b, 0x00, 0x04, 0x10, 0x05, 0x03, 0x20, 0x03, 0x63, 0xdd, 0x00, 0x7b
2020-01-15 08:36:19.177 Detail,
2020-01-15 08:36:19.177 Info, Node005, Received Basic report from node 5: level=99
2020-01-15 08:36:19.177 Detail, Node005, Queuing (Send) SwitchMultilevelCmd_Get (Node=5): 0x01, 0x09, 0x00, 0x13, 0x05, 0x02, 0x26, 0x02, 0x25, 0xb1, 0x52
2020-01-15 08:36:19.594 Detail, Node005,   Received: 0x01, 0x0d, 0x00, 0x04, 0x10, 0x05, 0x05, 0x26, 0x03, 0x63, 0x63, 0x00, 0xdd, 0x00, 0x1e
2020-01-15 08:36:19.594 Detail,
2020-01-15 08:36:19.594 Info, Node005, Received SwitchMultiLevel report: level=99
2020-01-15 08:36:19.594 Detail, Node005, Refreshed Value: old value=0, new value=99, type=byte
2020-01-15 08:36:19.594 Detail, Node005, Changes to this value are not verified
2020-01-15 08:36:19.594 Detail, Node005, Notification: ValueChanged

IT WORKS! After several hours of attempts. Apparently I needed to not only reload the automations.yaml file, but also restart the HA server. I am now able to turn the dimmer on to a setpoint and turn it off, so I have reached my initial goal. Thanks for responding to my notes here.

1 Like

There is nothing really special about a z-wave light, all lights are controlled the same way.

Your automation has two actions. First you toggle the light on, so it would turn on back to it’s previous level. Then you turn the light on again with a new brightness of 99. That matches your log file message. According to the docs, brightness is a value from 0-255. Since you set it to 99, that corresponds to a percentage 38%. Perhaps 38% is not enough for the load you have plugged in?

You really only need one action. Doesn’t look like the Device action let’s you do anything besides turn on/off the light. If you are trying to set the light at full brightness, use the light.turn_on service call with brightness: 255 or brightness_pct: 100 instead.

1 Like

If you are using the UI, the automations are reloaded automatically after you save. If you are editing the yaml files, yes you must reload the automations manually. You don’t need to restart HA unless you made other changes.

Thanks for the additional info. I must have made some other changes at some point, because manually triggering the automation didn’t have any effect, and then I restarted HA, and then it did work. Previously the OZW log showed only a few lines and no data received. Now, setting the dimmer to 200 gives me 100 lines in the log file (!) starting with the below:

2020-01-15 09:00:24.706 Info, Node005, Value::Set - COMMAND_CLASS_SWITCH_MULTILEVEL - Level - 0 - 1 - 255
2020-01-15 09:00:24.706 Info, Node005, SwitchMultilevel::Set - Setting to level 255
2020-01-15 09:00:24.707 Detail, Node005, Queuing (Send) SwitchMultilevelCmd_Set (Node=5): 0x01, 0x0a, 0x00, 0x13, 0x05, 0x03, 0x26, 0x01, 0xff, 0x25, 0x2e, 0x33
2020-01-15 09:00:24.707 Detail, Node005, Queuing (Send) SwitchMultilevelCmd_Get (Node=5): 0x01, 0x09, 0x00, 0x13, 0x05, 0x02, 0x26, 0x02, 0x25, 0x2f, 0xcc
2020-01-15 09:00:24.707 Detail,
2020-01-15 09:00:24.707 Info, Node005, Sending (Send) message (Callback ID=0x2e, Expected Reply=0x13) - SwitchMultilevelCmd_Set (Node=5): 0x01, 0x0a, 0x00, 0x13, 0x05, 0x03, 0x26, 0x01, 0xff, 0x25, 0x2e, 0x33
2020-01-15 09:00:24.713 Info, Node005, Value::Set - COMMAND_CLASS_SWITCH_MULTILEVEL - Level - 0 - 1 - 77
2020-01-15 09:00:24.713 Info, Node005, SwitchMultilevel::Set - Setting to level 77
2020-01-15 09:00:24.713 Detail, Node005, Queuing (Send) SwitchMultilevelCmd_Set (Node=5): 0x01, 0x0a, 0x00, 0x13, 0x05, 0x03, 0x26, 0x01, 0x4d, 0x25, 0x30, 0x9f
2020-01-15 09:00:24.713 Detail, Node005, Queuing (Send) SwitchMultilevelCmd_Get (Node=5): 0x01, 0x09, 0x00, 0x13, 0x05, 0x02, 0x26, 0x02, 0x25, 0x31, 0xd2
2020-01-15 09:00:24.715 Detail, Node005,   Received: 0x01, 0x04, 0x01, 0x13, 0x01, 0xe8
2020-01-15 09:00:24.715 Detail, Node005,   ZW_SEND_DATA delivered to Z-Wave stack
2020-01-15 09:00:24.735 Detail, Node005,   Received: 0x01, 0x18, 0x00, 0x13, 0x2e, 0x00, 0x00, 0x02, 0x00, 0xd7, 0x7f, 0x7f, 0x7f, 0x7f, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x03, 0x01, 0x00, 0x00, 0x0e
2020-01-15 09:00:24.735 Detail, Node005,   ZW_SEND_DATA Request with callback ID 0x2e received (expected 0x2e)
2020-01-15 09:00:24.735 Info, Node005, Request RTT 27 Average Request RTT 59
2020-01-15 09:00:24.735 Detail,   Expected callbackId was received
2020-01-15 09:00:24.735 Detail,   Expected reply was received
2020-01-15 09:00:24.735 Detail,   Message transaction complete
2020-01-15 09:00:24.735 Detail,
2020-01-15 09:00:24.735 Detail, Node005, Removing current message
2020-01-15 09:00:24.735 Detail,
2020-01-15 09:00:24.735 Info, Node005, Sending (Send) message (Callback ID=0x2f, Expected Reply=0x04) - SwitchMultilevelCmd_Get (Node=5): 0x01, 0x09, 0x00, 0x13, 0x05, 0x02, 0x26, 0x02, 0x25, 0x2f, 0xcc
2020-01-15 09:00:24.743 Detail, Node005,   Received: 0x01, 0x04, 0x01, 0x13, 0x01, 0xe8
2020-01-15 09:00:24.743 Detail, Node005,   ZW_SEND_DATA delivered to Z-Wave stack
2020-01-15 09:00:24.764 Detail, Node005,   Received: 0x01, 0x18, 0x00, 0x13, 0x2f, 0x00, 0x00, 0x02, 0x00, 0xda, 0x7f, 0x7f, 0x7f, 0x7f, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x03, 0x01, 0x00, 0x00, 0x02
2020-01-15 09:00:24.764 Detail, Node005,   ZW_SEND_DATA Request with callback ID 0x2f received (expected 0x2f)
2020-01-15 09:00:24.764 Info, Node005, Request RTT 28 Average Request RTT 43
2020-01-15 09:00:24.764 Detail,   Expected callbackId was received
2020-01-15 09:00:24.781 Detail, Node005,   Received: 0x01, 0x0d, 0x00, 0x04, 0x00, 0x05, 0x05, 0x26, 0x03, 0x4d, 0x4d, 0x00, 0xda, 0x00, 0x09
2020-01-15 09:00:24.781 Detail,
2020-01-15 09:00:24.782 Info, Node005, Response RTT 46 Average Response RTT 87
2020-01-15 09:00:24.782 Info, Node005, Received SwitchMultiLevel report: level=77
2020-01-15 09:00:24.782 Detail, Node005, Refreshed Value: old value=0, new value=77, type=byte
2020-01-15 09:00:24.782 Detail, Node005, Changes to this value are not verified
2020-01-15 09:00:24.782 Detail, Node005,   Expected reply and command class was received
2020-01-15 09:00:24.782 Detail, Node005,   Message transaction complete
2020-01-15 09:00:24.782 Detail,
2020-01-15 09:00:24.782 Detail, Node005, Removing current message
2020-01-15 09:00:24.782 Detail, Node005, Notification: ValueChanged

Reloading my automations.yaml file after the reboot I see it has been altered by the GUI from what I did manually. It looks like I’m actually setting the device three different times now. I’ll get this figured out eventually, now that I’ve got something working at least.

- id: '1579065612487'
  alias: Turn dimmer to 200
  description: turn on dimmer to 200
  trigger:
  - event: sunset
    platform: sun
  condition: []
  action:
  - device_id: 5c628ec259a24837b99b74aa5d1e1213
    domain: light
    entity_id: light.inovelli_unknown_type_c000_id_c002_level
    type: turn_on
  - data:
      brightness: 200
      entity_id: light.inovelli_unknown_type_c000_id_c002_level
    entity_id: light.inovelli_unknown_type_c000_id_c002_level
    service: light.turn_on

For my own reference, apparently this is a cleaner example of dimmer example code I was originally looking for, in this case setting the dimmer to 50/255 or about 20% of full:

- id: '1579109231359'
  alias: turn dimmer to 50
  description: turn dimmer to 50
  trigger:
  - event: sunrise
    platform: sun
  condition: []
  action:
  - data:
      brightness: 50
    entity_id: light.inovelli_unknown_type_c000_id_c002_level
    service: light.turn_on