Using LED bar as a night light

Greetings! I’m a new Z-Wave user, new Hubitat user and new Inovelli switch user (although I do have lots of automation experience with Home Assistant, using several other automation protocols, including UPB and Lutron Caseta, and hope to integrate everything down the road.) For now, I’m just using Hubitat.

I just received my switches from Inovelli a couple weeks ago, and they are running firmware 1.35, Hubitat is running 2.2.1.113. I do have the Inovelli Dimmer Red Series LZW31-SN driver installed (dated 2020-06-02) and the switches are configured to use this “User” type, not Hubitat’s default “System” type.

I’ve configured Rule Machine in Hubitat in an attempt to use the LED bar as a night light. So I have these two rules configured in Rule Machine:

  • Set Switch 1 LED to “warm white” 30 minutes after sunset
  • Turn off Switch 1 LED 30 minutes after sunrise

The first rule is:

  • Select Trigger Events
    • When time is Sunset+30 minutes
  • Select Actions to Run
    • Set color: Switch 1 (LED Color) ->Warm White ->Level: 100

The second rule is:

  • Select Trigger Events
    • When time is Sunrise+30 minutes
  • Select Actions to Run
    • Dim: Switch 1 (LED Color): 0

However, the LED bar is not behaving like I’d expect. I figured that I’d be able to control the “LED Color” child device like this.

This is what I see in the logs:

dev:65 2020-06-15 21:43:03.943 info Switch 1: parameter '13' with a byte size of '2' is set to '28'
dev:65 2020-06-15 21:43:01.921 info Switch 1: parameter '14' with a byte size of '1' is set to '10'
dev:65 2020-06-15 21:43:00.640 info Switch 1: Retreiving value of parameter 13
dev:65 2020-06-15 21:43:00.637 info Switch 1: Setting parameter 13 with a size of 2 bytes to 28
dev:65 2020-06-15 21:43:00.635 info Switch 1: Retreiving value of parameter 14
dev:65 2020-06-15 21:43:00.633 info Switch 1: Setting parameter 14 with a size of 1 bytes to 10
dev:65 2020-06-15 21:43:00.630 info Switch 1: Setting LED color value to 28 & LED intensity to null
dev:65 2020-06-15 21:43:00.627 info Switch 1: componentSetColor([hue:11, saturation:20, level:100])

dev:65 2020-06-16 06:27:02.014 info Switch 1: parameter '14' with a byte size of '1' is set to '0'
dev:65 2020-06-16 06:27:00.745 info Switch 1: Retreiving value of parameter 14
dev:65 2020-06-16 06:27:00.743 info Switch 1: Setting parameter 14 with a size of 1 bytes to 0
dev:65 2020-06-16 06:27:00.735 info Switch 1: childSetLevel(05-ep103, 0)
dev:65 2020-06-16 06:27:00.733 info Switch 1: componentSetLevel( Switch 1 (LED Color), null)

I don’t necessarily need to have the LED go “off”; having it return to “normal functionality” in the morning (dim blue when off, ramps up to bright blue when on) would also be fine.

Any suggestions?

1 Like

Try a different color for testing. My experience so far is that these are not capable of “white” or color temperature, rather just RGB colors.

I have tried a couple different colors from the “Bulb color” drop-down menu in the Action editor.

Let me take a step back from automating this for a moment:

Should I be able to go to Switch 1’s device page (or the child LED color device page) in Hubitat and manually change the LED bar color and intensity, turn the LED bar off/on, etc.? If so, what should I try to do this “by hand” to verify that basic functionality first?

The logs clearly indicate that the events are being triggered, but the switch doesn’t seem to be interpreting what Hubitat is sending correctly…

@eddy - Have you looked at this post?

Reading that post, it seems like @BertABCD1234 modified Inovelli’s custom “user” driver, and since that time, Inovelli has updated the driver a few times. I’d prefer to use the driver as-supplied from Inovelli to make future upgrades easier. Is modifying the driver the only way to use Rule Machine to get behavior like I described? I just assumed enabling the Create “LED Color” Child Device option would be sufficient to allow independent control of the light bar.

Since the time I wrote that driver, Inovelli has made a few changes to theirs (and I also re-thought that driver and don’t update that one anymore). You may not need a non-Inovelli custom driver, as theirs now allows you to:

  • set the notification LED directly without needing to create child devices (setIndicator(), same command as on Hubitat native drivers for supported devices)
  • set the “regular” LED bar color and brightness (via an optional child device; see “Create LED Child” option in driver)

