yes, its’ every 0.5s and the binding already should send a PRESSED_EXT update everytime the physical button sends it, so one could write a rule like in example above from @gozilla01:
rule "CEN 10-02 PRESSED_EXT"
when
Item iLR_scenario received update "PRESSED_EXT"
then
sendCommand(Luce_sala, ON)
end
@massi
Test with beta9 with problems, channels are not created.
I tried the beta9-pre2 instead it works by modifying bus_scenario_control in bus_scenario_control4
Am I wrong?
2018-12-15 16:05:42.578 [.ItemChannelLinkAddedEvent] - Link 'CEN_TX_Tap_Giorno-openwebnet:bus_scenario_control:mybridge:cen_gen_giorno:button2' has been added.
Edit:
Both automatic detection of CEN and pressure sensing did not work.
Hi Michele,
After a CEN/CEN+ device is added from Inbox, scenarioButton channels corresponding to physical buttons are added automatically after they are first activated from the physical device (refresh web page if needed).
So you will need to follow these steps:
start Scan > wait 15 sec > press one of the CEN buttons (eg button2) > it should appear a new CEN thing in Inbox > confirm it to add in the list of things > press again the same CEN button > refresh Control web page > only now after the channel is added it should appear the CEN thing with channel=button2
Can you test this and let me know?
I am already working to simplify this and have channels added during the scan-discovery phase.
The WHERE is wrong here: it must be always prefixed by a 2, so if the address of CEN Control device is 2 then the WHERE to be used is 22. I will add a note in the thing configuration.
You should change the WHERE to 22 and then pressure sensing should work.
The note write it as big as a house, many will do the same my mistake, you can not do the “2” automatically? Do you conflict with the where for CEN?
I modified the .things file by putting the “2” in front of it.
But you have to press the physical button if it does not appear in the paperUI
Can not you do it automatically?
I performed the test 6 times.
The first 3 nothing, the 4 found me only one CEN +, 5 and 6 the second does not recognize it.
It’s important to do that during the Scan process:
start Scan from Inbox , wait 15 sec
press one of the CEN/CEN+ buttons (eg button2)
it should appear a new CEN thing in Inbox
confirm the new thing to add in the list of things
IMPORTANT at this moment no item is shown yet in PaperUI>Control page
press again the same CEN button (its’ not important that Scan is still running now)
refresh PaperUI>Control page
You should have now a new Thing in PaperUI with 1 channel: button2.
It works for me (in my simulator) and it works for others here (Julian_Divett, see above), so the CEN/CEN+ discovery by activation should work for you as well.
If it does not work all you have to do is set debug level to DEBUG (see README how), repeat the discovery process, send me the openhab.log file via PM.
Hello Massi,
Thanks for a very good job.
The CEN and CEN+ button works and the rules works.
Example:
rule “Volet_Knx_1_Down”
when
Item VoletKnx1D received update “PRESSED”
then
sendCommand(Volet_Knx1, DOWN)
end
rule “Volet_Knx_1_Up”
when
Item VoletKnx1U received update “PRESSED”
then
sendCommand(Volet_Knx1, UP)
end
rule “volet_Knx_1_Stop”
when
Item VoletKnx1D received update “PRESSED_EXT”
or
Item VoletKnx1U received update “PRESSED_EXT”
then
sendCommand(Volet_Knx1, STOP)
end
rule “Volet_Gen_Down”
when
Item VoletKnx2D received update “PRESSED”
then
sendCommand(gRollladen, DOWN)
end
rule “Volet_Gen_Up”
when
Item VoletKnx2U received update “PRESSED”
then
sendCommand(gRollladen, UP)
end
rule “volet_Gen_Stop”
when
Item VoletKnx2U received update “PRESSED_EXT”
or
Item VoletKnx2D received update “PRESSED_EXT”
then
sendCommand(gRollladen, STOP)
end
rule "Da CEN 10-02"
when
Item iLR_scenario changed
then
switch(iLR_scenario.state ) {
case "PRESSED": {
}
case "RELEASE": {
}
case "PRESSED_EXT": {
sendCommand(Luce_sala, ON)
}
case "RELEASED_EXT": {
sendCommand(Luce_sala, OFF)
}
}
end
The new version beta9-1 has been released, it should close all the requirements and issues with CEN/CEN+.
Note that there are some changes from the previous beta9 version in the support for CEN/CEN+:
CEN/CEN+ things are now separated:
bus_cen_scenario_control
bus_cenplus_scenario_control
channels are now named button_X where X is the button number on the Scenario Control device
for discovered things, button channels appear in PaperUI after the first time the corresponding button is activated from the physical device. Refresh the PaperUI/Control page if needed
when creating CEN/CEN+ things using manual/file configuration, use the new buttons config parameter to define a comma-separated list of buttons numbers [0-31] configured for the scenario device, example: buttons=1,2,4
sending commands: PRESSED, RELEASED, etc. will simulate a virtual short/long pressure of the corresponding CEN/CEN+ button, enabling the activation of MH202 scenarios on the BUS from OpenHab
Channel Type ID (channel ID)
Item Type
Description
Read/Write
scenarioButton (button_X)
String
Events or virtual pressure for CEN/CEN+ scenario buttons: PRESSED, RELEASED, PRESSED_EXT, RELEASED_EXT
// long pressure on CEN+ button will switch off dimmer
rule "CEN+ dimmer off"
when
Item iLR_scenario_btn1 received update "RELEASED_EXT"
then
sendCommand(iLR_dimmer, OFF)
end
sorry i can´t get this work, i see the cen/cen+ functionality now first time but if i think right i´m afraid this may be not what i was waiting for.
what i don´t have is a 4-button cenario-control device
i use an mh200n and i wrote a lot of cenarios there.
actually i start this scenarios either with normal physical switches that are coded to send cen/cen+ commands or i even can start them on my mobile with the domotica app.
a cen command consists an “ambient” (0-10), a “pointlight” (0-15) and a button nr (0-99)
a cen+ command consists an “cen-plu” (0-2047), and a button nr (0-31)
for example to switch several lights on i start cen a=2, pl=1, btn=5 and i have to integrate installation niveau (#4#01). best would be a kind of “pushbutton”
clicking on the buttons as in the animation are sent on the BUS of the virtual command CEN / CEN + equivalent to short pressure (PRESSED) or long press / release (PRESSED_EXT / RELEASED_EXT) of the scenario buttons.
@gozilla01 is correct, the binding beta9-1 now supports sending virtual pressure events on the BUS, replicating what happens when you press CEN/+ physical buttons.
You can do that by sending commands to button channels (for example using OH2 rules), or if you want to use sitemaps and oh2 apps you can define buttons like in the example above.
Activating CEN from PaperUI is more complicated because PaperUI does not support simple pushbuttons (at least not in a simple way).
The only thing you have to pay attention from example above you should change the Thing definition to CEN (and not CEN+).
Try to define it , if it does not work copy here your thing/item/sitemap conf and we will give a look.
switching light off that works with both, domotica and openhab. but switching on does only work in domotica, so i suppose it might be the missing “0” at openhab at the button number?
problem with disappearing things:
here is my things (i added the installation-niveau “#4#01” there):
as you see the name “AAA_CENNNNN” thats because very often if i change something in my things-file, the entry disappears in paperui/things. i have to give a new name then thing is back again. its enough to add a single letter and the thing is back.
CORRECT : it’s a bug. Feel free to file a new issue: it will be corrected in the next release/patch.
Do you have another thing (light?) with the same WHERE address 21#4#01 as the CEN?
Does the log show some error when it happens that the CEN thing disappears ?