@massi: before publish your new binding,i would to tell you that i have scenery configured in my home through 4 physical buttons (and other 12 used only virtual on my lcd bticino) but your binding is not recognizing my a9 pl5 address…any suggest?
i suggest you use dsl? i use jython, but i tried this in dsl:
rule "send cen"
when
Item ivi received command
then
logInfo("send cen", "proxy item received command")
val cenActions = getActions("openwebnet","openwebnet:bus_cen_scenario_control:bticino:Cen_MorgenFeiertag")
switch (ivi.state){
case ON:{
cenActions.virtualPress("START_PRESSURE", 1) // send "START_PRESSURE" to button 1
}
case OFF:{
cenActions.virtualPress("START_PRESSURE", 2) // send "START_PRESSURE" to button 2
}
}
end
Can you explain it again?
What you mean is not recognized? You mean during discovery? Or you mean that even if you configure it in .things file it does not trigger any button event ?
because of a limitation of openwebnet, CEN/CEN+ discovery works only if you press a scenario button when discovery is activated from webui: this way you will discover the thing. After you have added the thing, you have to press again the buttons so that they are added as channels. This also will make the thing become online (green) in webui.
Actually auto discovery is less useful in the case of CEN/CEN+: I suggest you add them via .things file.
In any case, after adding them via webui or things file, they should appear as green after a scenario physical button is pressed.
If this is not working , set log level to DEBUG and provide me the logs when you press the physical button
I ha e to set debug level because now i’m very lost. I’ve tried to do what you suggest but doesn’t work and also i’ve found something strange.
Today in inbox was shown a new item “automation where3” and it’s a scenario that i’ve launched manually from homebridge (i think).
Now comes the strange thing: where 3 is also a thermostat! So howncan be possible that i have two where 3?!
So i pressed the button that moves all rollershutters down/up and has been discovered as where 0.
Then i tried to press scenery 1,2,3,4 and put webui in scan mode,bit nothing found. Tried also to unlock and put scenery buttons in “programming/learning” but nothing discovered. Same thing donenf rom lcd,but nothing discovered.
Can you tell me how to set in debug to provide you more useful info? I would like to help you in any way because you helped thousand people with your hard work!
Ps. Where 0 becomes green when pressed and then come back yellow/unknown…
I have added CEN+.
I also prepared the README with some explanation and examples.
If everything works I will publish it to include CEN/CEN+ in the official binding.
CEN/CEN+ Scenario Control devices will be discovered by activation only. After confirming a discovered CEN/CEN+ device from Inbox, activate again its scenario buttons to add button channels automatically
CEN/CEN+ channels
CEN/CEN+ are TRIGGER channels: they handle events and do not have a state.
A powerful feature is to be able to assign CEN or CEN+ commands to your physical wall switches and use the events they generate to trigger rules in openHAB: this way openHAB becomes a very powerful scenario manager activated by physical BTicino switches.
See next for an example on how to define rules that trigger on CEN/CEN+ push buttons events.
It’s also possible to send virtual pressure events on the BUS, for example to enable the activation of MH202 scenarios from openHAB.
See next for an example on how to use the virtualPress action connected to a pushbutton on a sitemap.
channels are named button#X where X is the button number on the Scenario Control device
in the .thing file configuration you can specify the buttons parameter to define a comma-separated list of buttons numbers [0-31] configured for the scenario device, example: buttons=1,2,4
possible events are:
for CEN:
START_PRESSURE - sent when you start pressing the button
SHORT_PRESSURE - sent if you pressed the button shorter than 0,5sec (sent at the moment when you release it)
EXTENDED_PRESSURE - sent if you keep the button pressed longer than 0,5sec; will be sent again every 0,5sec as long as you hold pressed (good for dimming rules)
RELEASE_EXTENDED_PRESSURE - sent once when you finally release the button after having it pressed longer than 0,5sec
for CEN+:
SHORT_PRESSURE - sent if you pressed the button shorter than 0,5sec (sent at the moment when you release it)
START_EXTENDED_PRESSURE - sent once as soon as you keep the button pressed longer than 0,5sec
EXTENDED_PRESSURE - sent after START_EXTENDED_PRESSURE if you keep the button pressed longer; will be sent again every 0,5sec as long as you hold pressed (good for dimming rules)
RELEASE_EXTENDED_PRESSURE - sent once when you finally release the button after having it pressed longer than 0,5sec
rule "CEN+ virtual pressure from OH button"
/* This rule triggers when the proxy item iCENPlusProxyItem is activated, for example from a button on WebUI/sitemap.
When activated it sends a "virtual short pressure" of where=212, button=5 on the BUS
*/
when
Item iCENPlusProxyItem received command
then
val actions = getActions("openwebnet","openwebnet:bus_cenplus_scenario_control:mybridge:212")
actions.virtualPress("SHORT_PRESSURE", 5)
end
rule "CEN dimmer increase"
// A "start pressure" event on CEN where=51, button=4 will increase dimmer%
when
Channel "openwebnet:bus_cen_scenario_control:mybridge:51:button#4" triggered START_PRESSURE
then
sendCommand(iLR_dimmer, INCREASE)
end
rule "CEN dimmer decrease"
// A "release extended pressure" event on CEN where=51, button=4 will decrease dimmer%
when
Channel "openwebnet:bus_cen_scenario_control:mybridge:51:button#4" triggered RELEASE_EXTENDED_PRESSURE
then
sendCommand(iLR_dimmer, DECREASE)
end
Script execution of rule with UID 'bticinoszenarien-1' failed: Instance is not an OpenWebNetCENActions class. in bticinoszenarien
rules:
rule "Regel Rolläden EG öffnen"
when
Item RollEGoeffnen received command
then
val actions = getActions("openwebnet","openwebnet:bus_cen_scenario_control:mybridge:99")
actions.virtualPress("SHORT_PRESSURE", 8)
end
i still have problems, binding doesn’t detect automatically my scenery wall buttons, and if i add them via gui always stay in uknown state.
i’ve seen when i reboot my LCD (used as a bridge to all bticino envirnment) the thing becomes green but still won’t recogniz when i pres wall scenery buttons.
i don’t understand why because homebridge recognize and works with sceneries flawlessly
Set log level to DEBUG (search main BTicino thread to see how) and then press a wall scenery button. Then send me the logs, and specify how the wall button you pressed is configured in Bticino system. Also send me your thing configuration, in text form. Use code fences when pasting config or logs.
Follow each step and be precise as much as possibile otherwise I cannot help if not enough info or confused or partial…
here you both log. as you can see, on last lines of openhab.log there are rollershutters received command down. i’ve launched this from a scenario detected by homebridge (because i’m not at home). i’ve launched also an empty scenario from hombridge to check if something passes on the bus but nothing.
if you need me to press physical buttons let me know, but i think there’s no need because i can launch scenaries from homebridge.
I do not know how homebridge is integrated with your touchscreen gateway and scenarios, but surely on the log you sent there is no single event message with who=15/25 which are the CEN/CEN+ scenario messages.
When at home try also to press a physical button to trigger a scenario… and let’s see if there is some message in the log. It’s possible that some gateways can receive scenario activation commands, but they do not propagate it on the BUS to other conneted clients like our binding. I’ll have a look at documentation. In this is the case you will be able to start scenarios but not listen to them
There are no traces of CEN/CEN+ messages also in the new log.
From the openwebnet client I can see *0*2*95## and *0*4*95##: what these two tell you?
Have you these configured somewhere in the panel/Bticino configuration? They are related to scenario (but not CEN/CEN+ scenarios) with address where=95
Yes this 0295## and 0495## are called from two scenarios buttons on the wall.
From 1 to 4 are physical and from 5 to 16 virtually configured from my lcd…
Some minutes early of that you can see 01*95## that opened all my rollershutters.
Tomorrow i will try to set debug as suggested.