[BTicino/OpenWebNet] Adding CEN commands: design

Some more observations.

I created some rules. The trigger ‘when changed’ didn’t work but ‘when received update’ does. The rule initiates an Alexa voice announcement telling me over my Echo’s what the state is after the rule triggers and again a short while later.

CENplus from PaperUI
Pressed. Works but the release is very fast and Alexa is too late to catch ‘pressed’. I just hear ‘released’
Pressed_Ext. Alexa announces the change but there was no automatic ‘release’. Manually released from PaperUI.

CENplus from physical switch
Pressed. Works but release is also too fast for Alexa to catch ‘pressed’. I just hear ‘released’

CENplus from S10
Can’t get it to work on the BUS. MH202 scenarios are not triggered. Did it ever work?

CENplus from phone
No item state change detected and No device assoicated error

2019-02-02 17:01:43.090 [INFO ] [org.openwebnet.OpenGatewayBus$a     ] - MON RECEIVED  <<<<<<<<<<< *25*21#24*210##

2019-02-02 17:01:43.096 [DEBUG] [bnet.handler.OpenWebNetBridgeHandler] - ==OWN==  ownId=25.210

2019-02-02 17:01:43.099 [DEBUG] [bnet.handler.OpenWebNetBridgeHandler] - ==OWN==  ownId=25.210 has NO DEVICE associated, ignoring it

2019-02-02 17:01:43.403 [INFO ] [org.openwebnet.OpenGatewayBus$a     ] - MON RECEIVED  <<<<<<<<<<< *1*0*13##

2019-02-02 17:01:43.408 [DEBUG] [bnet.handler.OpenWebNetBridgeHandler] - ==OWN==  ownId=1.13

2019-02-02 17:01:43.412 [DEBUG] [et.handler.OpenWebNetLightingHandler] - ==OWN:LightingHandler== updateLightState() for thing: openwebnet:bus_on_off_switch:Screen10:13

==> /var/log/openhab2/events.log <==

<<<<<<<<<<<<< Scenario did run. Expected switch changed state >>>>>>>>>>>>>>>>
2019-02-02 17:01:43.428 [vent.ItemStateChangedEvent] - WestPIRLights_Switch changed from ON to OFF

CEN from paperUI
Works but release is too fast for my Alexa Rule to catch ‘pressed’. I just hear ‘released’

CEN from S10
Item didn’t update but Thing did

2019-02-02 17:05:39.132 [INFO ] [org.openwebnet.OpenGatewayBus$a     ] - MON RECEIVED  <<<<<<<<<<< *15*00*56##

2019-02-02 17:05:39.136 [DEBUG] [bnet.handler.OpenWebNetBridgeHandler] - ==OWN==  ownId=15.56

2019-02-02 17:05:39.140 [DEBUG] [et.handler.OpenWebNetScenarioHandler] - ==OWN:ScenarioHandler== handleMessage() for thing: openwebnet:bus_cen_scenario_control:Screen10:56

2019-02-02 17:05:39.142 [DEBUG] [et.handler.OpenWebNetScenarioHandler] - ==OWN:ScenarioHandler== updateButtonState() for thing: openwebnet:bus_cen_scenario_control:Screen10:56

2019-02-02 17:05:39.478 [INFO ] [org.openwebnet.OpenGatewayBus$a     ] - MON RECEIVED  <<<<<<<<<<< *1*0*13##

2019-02-02 17:05:39.482 [DEBUG] [bnet.handler.OpenWebNetBridgeHandler] - ==OWN==  ownId=1.13

2019-02-02 17:05:39.486 [DEBUG] [et.handler.OpenWebNetLightingHandler] - ==OWN:LightingHandler== updateLightState() for thing: openwebnet:bus_on_off_switch:Screen10:13

==> /var/log/openhab2/events.log <==

<<<<<<<<<<<<< Scenario did run. Expected switch changed state >>>>>>>>>>>>>>>>
2019-02-02 17:05:39.499 [vent.ItemStateChangedEvent] - WestPIRLights_Switch changed from ON to OFF

CEN from physical switch
I don’t have any set up that way :slight_smile:

Items file

//CEN
String WestPIRLights4hrs_CEN "CEN West PIR lights 4hrs"  <light> {channel="openwebnet:bus_cen_scenario_control:Screen10:56:button_0" }

//CEN plus. Addresses start with 2 + number 0-2047
String NightLights_CENplus "CENplus Night light"  <light> {channel="openwebnet:bus_cenplus_scenario_control:Screen10:23:button_1" } 
String WestPIR4hrs_CENplus "CEN plus West PIR 4hrs - phone"  <light> {channel="openwebnet:bus_cenplus_scenario_control:Screen10:24:button_1" }  

Thing file

//CEN
Thing bus_cen_scenario_control 56 "CEN West PIR lights 4hrs" @ "CEN"[ where ="56", buttons ="0" ]
//CEN plus. Addresses start with 2 + 0-2047
Thing bus_cenplus_scenario_control 23 "CENplus Night lights" @ "CEN" [ where ="23", buttons ="1" ]
Thing bus_cenplus_scenario_control 24 "CENplus West PIR 4hrs - phone" @ "CEN" [ where ="24", buttons ="1" ]

Rules file

rule "CEN S10 test"
when
    Item WestPIRLights4hrs_CEN received update //changed from RELEASED to PRESSED
then
  AlexaModeAnnouncement.postUpdate('Testing CEN from panel'+ WestPIRLights4hrs_CEN.state.toString)
  Thread::sleep(10000)
  AlexaModeAnnouncement.postUpdate(WestPIRLights4hrs_CEN.state.toString)
end

rule "CEN plus switch test"
when
    Item NightLights_CENplus received update //from RELEASED to PRESSED
then
  AlexaModeAnnouncement.postUpdate('Testing CEN plus from switch' + NightLights_CENplus.state.toString)
  Thread::sleep(10000)
  AlexaModeAnnouncement.postUpdate(NightLights_CENplus.state.toString)
end

rule "CEN plus phone test"
when
    Item WestPIR4hrs_CENplus received update //from RELEASED to PRESSED
then
  AlexaModeAnnouncement.postUpdate('Testing CEN plus from phone ' + WestPIR4hrs_CENplus.state.toString)
  Thread::sleep(10000)
  AlexaModeAnnouncement.postUpdate(WestPIR4hrs_CENplus.state.toString)
end

image