[BTicino/OpenWebNet] New openHAB2 binding ready for testing

@m4rk

Thing  bus_cenplus_scenario_control    Cenplus_test            "Scenario Test 23"                 @ "Test"            [ where="23", buttons="1,2" ]
 Thing 	bus_cenplus_scenario_control    Cenplus_test1           "Scenario+ Test 210"			    @ "Test"			[ where="210", buttons="24,25" ]
String iLR_cen_test11       "CEN+ 23-1"     <network> { channel="openwebnet:bus_cenplus_scenario_control:mybridge:Cenplus_test:button_1" }
String iLR_cen_test12       "CEN+ 210-24"     <network> { channel="openwebnet:bus_cenplus_scenario_control:mybridge:Cenplus_test1:button_24"}

I ran tests with this configuration and it works correctly.
There is a problem with the cache of OH 2.4, it changes the names of the things and items and tries again

2019-05-01 09:37:23.107 [INFO ] [org.openwebnet.OpenGatewayBus$a     ] - MON RECEIVED  <<<<<<<<<<< *25*21#24*210##
2019-05-01 09:37:23.112 [DEBUG] [bnet.handler.OpenWebNetBridgeHandler] - ==OWN==  ownId=25.210
2019-05-01 09:37:23.116 [DEBUG] [et.handler.OpenWebNetScenarioHandler] - ==OWN:ScenarioHandler== handleMessage() for thing: openwebnet:bus_cenplus_scenario_control:mybridge:Cenplus_test1
2019-05-01 09:37:23.119 [DEBUG] [et.handler.OpenWebNetScenarioHandler] - ==OWN:ScenarioHandler== updateButtonState() for thing: openwebnet:bus_cenplus_scenario_control:mybridge:Cenplus_test1
==> /var/log/openhab2/events.log <==
2019-05-01 09:37:23.230 [vent.ItemStateChangedEvent] - iLR_cen_test12 changed from RELEASED_EXT to PRESSED
==> /var/log/openhab2/openhab.log <==
2019-05-01 09:37:23.422 [DEBUG] [et.handler.OpenWebNetScenarioHandler] - ==OWN:ScenarioHandler== # 210 updating state to 'RELEASED'...
==> /var/log/openhab2/events.log <==
2019-05-01 09:37:23.485 [vent.ItemStateChangedEvent] - iLR_cen_test12 changed from PRESSED to RELEASED
==> /var/log/openhab2/openhab.log <==
2019-05-01 09:37:25.558 [INFO ] [org.openwebnet.OpenGatewayBus$a     ] - MON RECEIVED  <<<<<<<<<<< *25*21#1*23##
2019-05-01 09:37:25.563 [DEBUG] [bnet.handler.OpenWebNetBridgeHandler] - ==OWN==  ownId=25.23
2019-05-01 09:37:25.567 [DEBUG] [et.handler.OpenWebNetScenarioHandler] - ==OWN:ScenarioHandler== handleMessage() for thing: openwebnet:bus_cenplus_scenario_control:mybridge:Cenplus_test
2019-05-01 09:37:25.570 [DEBUG] [et.handler.OpenWebNetScenarioHandler] - ==OWN:ScenarioHandler== updateButtonState() for thing: openwebnet:bus_cenplus_scenario_control:mybridge:Cenplus_test
==> /var/log/openhab2/events.log <==
2019-05-01 09:37:25.671 [vent.ItemStateChangedEvent] - iLR_cen_test11 changed from RELEASED_EXT to PRESSED
==> /var/log/openhab2/openhab.log <==
2019-05-01 09:37:25.873 [DEBUG] [et.handler.OpenWebNetScenarioHandler] - ==OWN:ScenarioHandler== # 23 updating state to 'RELEASED'...
==> /var/log/openhab2/events.log <==
2019-05-01 09:37:25.933 [vent.ItemStateChangedEvent] - iLR_cen_test11 changed from PRESSED to RELEASED
==> /var/log/openhab2/openhab.log <==
2019-05-01 09:37:30.585 [INFO ] [org.openwebnet.OpenGatewayBus$a     ] - MON RECEIVED  <<<<<<<<<<< *#13**22*09*37*30*000*03*01*05*2019##
2019-05-01 09:37:30.606 [DEBUG] [org.openwebnet.OpenGatewayBus       ] - ##gw-openwebnet-BUS## handleManagementDimension not processed
2019-05-01 09:37:30.611 [DEBUG] [bnet.handler.OpenWebNetBridgeHandler] - ==OWN==  GatewayManagement WHAT = null

Thanks Michele,

I cleared the cache , changed the the thing name to test and re-installed transport serial and UPNP

One of those did something :slight_smile:

2019-05-01 09:50:24.300 [DEBUG] [bnet.handler.OpenWebNetBridgeHandler] - ==OWN==  ownId=25.210

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

2019-05-01 09:50:24.308 [hingStatusInfoChangedEvent] - 'openwebnet:bus_cenplus_scenario_control:Screen10:test' changed from UNKNOWN: waiting state update... to ONLINE

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

2019-05-01 09:50:24.309 [DEBUG] [et.handler.OpenWebNetScenarioHandler] - ==OWN:ScenarioHandler== handleMessage() for thing: openwebnet:bus_cenplus_scenario_control:Screen10:test

