Enocean rockerswitch to dimmer : the profile raw rocker to dimmer does not work with INCREASE DECREASE commands

Openhab 4.3.2
I have a rockerswitch with a dimmer item and the profile “raw rocker to dimmer” : the ON OFF command is functionning normally (sets the state to 100 or 0) but the INCREASE DECREASE command does not work as you can see in the video:

any idea why ?

I think it was working a few releases before ?

Something else also : I remember being able to reverse the rockerswitch but I do not find the option anymore ? I’m sure I was able to do DIR1 - OFF and DIR2 - ON (in the video it’s the contrary) , any idea how to change that ?

You have to provide a rule which will react on INCREASE and DECREASE commands.
There are many dimmers out there which don’t support increase/decrease commands.

Well, in the official documentation Items | openHAB the rawrocker-to-dimmer says it sends an INCREASE or DECREASE Command every 500 milliseconds ; which we can see in the video.

But here is the problem: I use the generic Item Dimmer (as you can see in the video I create a new Item of type Dimmer) and this Item should react to those commands by increasing/decreasing the value (0-100). This is the default behavior of the Dimmer type : Items | openHAB

Does it mean the generic Dimmer Item has a bug now and it does not react to those commands without a rule ?

No, that’s not how it works.
An Item will never react on a command. The Item will forward a command between channels linked to the same Item, but it won’t do anything itself. So it’s up to the dimmer channel to react on INCREASE/DECREASE commands. If the dimmer itself doesn’t, you’ll have to write a rule to translate INCREASE/DECREASE to absolute dimmer commands. This is how it works since 2011 (OH1.0). Example (DSL):

rule "translate increase/decrease command"
when
    Item myDimmer received command
then
    var Integer iDim = (myDimmer.state as Number).intValue
    switch(receivedCommand) {
        case INCREASE: {
            iDim += 2
            if(iDim > 100) iDim=100
            myDimmer.sendCommand(iDim)
        }
        case DECREASE: {
            iDim -= 2
            if(iDim < 0) iDim=0
            myDimmer.sendCommand(iDim)
        }
    }
end

You say

An Item will never react on a command

Why then a Dimmer Item reacts when receiving the ON/OFF commands and not the INCREASE DECREASE commands ?

Indeed, a Dimmer Item changes its state to the values 100 and 0 when receiving ON OFF commands (so there IS a reaction and a state change). But nothing is happening when receiving an INCREASE DECREASE command :

for example:

00:48:55.149 [INFO ] [openhab.event.ItemCommandEvent       ] - Item 'dimmer1' received command ON
00:48:56.537 [INFO ] [openhab.event.ItemCommandEvent       ] - Item 'dimmer1' received command OFF
00:48:56.538 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'dimmer1' changed from 100 to 0
00:48:58.668 [INFO ] [openhab.event.ItemCommandEvent       ] - Item 'dimmer1' received command ON
00:48:58.669 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'dimmer1' changed from 0 to 100
00:51:00.488 [INFO ] [openhab.event.ItemCommandEvent       ] - Item 'dimmer1' received command INCREASE
00:51:01.217 [INFO ] [openhab.event.ItemCommandEvent       ] - Item 'dimmer1' received command INCREASE
00:51:01.605 [INFO ] [openhab.event.ItemCommandEvent       ] - Item 'dimmer1' received command INCREASE
00:51:02.470 [INFO ] [openhab.event.ItemCommandEvent       ] - Item 'dimmer1' received command DECREASE
00:51:02.761 [INFO ] [openhab.event.ItemCommandEvent       ] - Item 'dimmer1' received command DECREASE
00:51:03.050 [INFO ] [openhab.event.ItemCommandEvent       ] - Item 'dimmer1' received command DECREASE
00:51:06.460 [INFO ] [openhab.event.ItemCommandEvent       ] - Item 'dimmer1' received command OFF
00:51:06.460 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'dimmer1' changed from 100 to 0
00:51:08.215 [INFO ] [openhab.event.ItemCommandEvent       ] - Item 'dimmer1' received command ON
00:51:08.216 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'dimmer1' changed from 0 to 100

As said… it’s up to the dimmer channel if the commands are executed,
the binding itself won’t calculate other commands, but will send the command ‘as is’ to the hardware.
ON and OFF are quite simple commands which most (if not all) dimmers will know how to handle, however, even these commands can lead to different behavior, i.e. ON is not the same as 100 and manufacturers tend to build different functionalities into their hardware - always wake up with 100, always wake up with a fixed (configurable) value, always wake up with the last non-zero value set to the dimmer…