It looks like that might be what you’re trying to do already, in which case I’m not sure why it isn’t working. The one thing I can think of is that the “off” LED is a different parameter than the “on” LED for level (both use the same color value, though obviously you won’t see it if the LED is set to off, level 0), so if the dimmer switch isn’t on when you change the LED child device, you might not see the results. Additionally, it will ignore the saturation value in the “color” map and just use hue and level since that’s all the LED bar supports, and I don’t think any value will give white at the moment (older documentation suggested that it could, and I think it’s still on the roadmap).

Not sure if any of this helps.

EDIT:

I did see this in your logs:

dev:65 2020-06-15 21:43:00.630 info Switch 1: Setting LED color value to 28 & LED intensity to null
dev:65 2020-06-15 21:43:00.627 info Switch 1: componentSetColor([hue:11, saturation:20, level:100])

and it’s not clear to me why it says “intensity to null” when you had level at 100. Maybe try with a diffent level to see if there’s a bug here?

This may not be related (or may be) but I noticed an issue where the driver will only accept a maximum of 99 for level. If you try to set it directly to 100% in the device, it throws back an error of 0-99 only however if you are setting it via another method (rule engine, even the child devices), 100 is accepted but it does odd things.

Z-Wave level tops out at 99. If you’re on Hubitat (or SmartThings), their level model allows 0-100 but might do varied, unspecified things with 100; if it succeeds, you’ll probably see it reported back as 99. I always prefer to be on the safe side and use 99 for full brightness just in case.

This would only explain the “parent” device that is actually Z-Wave level, not the LED child devices and whatnot, so I’m not sure if it would fully explain anything…

Agreed.

In my case, the “child” device would take the value, pass it to the parent. The parent would accept the value and send it to the device but from there it would do different things. Sometimes I’d see a null response, sometimes nothing would happen, sometimes the device would set to a random level.

The only relation I was thinking here was perhaps it was a similar child -> parent -> device -> ?? issue where when setting directly from the parent a more apparent reason/error/result could be seen.

I’m not having any luck being able to control the LED with the Inovelli-supplied driver. Even manually from the Hubitat Devices pages, I can’t get the LED to do anything. I decided to just ignore that switch (which was a dimmer, with the LED bar) for now.

So this morning, I installed a new Red Series On/Off Switch to see if it behaved any differently.

I discovered it successfully in Hubitat, and it used the Hubitat-supplied driver (“Inovelli Z-Wave Smart Scene Switch S2”) by default. It worked fine; using the default driver I was able to set the Indicator Level when On, Indicator Color when On, Indicator Level when Off and Indicator Color when Off. All these settings worked, and the LED changed color and brightness based on the settings I selected. Nice.

Then I installed the LZW30-SN drive from GitHub. I updated the driver for the switch. Now I had the ability to set the LED Strip Color (even though there’s no strip, just a single LED), but no way to specify separate colors for the on/off state (there’s just settings for LED Strip Intensity and LED Strip Intensity (When OFF)). However, using the driver from GitHub, the LED no longer changes brightness when toggled on/off. I also can’t get the LED Color child device to do anything. Any commands (on, off, set color, set intensity) are just ignored—just like the dimmer that started this whole conversation…

Do the GitHub drivers require a newer firmware version of something? As I mentioned, I’m new to Hubitat and Inovelli, so I feel like I must be missing something.

P.S. I just tried changing the dimmer switch (“Switch 1”) back to the Hubitat-supplied driver, and I still can’t change the LED strip color. The Indicator Level when On and Indicator Level when Off settings do seem to work, but the LED strip color settings don’t have any effect…

@eddy I was wondering if you ever got this working. I’m having a similar problem and this thread came up during my search.

[dev:908] 2021-04-12 08:57:45.844 pm[error] groovy.lang.MissingMethodException: No signature of method: java.lang.String.div() is applicable for argument types: (java.lang.Integer) values: [10] Possible solutions: is(java.lang.Object), drop(int), wait(), trim(), find(), size() on line 564 (componentSetColor)

[dev:908] 2021-04-12 08:57:45.753 pm[info] Kid’s Light: Setting LED color value to 158 & LED intensity to null

[dev:908] 2021-04-12 08:57:45.751 pm[info] Kid’s Light: componentSetColor([switch:on, hue:62, saturation:100, level:80])