iLumin RGB bulb with Zwave2MQTT

After updating the OZW config files from Inovelli’s github Zwave2MQTT recognized the product as LZW42 Multi-Color Bulb (Inovelli) but the type is set to Light Dimmer Switch

According to Zwave2MQTT it is translating that into a light_rgb_dimmer type device in home assistant, but HA only shows a On/Off control that itself does not work and shows no further control to the lights.

If anyone has been able to get these bulbs to work with HA+Zwave2MQTT let me know.

That is likely a limitation of Zwave2MQTT (Zwave2MQTT attempts to automatically add the device to HA, but it doesnt always get things right).

I just added the bulb settings to my configuration.yaml file (note: you will need to fix the zwave topics, as these are specific to my setup):

light:
  - platform: mqtt
    name: Hall Light
    command_topic: "zwave/7/38/1/0/set"
    brightness_command_topic: "zwave/7/38/1/0/set"
    brightness_value_template: "{{ (value_json.value) | round(0) }}"
    brightness_state_topic: "zwave/7/38/1/0"
    brightness_scale: 99
    on_command_type: "brightness"
    payload_on: 99
    payload_off: 0
    state_topic: "zwave/7/38/1/0"
    state_value_template: "{{ 0 if value_json.value == 0 else 99 }}"
    color_temp_command_topic: "zwave/7/51/1/0/set"
    color_temp_command_template: "{{ '#%02x%02x%02x%02x%02x' | format(0, 0, 0, (0.7349 * (value - 153)) | round(0), 255 - (0.7349 * (value - 153)) | round(0))}}"
    color_temp_state_topic: "zwave/7/51/1/0"
    color_temp_value_template: "{{ (((value_json.value[7:9] | int(0, 16)) / 0.7349 ) | round(0)) + 153 }}"
    rgb_command_template: "{{ '#%02x%02x%02x%02x%02x' | format(red, green, blue, 0, 0)}}"
    rgb_command_topic: "zwave/7/51/1/0/set"
    rgb_state_topic: "zwave/7/51/1/0"
    rgb_value_template: "{{ value_json.value[1:3] | int(0, 16) }},{{ value_json.value[3:5] | int(0, 16) }},{{ value_json.value[5:7] | int(0, 16) }}"
    effect_command_topic: "zwave/7/51/1/1/set"
    effect_state_topic: "zwave/7/51/1/1"
    effect_list:
      - "Off"
      - "Cool White"
      - "Warm White"
      - "Red"
      - "Lime"
      - "Blue"
      - "Yellow"
      - "Cyan"
      - "Magenta"
      - "Silver"
      - "Gray"
      - "Maroon"
      - "Olive"
      - "Green"
      - "Purple"
      - "Teal"
      - "Navy"
      - "Custom"
1 Like

Right, Thanks.

I was just reading your post in another topic where you mentioned you configured this manually.

I guess this would be an issue to raise on github with Zwave2MQTT directly then.

Thanks

I know there is a way to update the autodiscovery logic in Zwave2MQTT, but I havent tried it myself.

1 Like

I have tried messing around with that but have had no success.

The documentation is sorely lacking for that feature.

@jtronicus did you have to do anything else besides add the mqtt settings to your config for each bulb?

I added what you posted to my configuration after adjusting the values for my specific topics using what z2m showed as a reference. After restarting both apps (HA and Z2M) I noticed no difference with the new configuration. It did not even adopt the new name specified in the config.

Another interesting note the only functionality I can control in HA with the bulb atm is on/off
On turns on and stays on instantly. But off has a pretty massive delay in HA and the UI resets itself back to on before again going to off as if theres some delay in MQTT saving its new state

OZW seems to send a “Get” command immediately after sending a “Set” command. This means that OZW might be getting the state of the light while it is in transition from on to off. This could be part of the reason the UI reverts back to on before actually switching off. Once the light turns off, it automatically reports its state, so this Get command is really unnecessary To my knowledge, there is no way to disable this functionality in OZW. I set the dimming duration on the bulbs to 0 to help prevent this issue:

Also, the payloads used likely depend on the settings you choose in Zwave2MQTT. It sould be that you have a different payload type selected. These are my settings:

Might be because you have Hass Discovery turned off and I have it on.

I created a bug issue here on the Z2M Lib hoping we can get support for this resolved nativly

Sorry for the thread necromancy but I wanted anyone who stumbles on this to know this has been fixed with Zwave2mqtt and HASS discovery. The bulbs will be added to HA automatically with their full feature set.

I know I didn’t want to add manual MQTT lights for every one of my 10 or so bulbs like suggested in other places.

EDIT: At time of writing the fix has been accepted but won’t be in place until the next release >3.3.0

2 Likes