[BTicino/OpenWebNet] New openHAB2 binding ready for testing

Hello,
I’ve been reading this forum for a few weeks and been using OH3 with this binding since it has been released.
I’ve connected OH to Alexa and tagged the equipment items in order to be able to control lighting and shutters using voice commands.
My gateway is an MH200N updated to the latest firmware.

Sometimes (looks like it happens random) it seems that the command is not being sent to the openwebnet bus. When that happens, I find this in the openhab log:

2021-01-17 12:28:57.203 [WARN ] [nwebnet4j.communication.BUSConnector] - ##BUS-conn## Exception: Received null frame while reading responses to command

2021-01-17 12:28:57.210 [WARN ] [nwebnet4j.communication.BUSConnector] - ##BUS-conn## trying NEW CMD connection...

2021-01-17 12:28:57.255 [WARN ] [et.handler.OpenWebNetLightingHandler] - Exception while processing command OFF: CMD is not connected

I already checked Github for similar issues, but I couldn’t find anything similar.
I’ve now enabled DEBUG level logging for this binding from within the Console and will report any further message.

log:set DEBUG org.openhab.binding.openwebnet

Is there anything else I can do in the meanwhile to understand if this is a bug or some kind of misconfiguration on my side?
Thank you

I just published a final version of the old beta/testing OpenWebNet binding with no expiration limit: version 2.5.0.TESTING.

Installation and Upgrade

This binding version is compatible with openHAB 2.5.x.
To install/upgrade to the new version of the binding, CAREFULLY follow the instructions in the README

JAR File: https://github.com/mvalla/openhab-addons/releases/download/own-2.5.0.TESTING/org.openhab.binding.openwebnet-2.5.0.TESTING.jar

NOTE
As already announced development is now dedicated to the official OH3 binding, therefore this TESTING version will receive no support in the future.

4 Likes

Thanks Massi for the final release. I lot of people will be happy with that.

For OH3 development could you please consider enabling the binding to respond to mode type string commands for shutter control. These are string commands like STOP, UP, DOWN etc. The STOP command doesn’t work at the moment. I gave more details of the problem here:

I do not think the problem is with the binding, but with your item configuration/metadata or Alexa integration. Why Alexa does not find your item if defined as RollerShutter type? Did you ask in the proper forum threads related to Alexa integration?
The type of thing defined in the binding for rollershuller is correct: RollerShutter, String would be wrong (you mention other binding support String for rollershullers: can you show which one?).

Hi @mrteo90, welcome to openHAB community!
You should post here the log with DEBUG level when it happens the command is not sent. Also specify which version of OH/binding you are using (3.0.0 stable? snapshot?)

Thank you very much for your effort! This allows me to maintain active 4 installations at my friends’ homes (and mine too). I freeze these 5 to 2.5.11 and I go on testing version 3 on a separate PI. BTW, I’ trying to run the whole OPENHAB/Openwebnet under Opensuse 15.2 64bits on PI, to integrate it with my other applications. Do someone already know of running experiences?

Thank you very much, massi!
I’m using your binding heavily every day…
cheers, Christian

Grande Massi!
Working perfectly!

Thank you!!

A big thank-you Massi,
As soon as the official binding includes thermoregulation and scenes, I will switch to the new version 3.0.
Regards
Arnaud

hello massimo,
i deinstalled the testing/beta binding an now i run the official openwebnet binding 2.5.11.
i see the same warnings ##BUS-conn## Exception: Received null frame ... in my log.
i set to DEBUG and have two parts of log that i can show you (no idea how i can reproduce this message):

2021-01-19 19:50:03.944 [DEBUG] [e.automation.internal.RuleEngineImpl] - The rule '4eb83149-fb05-434a-909a-a424b0e89a0d' is executed.

2021-01-19 19:50:03.948 [DEBUG] [e.automation.internal.RuleEngineImpl] - The trigger 'Item-iHof_Li-received-command_d82da430598e11ebabe3dca632124bd5_d82df24f598e11ebbcf8dca632124bd5' of rule '190ff74c-8160-460c-bf70-55be7a2d32c3' is triggered.

2021-01-19 19:50:03.974 [DEBUG] [ebnet.handler.OpenWebNetThingHandler] - handleCommand() (command=ON - channel=openwebnet:bus_on_off_switch:bticino:Hof_Li:switch)

