[BTicino/OpenWebNet] Adding CEN commands: design

Thanks Massi for your very appreciated work. Do you have any update about binding of CEN? I’ve 2 scenarios to configure, but I don’t know how can bind them.

Thanks again
regards

Hi,
after some analysis, I am thinking of defining a scenarioButton channel, which can have 4 states:

  • pressure : the button is being pressed using short pressure, this state can last only <0.5sec
  • release : the button has been released after a short pressure
  • pressure_ext : the button is being pressed using long (extended) pressure, this state value is repeated until is kept pressed
  • release_ext : the button has been released after a long (extended) pressure

and then to map both the CEN/CEN+ messages received from the BUS to one of these 4 states.
So for example the sequence will be:

  • short pressure: previous state (UNDEF/release/release_ext) -> pressure -> release
  • long pressure: previous state (UNDEF/release/release_ext) -> pressure_ext (*repeated if keep pressed) … -> release_ext

In this way you have just to concentrate on the type of pressure you want to react on and the rules in OH2 would be exactly the same no matter if you want to activate them from a CEN or CEN+ command: you have just to write a rule based on the state changes of the scenarioButton channel and activate commands according to your wanted behaviour.

Before going into implementation, I want to have some feedback from you about this design.

bye
m

Hi Massi,
This solution is correct for me.
Regards
Arnaud

Hi Massi yes that should work.

souds good to me too!

ok I will proceed implementing this design. Will let you know here when is ready for testing.
bye
M

Hi all,
find here beta9-pre2, which implements basic support for CEN scenario buttons:

org.openhab.binding.openwebnet-2.4.0-b9-pre2.pdf (152.8 KB)

Channels button1..button4 are of type scenarioButton and can have the following states:

Channel Type ID Item Type Description Read/Write
scenarioButton String Pressure of a CEN scenario button: PRESSED, RELEASED, PRESSED_EXT, RELEASED_EXT R

senario_control4

You can add a BUS Scenario Control-4 (4 buttons) thing from PaperUI Inbox.

Automatic discovery for CEN is implemented using discovery by activation, a new way to discover things: when item search is still active (spinning arrow in Inbox), activate the physical device (for example push a Scenario button) to have it discovered by the binding.

Alternatively you can configure the thing/item manually:

Thing:

Bridge openwebnet:bus_gateway:mybridge "MyHOMEServer1" [ host="192.168.1.35", passwd="abcde" ] {
    ...
  bus_scenario_control4    LR_scenario      "Living Room Scenario Control" [ where="20" ]
}

item (button 1):

String   iLR_scenario    <network>   { channel="openwebnet:bus_scenario_control4:mybridge:LR_scenario:button1" }

Try the new pre-release and tell me here in this thread how it works!

It would very nice if someone could write a rule example that uses a scenarioButton (WHO=15) to activate some other OH2 command or scenario.

Bye
Massi

can someone here use the official bticino client (https://www.myopen-legrandgroup.com/developers/ -> tab TOOLS) and then send these commands:

  1. *#15*0##
  2. *#25*0##
  3. *#1015*0*7##
  4. *#1025*0*7##

and then send me images of the output windows ?
bye
M

Hi Massi, great to see you are progressing with CEN
Does this work with normal wall switches? I have an F420 scenario module which I never use because I can do more using openhab.

Massimo, Cen don’t has status only command.
Bye
Sandro

if it’s a scenario switch yes: it should work with any device that generates WHO=15 basic and evolved CEN (see here: https://www.myopen-legrandgroup.com/content/uploads/2016/06/WHO_15-25.pdf)

bye
m

Hi Sandro,
correct CEN does not have a state, but every item in OH2 has to have a state, right?
So the binding maps CEN events (about pressure of a button) in these states: PRESSED , RELEASED , PRESSED_EXT , RELEASED_EXT.
do you have suggestions for a different design?
bye
m

Great I’ll have a try later today…the link above is only 152kb and is a .pdf is this correct??

I did the test, no answer on all 4 frames

Yes: change the extension to .jar and follow the instruction on the binding README for upgrading from previous binding version.

M

You should at least have received a NACK response: *#*0##
Did you get it?

@massi

Massi,

I installed it and it managed to discover my normal switches but it does not find the CEN ones. I ran the same test and I’m not getting any reply

Did you follow the “disover by activation” method?

if yes, can you set log level to DEBUG (see README how), repeat the discovery process activating some of your CEN swtiches, and send me your log via PM ?

massi

I did that and there was nothing in the logs