Hi Massimo,
yesterday during the tests with Stefan noticed some problems with CEN / CEN +, I hope I can explain myself well.
OH 2.4.0
beta 9-2
1 Problem
.things
Thing bus_cenplus_scenario_control Cenplus_test "Scenario+ Test" @ "Test" [ where="210", buttons="9,10" ]
Thing bus_cen_scenario_control Cen_test "Scenario Test" @ "Test" [ where="26", buttons="9,10" ]
.items
String iLR_cenplus_test9 "CEN+ B9" <network> { channel="openwebnet:bus_cenplus_scenario_control:mybridge:Cenplus_test:button_9" }
String iLR_cenplus_test10 "CEN+ B10" <network> { channel="openwebnet:bus_cenplus_scenario_control:mybridge:Cenplus_test:button_10"}
String iLR_cen_test9 "CEN B9" <network> { channel="openwebnet:bus_cen_scenario_control:mybridge:Cen_test:button_9" }
String iLR_cen_test10 "CEN B10" <network> { channel="openwebnet:bus_cen_scenario_control:mybridge:Cen_test:button_10"}
.sitemaps
Switch item=iLR_cenplus_test9 label="CEN+ B9" mappings=[PRESSED="Scenario (PRESSED)",PRESSED_EXT="Scenario (PRESSED_EXT)"]
Switch item=iLR_cenplus_test10 label="CEN+ B10" mappings=[PRESSED="Scenario (PRESSED)",PRESSED_EXT="Scenario (PRESSED_EXT)"]
Switch item=iLR_cen_test9 label="CEN B9" mappings=[PRESSED="Scenario (PRESSED)",PRESSED_EXT="Scenario (PRESSED_EXT)"]
Switch item=iLR_cen_test10 label="CEN B10" mappings=[PRESSED="Scenario (PRESSED)",PRESSED_EXT="Scenario (PRESSED_EXT)"]
.rules
rule "sktest9"
when
Item iLR_cenplus_test9 changed
then
switch(iLR_cenplus_test9.state ) {
case "PRESSED": {
logInfo("CEN+ B9", "success!" )
Luce_sala.sendCommand(ON)
}
case "PRESSED_EXT": {
logInfo("CEN+ B9 EXT", "success!" )
Luce_sala.sendCommand(ON)
}
}
end
rule "sktest10"
when
Item iLR_cenplus_test10 changed
then
switch(iLR_cenplus_test10.state ) {
case "PRESSED": {
logInfo("CEN+ B10 OFF", "success!" )
Luce_sala.sendCommand(OFF)
}
case "PRESSED_EXT": {
logInfo("CEN+ B10 OFF EXT", "success!" )
Luce_sala.sendCommand(OFF)
}
}
end
rule "sktest9a"
when
Item iLR_cen_test9 changed
then
switch(iLR_cen_test9.state ) {
case "PRESSED": {
logInfo("CEN B9 ON", "success!" )
Luce_sala.sendCommand(ON)
}
case "PRESSED_EXT": {
logInfo("CEN B9 ON EXT", "success!" )
Luce_sala.sendCommand(ON)
}
}
end
rule "sktest10A"
when
Item iLR_cen_test10 changed
then
switch(iLR_cen_test10.state ) {
case "PRESSED": {
logInfo("CEN B10 OFF", "success!" )
Luce_sala.sendCommand(OFF)
}
case "PRESSED_EXT": {
logInfo("CEN B10 OFF EXT", "success!" )
Luce_sala.sendCommand(OFF)
}
}
end
As you can see from the animation when you press (just one click) on PRESSED the binding changes the status:
from RELEADES To PRESSED and then automatically from PRESSED to RELEADES, while with PRESSED_EXT this does not happen.
From physical switches the status changes work correctly, from OH no
The rules start correctly from both OH and physical switches
- What is the right behavior PRESSED or PRESSED_EXT?
- Why do not you see the value in sitemaps CEN+ B10?