Controll shelly dimmer from rules script

Hi everyone,

I installed the shelly dimmer 2 and related binding… it works properly…Now I would control the brightness with rules…I would like to:

  • retreive the actual value of the brightness
  • modify it, increase/descrese of 10% for example
  • send the command to set the dimmer with new value

I added in the things file the following:
Thing shelly:shelly:shellydimmer-relay:40f52000dc53 "Shelly dimmer 2 Relay 40f52000dc53" @ "Camera" [deviceIp="", userId="myshellyaccount", password="mypass"]

in the items:
Dimmer DimmerShelly “Dimmer Camera[%d %%]” (Camera) {channel=“shelly:shellydimmer:40f52000dc53:relay#brightness”}
Dimmer DimmerIncDec “Dimmer Light +/-” {channel=“shelly:shellydimmer:40f52000dc53:relay#brightness”}

thank you for helping,

In response to what?

Rules are event based. An event happens and the rule runs in response.

A good place to start with rules is the Rules docs. Pay special attention to the section called “Manipulating Item States”.

I had interconnected my KNX trigger, I have an event that I can use to trigger the change in brightness, the problem here is how to correctly set up/change brightness value…

If you still have problems re-post in the main thread:

just do sendCommand(item name, new value)