Shelly Dimmers not going to zero in RM

So I'm getting the hang of this HE environment, and I like what I have learned so far. RULE machine is pretty COOL :sunglasses:! Being an Insteon refugee, I see sooooo much potential for cool things here!

My system is still newly growing, the first devices added were four Shelly Dimmer-2 modules. I have them fitted into the bases of table lamps, with SPDT tiny toggle switch on each for local control and full automation available - good so far!

Recently set up a couple of slow dimming/brightening rules based on time, the trouble is, when these are supposed to dim to ZERO (off completely) they stop at 1% glowing, and never go off.

The rule is: When time is sunset -40 minutes, Fade Living Room up to 50% over 15 minutes with 1% interval.
Wait for event: Time is 2200
Fade Living Room down to 0 (ZERO) over 10 minutes with 1.0 seconds interval.
...but the dimmers never reach zero.

I also have a similar wake-up routine: fade 'Living Room' up over 10 minutes to 100%, wait till sunrise+90 minutes, then fade to 0 over 5 minutes. They still wont hit zero.

Looking at the Logs, I find this:
ERROR "Exception when sending: status code: 400, reason phrase: Bad Request. Please check your device settings."
Preceding that is:

Today I am trying something different, I have changed the device which I am calling to action in Rule Machine from "Living Room" (shows up as a 'group dimmer' in devices as a member of 'living room') to the two individual Shelly devices in the lamps themselves. All other elements of the rule remain the same. We will see what it does this time!

Most drivers treat setLevel(0) as a command to turn off, but leave the level non-zero. They should never actually set the level to 0. This is because doing so would allow you to turn on the light, and have nothing happen, because the level was zero. So, to avoid that, setLevel(0) means turn off without adjusting level.

Well turn off is exactly what I want to do, but slowly so. I tried adding a toggle dimmer action after the dim down, but as I was inserting it I saw it used the same "set to zero" format, so I figured it would do no better.

We'll see how it works acting on the lamps themselves, rather than the dimmer group.

Are the lights not turning off? Please show a screenshot of the device page after you run the transition. Or, try this experiment. Set the level to 40, or any number, from the device page. Hit the Off command. Do they turn off?

In the routines had, they do not turn off in the step of "fade down to 0 over xx minutes", the hang glowing at 1%. If I go to the device page and click "off" they do turn off. Also in the dashboard, a simple click turns them off.

I just set up a test scene just now and it is running the dim down as I write this, when it completes I will report...

Looks like it hung at 2% this time - just to make me a liar! IT'S A CONSPIRACY, I tell you!!

Here's the rule summary:

And here is the logs - the "off" at 18:01 was me using the device page - response was instantaneous.

I will look into it.

I just tried this, and it turned off the bulb. See these logs:

This makes me suspect the driver may be the problem, not Rule Machine. What driver are you using? That's listed under Type on the device page.

Shelly WiFi Dimmer, that is what is installed, is this the best option?

Can you show me a screenshot of the device page, the upper portion where the command and Current States are, like this:

Parent device:

Child device:

The child device shows current level of 2 but the lamp is off. Clicking "Off" there does not change level display, and the lamp does nothing, as I would expect.

Thanks. We will look into it. It should turn off if you command it setLevel(0). Try that from the device page, and see what it does. Turn it on first, and see if setLevel(0) turns it off or not.

Ran the test dim event again and watched the live log:

Using "Set Level" in the device page to set to 0 (zero) does nothing, checking the log shows repeat of the same error.

Using the "off" button in the device page turns it off correctly.

Thanks, this is what I needed.

Does it throw the error for setLevel(0) from the device page, or only from the app?

I see the errors on the Hubitat devices, watching from the laptop.

If you were referring to the Shelly app, I don't have it opened at all.

Coincidentally, my regular sunset routine just fired up. I'm sure it will hang tonight at bedtime.

Speaking of the app, (hubitat) I am having a bug on it too, I will start a new thread for that in the appropriate subject subgroup.

Have a great evening, I will be watching this to see if you discover any gremlins! Good luck :four_leaf_clover:!

Yes, I know. Question is, if you do setLevel(0) from the device page, does that throw an error in the device logs?

Oh I understand. In the automatic "Test Dim down" run for which I sent the logs, the error occurred in timely step of the reported dimming levels; incrementally down, then error - just once.
Then I went to the device page and set level to 0, it did nothing, so then I clicked "off" in the device page right there and it went off.
I then looked again at the logs and saw a repeat of the same error from my attempt to set level, and following it, the off command accepted as info.

Actually, I'm asking you to do a different test, only on the device page, and with the device logs. Turn on the device from the device page. Then Set Level to 0 on the device page. Based on what you said above, nothing happens. What I want to know is if there is an error in the logs when you do that. You would need to have Logs open in a separate browser tab.