Channels button1..button4 are of type scenarioButton and can have the following states:
Channel Type ID
Item Type
Description
Read/Write
scenarioButton
String
Pressure of a CEN scenario button: PRESSED, RELEASED, PRESSED_EXT, RELEASED_EXT
R
You can add a BUS Scenario Control-4 (4 buttons) thing from PaperUI Inbox.
Automatic discovery for CEN is implemented using discovery by activation, a new way to discover things: when item search is still active (spinning arrow in Inbox), activate the physical device (for example push a Scenario button) to have it discovered by the binding.
Alternatively you can configure the thing/item manually:
Hi Massi, great to see you are progressing with CEN
Does this work with normal wall switches? I have an F420 scenario module which I never use because I can do more using openhab.
Hi Sandro,
correct CEN does not have a state, but every item in OH2 has to have a state, right?
So the binding maps CEN events (about pressure of a button) in these states: PRESSED , RELEASED , PRESSED_EXT , RELEASED_EXT.
do you have suggestions for a different design?
bye
m
Did you follow the “disover by activation” method?
if yes, can you set log level to DEBUG (see README how), repeat the discovery process activating some of your CEN swtiches, and send me your log via PM ?
Julian, if you set the logs to DEBUG in OpenHAB (see README how!), and then start a new item discovery from inbox and then during discovery you switch ON one of your CEN scenario buttons, for sure you will have something in the openhab.log file. Check this again.
M
N.B. the expire command is used to simulate the release
File .rules
/************************************
*** CEN 10-02 PRESSED_EX ***
*************************************/
rule "CEN 10-02 PRESSED"
when
Item iLR_scenario received update "PRESSED_EXT"
then
sendCommand(Luce_sala, ON)
end
/************************************
*** CEN 10-02 RELEASED_EXT ***
*************************************/
rule "CEN 10-02"
when
Item iLR_scenario received update "RELEASED_EXT"
then
sendCommand(Luce_sala, OFF)
end
/************************************
*** Simula CEN con Switch ON ***
*************************************/
rule "Simula CEN con Switch ON"
when
Item iLR_sim_scenario received command ON
then
sendCommand(iLR_scenario, "PRESSED_EXT")
end
/************************************
*** Simula CEN con Switch OFF ***
*************************************/
rule "Simula CEN con Switch OFF"
when
Item iLR_sim_scenario received command OFF
then
sendCommand(iLR_scenario, "RELEASED_EXT")
end
What does not work is the recognition both automatic and by pressing the button
In any case, excellent work !!!
I wondered if there is a more streamlined way to simulate the switch without creating the 2 rules
“Simula CEN con Switch ON” and “Simula CEN con Switch OFF”.
Addition of parameters for (ON =“PRESSED_EXT”, OFF =“RELEASED_EXT”)
Or does it already exist?
@massi
Other tests with CEN detection.
In automatic it does not work.
By pressing the button it works but:
Start the survey, wait 15 seconds, and press … so it works.
If you press before 15 seconds it will not detect.
Massi
I just tested the link, with the CEN button.
When you start discovering new items and press the CEN button, this item appears but just with the “WHERE”, it misses the button (1-31)
With CEN on a “WHERE” address there can be 31 possible buttons with 4 functions. Let 31 * 4 = 124 functions.
Regards,
Arnaud
I am not sure to understand your comment…
Of course there are no buttons in the Inbox: did you try to confirm the new item? then you will see the buttons in the control tab (if item linking is set to auto).
For now only a 4-buttons CEN device is supported, as I wrote.
In theory there are 32 possible buttons (0-31), but in practice there are 4- and 6-buttons devices, correct? or do you have devices with more buttons?
Also, you should read better my explanation of the channels: there are 4 states possible for each button, so with CEN on each “WHERE” address there can be 4 or 6 buttons channels, each one with 4 possible states.