How to add a missing Channel to a Shelly Plus Dimmer 10V Thing

  • Platform information:
    • Hardware: Xeon(R) CPU E31270 @ 3.40GHz / 32GB / 48TB ZFS

    • OS: Proxmox priv LXC Container with 4GB/4 Cores/100GB rootfs/Debian12 6.8.12-4/

    • Java Runtime Environment: openjdk version “17.0.13” 2024-10-15 LTS

    • openHAB version: openHAB 4.3.1

  • Issue of the topic:

I just started using openHAB so perhaps I’m just missing or don’t understand Things - so just point me to the relevant documentation.

I have a Shelly Plus Dimmer 10V which now have some local “shelly” scripts controlling the brightness. So I don’t want to alter the brightness value from openHAB - just turn it on and off (perhaps later when I have enough understanding of OH, so I can’t read the Shelly-KVS values and use them)

I installed the shelly bindings, added the “thing” and had only a brightness control which will automatically turned on the Light, but I found a “Helligkeit Auto-AN”/“Brightness Auto-On” switch in the thing configuration. Turned it off and expected to see a way to turn the “light” on.

You can do that with e.g.:

curl "http://192.168.33.1/rpc/Light.Set?id=0&on=true"

Can I add that in an “items” file? Although there seems no channel? Or am I just confused by the “Brightness Auto-On” switch and the binding just does not support that! - do it via MQTT/RPC calls?

The short answer is typically only the lower level bindings where discovery is not possible support adding Channels to Things. So either this is an oversight on the binding author’s part or more likely a different approach is intended.

A Dimmer Item can be configured and used in all the same ways as if it were a Switch Item. It might be the case the binding developers do not provide a Switch Channel because the Dimmer Channel can do both jobs.

So first I’d give that a try. Command the Dimmer Item to ON and OFF and verify the behavior is as you want (sometimes this doesn’t work as wanted, e.g it doesn’t remember the last dimming value). If it works, there are some options you can use including:

  • just keep it as a Dimmer but use the Switch element (Sitemaps) and/or set the default widget metadata on the item to use the toggle widgets.
  • use a profile to translate between Dimmer commands and updates to Switch commands and updates and then you can link the channel to a Switch
  • create a proxy item and rule to keep a Switch Item and the Dimmer Item in sync

If it doesn’t work as expected, file an issue on the binding. In the mean time you can switch to MQTT (most Shelly’s support MQTT I think) or use the HTTP binding to call that URL on command for that one function.

Thank you for the clarification.

Autocasting for switches :) Would never have the intrepidity to use a switch type on a dimmer type … Works exactly as I wanted. Does not touch the “dimm value” just turns it on and off.

(Is it a “cast” or do “dimmer” in general have a switch method? … would make sense…)

Dimmer Items have valid commands ON, OFF, INCREASE, DECREASE, 0 - 100 (and maybe REFRESH).
Normally every dimmer channel should provide reasonable reactions to these commands.