OpenWebNet: Support for generic command frame (WHO=? WHAT=? WHERE=?)

@llegovich @bastler @massi
I open this new topic to discuss, define and unify all “special” requests.
The ultimate goal is to have a single thing that satisfies.


// things
bus_generic_command myOWNCommand [ WHO="1", WHAT="16", WHERE="77" ]
bus_event_capture myOWNEvent [ WHO="1", WHERE="77" ]

// items
Switch mySwitch { channel="openwebnet:bus_generic_command:mybridge:myOWNCommand:genericcmd" }
String myEvent { channel="openwebnet:bus_event_capture:mybridge:myOWNEvent:event" }

// usage (in rules)
mySwitch.sendCommand(ON)   // sends the "*1*16*77##" command on the bus
var s = myEvent.state   // when updated contains the return state or WHAT value
  • If I understand your request correctly, you would like to send OWN code on the bus when the status becomes ON
  • What is not clear to me
    mySwitch.sendCommand("16") // sends the "*1*16*77##" command on the bus
    Here it seems to me that you want to send a personalized [WHAT], different from that of the things
    These are the default timings
    Quite right?

An OWN for timing is this:
Minute = 10
The ON timing is managed by the actuator (F411 / 4), if in the meantime it receives an OFF command, it switches off the light and stops and is timed.
Surely it is more flexible because you have Hours, Minutes and Seconds but also me delicate for less experienced users.
If I transform into the 3 parameters:

bus_generic_command myOWNCommand [ WHO="#1", WHAT="12*#2", WHERE="00*10*10" ]

Are you holding 3 parameters or are they a string format?

bus_generic_command myOWNCommand [ XXXX="*#1*12*#2*00*10*10##" ]

My request “Bus Conversion” has the possibility:

  • The “OutputOFF” field is sent on the bus when the OH status becomes OFF
  • To change the OH status to ON, when the bus receives the OWN code equal to the parameter ‘Input’


  • Bus name bus_command ?
  • Channel
    switch state ON or OFF
    contact state OPEN or CLOSED?
  • Type Parameters
    OWN string format type or divided [WHO] [WHAT] [WHERE]?
  • Parameters
    Command on ON?
    Command on OFF?

this is a great idea! i use exact this timed-light very often in mh200n:

would be goot to have in openhab to be able to move some cenarios away from the mh200n - goal is not to need a mh200n any longer some day

You are right. I have thought again at the article and think it is better to live the WHAT parameter free to be set by a rule, rather than setting it in the definition of the item.

not exactly. What I’d like to do is to be able to define my customized item by configuring the WHO and the WHERE and send a command to the bus by invoking the .sendCommand in a rule. We can choose either to set the WHAT in the definition of the item, and then manage only to send the ON or OFF command, or to leave the WHAT undefined and send customized commands like “16” (timed switch on) or “1” (==ON).

In general, if you want to send commands and capure events that are not yet managed by the binding, I’m quite sure you are clear of the WHO and the WHERE, but you probably want to be free to manage the WHAT by writing rules. So for example, if you want to switch a light ON for 15 minutes you may want to issue a command “16” to the light. But if you just want to switch it ON for 5 minutes you only need to change the WHAT to “15”.

For event capturing, consider the all-lights-off command, not yet covered by the binding (it is under discussion). The myEvent item may be configured as WHO=“1” and WHERE=“0” and when a frame like *1*0*0## is sent to the bus it may be recognized by the item which receives an update, returning state = 0 and allowing a rule to intercept it. Once intercepted, the rul may update all the lights to set them OFF.

whatever name is ok fo rme.

I prefer the WHAT to be a parameter of the .sendCOmmand method. But, in cas, I’m ok with your suggestion as well.

string, it’s more flexible.

IMHO: WHO and WHERE defined in the thing or item, WHAT as a parameter.

hope it helps.

Re: 2 things or just 1 thing? I know nothing about how the binding is built, but if it can be done with just 1 thing then better…

I think GEN-AMB-GR will be a separate implementation, we’ll see in the other discussion

I thought of something like this:

 Thing	bus_comand   test1	"TEST1"	[ input="", outputON="*#1*77*##*2*00*10*10##", outputOFF="" ]
 Thing	bus_comand   test2	"TEST2"	[ input="", outputON="*1*16*77##", outputOFF="" ]
 Thing	bus_comand   test3	"TEST3"	[ input="*0*1*01##", outputON="*#1*14*#2*00*10*10##", outputOFF="" ]
Switch S_test1  "Test 1" { channel="openwebnet:bus_comand:mybridge:test1:switch" }
Switch S_test2  "Test 2" { channel="openwebnet:bus_comand:mybridge:test2:switch" }
Switch S_test3  "Test 3" { channel="openwebnet:bus_comand:mybridge:test3:switch", expire="1s,command=OFF" }

Test1 timer 10 min WHERE = 77
Test2 timer 15 min WHERE = 77
Test3 timer Light WHERE= 14 from press key1 video intercom

@gozilla01 it works for me!

@gozilla01 sorry, your approach works only for switches, for which you only manage ON/OFF states. What if you wanted to read a value? In that case you need the WHAT value not to be converted to ON or OFF, and returned as it is. I still think that leaving the WHAT as a parameter covers a wider range of applications.

Can you give me an example?

Not at present. Who knows in the future.
Anyway, as I said your suggestion works for me, but I prefer the WHAT to be a parameter.
Whatever solution is implemented is still a gift for me and I appreciate that.

WHO, WHAT , WHERE should be three parameters of a new bus_command thing that can be used to send generic commands on the bus.


Hello Massimo, do you think that this new feature colud be releasd soon?
Any other change to send this three parameteres using openhab?

This I want to check if alarm is active in my home…or to send a temporized power on to switch…

Hi welcome,
currently the OH maintainers are doing a big job on the change of the build system, we are still / slowed down in developing new implementations.
Currently there are several very useful things in the pipeline, a little more patience.

Any update on this topic?

unfortunately we were stopped for the change of the new OH build system.
Only a few days ago the maintainers were able to solve the problems and we can go ahead with the new implementations.
This new implementation has not yet been carried out, I cannot tell you the timing.
I need this too, but there are other problems we need to solve first.


Hi I am quite new to Openhab, but managed in a few days to get Raspberry / Openhabian to work with my BTicino Myhome. After a lot of reading, I also realized that it is not possible to send a direct command to the bus with the binding. However, this would be very useful (e.g., I cannot open entrance gate via Openhab otherwise as it is using *6 command).

q1: Any news on this?
q2: Is there a workaround with scenarios, i.e., define the command in a scenario and then execute the scenario from Openhab?

I did a lot of reading, but did not find answers to these questions.