2021-01-19 19:50:03.977 [DEBUG] [et.handler.OpenWebNetLightingHandler] - handleSwitchCommand() (command=ON - channel=openwebnet:bus_on_off_switch:bticino:Hof_Li:switch)

2021-01-19 19:50:03.992 [WARN ] [nwebnet4j.communication.BUSConnector] - ##BUS-conn## Exception: Received null frame while reading responses to command

2021-01-19 19:50:03.998 [WARN ] [nwebnet4j.communication.BUSConnector] - ##BUS-conn## trying NEW CMD connection...

2021-01-19 19:50:04.090 [INFO ] [jsr223.jython.bt_manager.py         ] - bt_manager data: *1*1000#1*54#4#01##

2021-01-19 19:50:04.134 [INFO ] [jsr223.jython.bt_manager.py         ] - bt_manager data: *1*1*54#4#01##

2021-01-19 19:50:04.137 [DEBUG] [bnet.handler.OpenWebNetBridgeHandler] - ownIdFromMessage(<*1*1*54#4#01##>) --> 1.54h4h01

2021-01-19 19:50:04.139 [DEBUG] [et.handler.OpenWebNetLightingHandler] - handleMessage() for thing: openwebnet:bus_on_off_switch:bticino:Hof_Li

2021-01-19 19:50:04.141 [DEBUG] [et.handler.OpenWebNetLightingHandler] -   1.54h4h01 ONOFF CHANGED to 1

and

2021-01-19 19:53:38.544 [DEBUG] [jsr223.jython.core.utils            ] - New sendCommand value for 'iEGFlur_TreppeLED_Li' is 'OFF'

2021-01-19 19:53:38.586 [DEBUG] [ebnet.handler.OpenWebNetThingHandler] - handleCommand() (command=OFF - channel=openwebnet:bus_on_off_switch:bticino:EGFlur_TreppeLED_Li:switch)

2021-01-19 19:53:38.588 [DEBUG] [et.handler.OpenWebNetLightingHandler] - handleSwitchCommand() (command=OFF - channel=openwebnet:bus_on_off_switch:bticino:EGFlur_TreppeLED_Li:switch)

2021-01-19 19:53:38.598 [WARN ] [nwebnet4j.communication.BUSConnector] - ##BUS-conn## Exception: Received null frame while reading responses to command

2021-01-19 19:53:38.602 [WARN ] [nwebnet4j.communication.BUSConnector] - ##BUS-conn## trying NEW CMD connection...

2021-01-19 19:53:38.696 [INFO ] [jsr223.jython.bt_manager.py         ] - bt_manager data: *1*1000#0*41#4#01##

2021-01-19 19:53:38.739 [INFO ] [jsr223.jython.bt_manager.py         ] - bt_manager data: *1*0*41#4#01##

2021-01-19 19:53:38.760 [DEBUG] [bnet.handler.OpenWebNetBridgeHandler] - ownIdFromMessage(<*1*0*41#4#01##>) --> 1.41h4h01

2021-01-19 19:53:38.762 [DEBUG] [et.handler.OpenWebNetLightingHandler] - handleMessage() for thing: openwebnet:bus_on_off_switch:bticino:EGFlur_TreppeLED_Li

2021-01-19 19:53:38.764 [DEBUG] [et.handler.OpenWebNetLightingHandler] -   1.41h4h01 ONOFF CHANGED to 0

I see the same in OH3

2021-01-19 20:55:33.215 [WARN ] [nwebnet4j.communication.BUSConnector] - ##BUS-conn## Exception: Received null frame while reading responses to command

2021-01-19 20:55:33.217 [WARN ] [nwebnet4j.communication.BUSConnector] - ##BUS-conn## trying NEW CMD connection...

I assumed it was because I have my 2.5 setup and OH3 binding doesn’t support everything.

i forgot to say i am still not on oh3, i run openhabian 2.5.11-1

this is “normal”, @massi will fix this in a new version, see here:

Thank you @massi.
I am running 3.0.0 stable on openhabian 1.6.2 (RPI4B).
I will post the logs as soon as I notice that again (I’m not at home except for the weekend, so there are not many chance for me to see that happen).
Thank you

yes, these misleading log messages will be changed in 3.1.0 and 2.5.12

come on! It’s the 6th entry on Google! searching “bticino openwebnet”…

Hello @massi
Here it is.
I tried to send the command via Alexa and via the OH UI, in both cases the rollershutter didn’t open and I got this on the log:

2021-01-20 08:14:45.476 [DEBUG] [ebnet.handler.OpenWebNetThingHandler] - handleCommand() (command=UP - channel=openwebnet:bus_automation:MH202_00035001e89b:33:shutter)

2021-01-20 08:14:45.480 [DEBUG] [.handler.OpenWebNetAutomationHandler] - Exception while sending request for command UP: CMD is not connected

org.openwebnet4j.communication.OWNException: CMD is not connected

	at org.openwebnet4j.communication.OpenConnector.sendCommandSynch(OpenConnector.java:116) ~[bundleFile:?]

	at org.openwebnet4j.OpenGateway.sendInternal(OpenGateway.java:175) ~[bundleFile:?]

	at org.openwebnet4j.OpenGateway.send(OpenGateway.java:155) ~[bundleFile:?]

	at org.openhab.binding.openwebnet.handler.OpenWebNetThingHandler.send(OpenWebNetThingHandler.java:168) ~[bundleFile:?]

	at org.openhab.binding.openwebnet.handler.OpenWebNetAutomationHandler.handleShutterCommand(OpenWebNetAutomationHandler.java:178) [bundleFile:?]

	at org.openhab.binding.openwebnet.handler.OpenWebNetAutomationHandler.handleChannelCommand(OpenWebNetAutomationHandler.java:149) [bundleFile:?]

	at org.openhab.binding.openwebnet.handler.OpenWebNetThingHandler.handleCommand(OpenWebNetThingHandler.java:131) [bundleFile:?]

	at jdk.internal.reflect.GeneratedMethodAccessor112.invoke(Unknown Source) ~[?:?]

	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]

	at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]

	at org.openhab.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:154) [bundleFile:?]

	at org.openhab.core.internal.common.InvocationHandlerSync.invoke(InvocationHandlerSync.java:59) [bundleFile:?]

	at com.sun.proxy.$Proxy4552.handleCommand(Unknown Source) [?:?]

	at org.openhab.core.thing.internal.profiles.ProfileCallbackImpl.handleCommand(ProfileCallbackImpl.java:80) [bundleFile:?]

	at org.openhab.core.thing.internal.profiles.SystemDefaultProfile.onCommandFromItem(SystemDefaultProfile.java:48) [bundleFile:?]

	at jdk.internal.reflect.GeneratedMethodAccessor111.invoke(Unknown Source) ~[?:?]

	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]

	at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]

	at org.openhab.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:154) [bundleFile:?]

	at org.openhab.core.internal.common.Invocation.call(Invocation.java:52) [bundleFile:?]

	at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]

	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]

	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]

	at java.lang.Thread.run(Thread.java:834) [?:?]

