[openwebnet] adding CEN/CEN+ support to OH3

So sad to see you can use scenarios and i can’t due to old equipments :tired_face:

Ruben Fuser

good that things work well! The update has already been submitted for approval.

The feature you described could be added to the binding, exactly the way you designed. Basically add a new event (DOUBLE_PRESSED) and move the 2x-press detection from the rule to the binding.
I suggest you copy the text in a new issue on github, just to track.
The point is alwasy to find free time to implement that…

Adding scenarios WHO=0 is not much different from WHO=15/25.
Again here is a matter of finding free time to implement that!
@rubenfuser can you clean up the comment on the issue? and use code fences for the messages related to WHO=0 scenarios you received?

@massi
ok cleaned topic.
i’ve understood that who=0 is the button that control all my rollershutters. found by your binding and now is working in OH3. never knew that physical button was configurable in OH :slight_smile:
sorry i didn’t understand you accepted to reimplement the support for my github request. i supposed that was based on number of users that request that support…in this case, i really appreciate, it’s enough to know you accepted to readd this support, no mater of when :slight_smile:

ps. yesterday i’ve found a physical error on my scenarios physical buttons, a configurator was missing making button 1 and 3 blinking fast when electrical power on home goes down and up. i’ve readded the missing configurator behind the wall button and retested if magically OH can understand the button pressure but doesn’t. never loose the hope :wink: i will retry when you publish a new supported version for my devices :slight_smile:

Hi @massi
Just a note to say I am really pleased with the CEN+ functionality - I’ve been testing for about a week now and it runs very well. I find the physical switches are much more responsive than under 2.5. No errors so far!

Thanks very much for all your time and effort that you have given to this project.

Good news: CEN/CEN+ support has been approved to be included in the upcoming 3.2 milestone.
Note that I had to change the event names (changing *PRESSURE to the more linguistically correct *PRESS) as requested by the reviewer. The original term was misused in the BTicino documentation (and in the gateway English user manuals).
Of course this is updated in the binding readme as well.

2 Likes

Maybe daft question… if I want test cen support with 3.2 jar do I need oh3.2? I have just setup oh3.1 with alpha jar to test thermo stuff. Does 3.2 also include the thermo functionality?

M

I suggest you wait a couple of days for the end-October OH3.2M4 milestone release from Kai, so you can update the whole system to 3.2M4.
This milestone includes both Thermo (with initial support for standalone Thermo, which worked somehow also for some 99-zone setups) and full CEN/CEN+

1 Like

Binding 3.2.0.M3

I am trying to trigger a CEN in MH202.

My rule triggers but I get this error

2021-11-04 20:17:27.590 [ERROR] [internal.handler.ScriptActionHandler] - Script execution of rule with UID 'test-2' failed: 'virtualPress' is not a member of 'org.openhab.core.thing.binding.ThingActions'; line 25, column 5, length 44 in test

thats this line in my rule >>>
cenActions.virtualPress(“SHORT_PRESSURE”, 1)