2019-05-01 09:50:24.311 [DEBUG] [et.handler.OpenWebNetScenarioHandler] - ==OWN:ScenarioHandler== updateButtonState() for thing: openwebnet:bus_cenplus_scenario_control:Screen10:test

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

2019-05-01 09:50:24.330 [vent.ItemStateChangedEvent] - WestPIRLights4hrs_CENplus changed from NULL to PRESSED

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

2019-05-01 09:50:24.624 [DEBUG] [et.handler.OpenWebNetScenarioHandler] - ==OWN:ScenarioHandler== # 210 updating state to 'RELEASED'...

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

2019-05-01 09:50:24.633 [vent.ItemStateChangedEvent] - WestPIRLights4hrs_CENplus changed from PRESSED to RELEASED

Great
I think it’s the name

:slight_smile:
I changed the name back to 210… it still works :slight_smile:

2019-05-01 10:01:05.947 [INFO ] [org.openwebnet.OpenGatewayBus$a     ] - MON RECEIVED  <<<<<<<<<<< *25*21#24*210##

2019-05-01 10:01:05.951 [DEBUG] [bnet.handler.OpenWebNetBridgeHandler] - ==OWN==  ownId=25.210

2019-05-01 10:01:05.956 [DEBUG] [et.handler.OpenWebNetScenarioHandler] - ==OWN:ScenarioHandler== handleMessage() for thing: openwebnet:bus_cenplus_scenario_control:Screen10:210

2019-05-01 10:01:05.958 [DEBUG] [et.handler.OpenWebNetScenarioHandler] - ==OWN:ScenarioHandler== updateButtonState() for thing: openwebnet:bus_cenplus_scenario_control:Screen10:210

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

2019-05-01 10:01:05.958 [hingStatusInfoChangedEvent] - 'openwebnet:bus_cenplus_scenario_control:Screen10:210' changed from UNKNOWN: waiting state update... to ONLINE

2019-05-01 10:01:05.968 [vent.ItemStateChangedEvent] - WestPIRLights4hrs_CENplus changed from RELEASED to PRESSED

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

2019-05-01 10:01:06.260 [DEBUG] [et.handler.OpenWebNetScenarioHandler] - ==OWN:ScenarioHandler== # 210 updating state to 'RELEASED'...

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

2019-05-01 10:01:06.275 [vent.ItemStateChangedEvent] - WestPIRLights4hrs_CENplus changed from PRESSED to RELEASED

The problem is not the numeric name, but when you keep changing the parameters of the same things and / or items, something gets stuck in the cache

There is a OH Comunity Survery going on that will help maintainers understand priorities about the future and evolution of OH.
I suggest to participate in the Survery!
Massi

1 Like

Hi Michele, could you give me some indication on how to configure the scenario control unit. I can’t figure out how to use OH with F420.
Thank you

Hello,
what would you like to manage?
Currently the binding does not support any type of scenario management.
Eventually open a new topic and explain better what you would like to do, we can evaluate and give you support

Hi @massi,

have you seen that a patch for rollershutter management through Google Assistant has been published?

How this affects the binding behaviour?
Thanks

Yes, it has ben (finally) added to the Google Assistant adaptor.
However there is bug at the moment: open/close commands from Google are not correctly mapped to OH UP/DOWN commands.

Regarding the openwebnet binding: it’s already compatible since items created automatically with PaperUI (Simple Mode item linking: Configuration > System > Item Linking > Simple mode > SAVE ) will get automatically the correct tag from the binding: in particular items associated with shutter channels will have the Blinds tag.

If you configured items with text file (.item) you can add the tag following the example in the README.

After the Blinds tag is set, just say “Sync my devices” and Google Assistant will find the Rollershuter.

Thank you massi,
I have done some tests after implementing the new tag:

  1. I confirm that open/close commands work in the opposite way.
  2. % commands are different: e.g. “roller shutter at 50%” is not recognized anymore, you have to say “set rollershutter at 50%”
  3. From the google home app you cannot control the rollershutter, only voice commands (I don’t understand if this is a google limitation or a openhab lack of integration)

I also noticed this.
Maybe you can explain the problem in the main Google assistant thread to see feedback from others.

It has been experienced also by other users in that thread, I added my own to understand if it is like that for everyone.

Is there a way to send command to the groups created in the bticino gateway? (e.g. turning off all the lights)

Is there a way to use a bticino button (not actuator) to do something in Openhab? (e.g. sending an email)

This has been discussed in the past but maybe in the last version of the binding it became possible

Hello,
currently not possible.
We are evaluating a new bus called bus_command, but I don’t know the timing, we are stuck with implementations for changes to the new build system.
Momentarily, if you have a scenario module type MH202, you can create a rules in the MH and start it using the CEN or CEN + command and configure the CEN or CEN + command in OH

If you configure it as CEN or CEN + you can use a rules to send notifications or emails

Interesting thank you!

I will give it a try, just for fun because I have an unused button :smile:

I noticed that in my inbox is appearing a new discovered device (switch) with where 51:

the odd thing is that I already have that thing/item configured:

any idea why?

I assume it’s connected to Issue #30
It has been resolved, you have to wait for the next version here.

maybe, but I don’t recall configuring that thing manually, I think it was auto-discovered.
is there a way to check if a thing was added manually?
I only use paper ui for bticino things, no files

There is no way that I know of
Try to delete it and repeat autodiscovery