This is what I get when trying to switch on a light from UI

2021-01-20 08:16:37.764 [DEBUG] [ebnet.handler.OpenWebNetThingHandler] - handleCommand() (command=ON - channel=openwebnet:bus_on_off_switch:MH202_00035001e89b:26:switch)

2021-01-20 08:16:37.769 [DEBUG] [et.handler.OpenWebNetLightingHandler] - handleSwitchCommand() (command=ON - channel=openwebnet:bus_on_off_switch:MH202_00035001e89b:26:switch)

2021-01-20 08:16:37.771 [WARN ] [et.handler.OpenWebNetLightingHandler] - Exception while processing command ON: CMD is not connected

In both cases, on the event log, the commands are logged as correctly executed and the item status is updated accordingly, but of course nothing happened (the shutter didn’t open and the light didn’t switch on).
Is there anything else I can try?
I guess in this case my only option is to reboot the PI, but I will wait until tonight just in case you need any further investigation.
Thanks

Hi Massi! Thank you for your work on the binding. I’m new to the OpenHAB (using it since 2-3 months) and since the beginning with your binding. My Bticino configuration includes lighting, automation, heating, load control. I have as well lot of dry contacts as “eyes” of the installation. My gateway is MH202 and the MyHome Server1. I’m not the software engineer, but I would like to help in testing of the binding. I would like to migrate to the OH3 now. Is there bticino test binding with similar functionality (dry contacts, thermo) like for OH2.5? I yes, then I’m ready to help.
Have a nice day,
Piotr

yes I suggest you reboot the Pi, for some reason the re-connect cycle to the gateway is not running. If the problems returns, send me the complete log file via Personal Message