thing
```yaml
Thing bus_cen_scenario_control CEN71 "CEN test CEN71 b1"  [ where="71", buttons="1" ]

rule

rule "test cen"
when Item test_CEN changed
then
    logInfo("Test", "Test_CEN changed"  ) //+ triggeringItem.state.toString

    // load the custom actions for the CEN thing with address 71
    val cenActions = getActions("openwebnet","openwebnet:bus_cen_scenario_control:gateway:71")

     // trigger START_PRESSURE on button 1 
    cenActions.virtualPress("SHORT_PRESSURE", 1)
end

Any ideas?

    val cenActions = getActions("openwebnet","openwebnet:bus_cen_scenario_control:gateway:71")

i think you must not write here the where-address but the thing name of the cen:

    val cenActions = getActions("openwebnet","openwebnet:bus_cen_scenario_control:gateway:CEN71")

and then don´t know if you already have the new version where this:

SHORT_PRESSURE

when i read right will be changed to

SHORT_PRESS

That is strange because the example I put here in the readme was working and it’s using the address and not the thing name. But maybe I mixed up example and tested configuration.
I will check to be sure documentation is clear.

I am using the latest OH3.2 M3

Tried with virtualPressure and virtualPress and get similiar error messages for both even with combinations of SHORT_PRESSURE and SHORT_PRESS

2021-11-05 08:42:43.623 [ERROR] [internal.handler.ScriptActionHandler] - Script execution of rule with UID 'test-2' failed: 'virtualPressure' is not a member of 'org.openhab.core.thing.binding.ThingActions'; line 25, column 5, length 44 in test

also I tried both address name and address and get the same error

val cenActions = getActions("openwebnet","openwebnet:bus_cen_scenario_control:gateway:71")

and

val cenActions = getActions("openwebnet","openwebnet:bus_cen_scenario_control:gateway:CEN71")

still not working

I copied your example :slight_smile:

did you uninstall the official binding and install this one? the error sound like the command “virtualpressure” is unknown…

I installed the official binding 3.2 m3 and also tried the snapshots. I thought that it was supposed to support CEN???

oh maybe I see the problem now… I upgraded recently in Nov but its M3 not M4! When is M4 out? Was it delayed?

debugging…I get this when I logged the result from

val cenActions = getActions("openwebnet" , "openwebnet:bus_cen_scenario_control:gateway:212")

cenActions = null

I tried that and used OH3.2 snapshot build

Still not working but cen are now listed in the things list as unknown and I see this error message just for virtualPress and not Virtual Pressue

Script execution of rule with UID 'test-2' failed: Instance is not an OpenWebNetCENActions class. in test

Using CEN25 as the name and not the address in this test changed the messages to

2021-11-06 12:30:25.838 [INFO ] [org.openhab.core.model.script.Test  ] - cenActions = org.openhab.binding.openwebnet.internal.actions.OpenWebNetCENActions@896967

2021-11-06 12:30:25.841 [WARN ] [nternal.actions.OpenWebNetCENActions] - cannot execute virtual press action for thing openwebnet:bus_cen_scenario_control:gateway:CEN25: unsupported pressure type: START_PRESS

rule

rule "test cen"
when Item test_CEN changed
then
    logInfo("Test", "Test_CEN changed"  ) //+ triggeringItem.state.toString

    // load the custom actions for the CEN thing with address 71
    val cenActions = getActions("openwebnet" , "openwebnet:bus_cen_scenario_control:gateway:CEN25")
    logInfo("Test", "cenActions = " + cenActions ) 
     // trigger START_PRESSURE on button 1 
    val success = cenActions.virtualPress("START_PRESS", 0)
    logInfo("Test", "success = " + success ) 

end

So some porgoress in that logging cenActions now has a value with CEN25 but not with 25

thing

Thing bus_cen_scenario_control CEN25 "CEN test  - all lights scenario MH202"  [ where="25", buttons="0" ]

I succeed in triggerng a CEN on the MH202.with these settings:
thing

Thing bus_cen_scenario_control CEN25 "CEN test  - all lights scenario MH202"  [ where="25", buttons="0" ]

rule

rule "test cen"
when Item test_CEN changed
then
    logInfo("Test", "Test_CEN changed"  ) //+ triggeringItem.state.toString
    val cenActions = getActions("openwebnet" , "openwebnet:bus_cen_scenario_control:gateway:CEN25")
    logInfo("Test", "cenActions = " + cenActions ) 
    val success = cenActions.virtualPress("START_PRESSURE", 0)
    logInfo("Test", "success = " + success ) 

end

using OH3.2 snapshot and the jar file listed above by Stefan

openhab 3.2.0M4 is available!

what i did:

  • because i hat the testing jar installed i went to karaf and uninstalled it
  • then i had to update my rules and rename triggers from *_PRESSURE to *_PRESS because the naming changed from the testing to the official binding
  • upgraded my openhabian to 3.2.0M4
  • installed the official openwebnet-binding
  • did a reboot of my rpi4b

no problems, everything starts fine, the binding now additionally works with cen and cenplus - thanks to massi!

No, it is not !!!

openHAB 3.2.0M4 is available.

sorry, i will edit that!

ciao @massi , have you got any new information about this?

just for information…

grazie mille