[BTicino/OpenWebNet] New openHAB2 binding ready for testing

I guessed correclty :wink:

@massi

Congratulations. I know it was a lot of work for you.

but only lighting is supported!!!

@massi, what are the plans for the old binding when it expires?
ps you have it supporting lightning :cloud_with_lightning::grinning: should be lighting :bulb:

with this release none (even light) work except the gateway F454…

so…on my setup…yes is true, i can’t tell for other ?

I don’t think there has been much user testing so far but I could be wrong. Again, we need Massi to explain his plans. Massi asked me not to post on the topic. I am not supposed to be saying much, sorry Massi but the silence is deafening.

ok i read nothing … and i know…nothing :slight_smile:

1 Like

I think Massimo will be replying soon :wink:

Hallo
I am happy to announce that the openwebnet binding has been included in the official OH distribution starting from OpenHAB version 2.5.8, released by Kai yesterday.
This has been possibile after the long testing phase and with the support from all who helped testing.
It also required me to fully dedicate “all available OH time” to this goal:

  • the underlying lib that enables communication with BTicino gateways has been rewritten from scratch and released as a new open source standalone project called “openwebnet4j”. This was the main time drain (=many many evenings dedicated to this project)
  • the careful OH review process also required many changes to the binding code to reach the very high code quality required to be part of the official distribution :sunglasses:

This is why the just released binding has only support for lighting (WHO=1): to simplify the submission and review process.

Here is the plan for the near future:

  • as announced by Kai, there will be new 2.5.9 and 2.5.10 patch releases. The plan is to use these two releases to fix any bug with the binding and add Automation (WHO=2) before the end of the of year, and before OpenHAB 3.0 is released
  • the openwebnet binding will be then ported to OH 3.0, contributing to the future of OpenHAB
  • I will release a final version of the old testing binding that will “expire” by the end of the year. Please note that in any case the final testing binding will not be compatible with OH 3.0 and will not be further improved/maintained

Later on new features and WHOs will be added to the official binding according to: available time, contributions from other developers (always welcome! please show up, with real intentions!) and interest/commitment by users.

For those interested to test the official binding: just upgrade to OH 2.5.8, remove the old opewebnet binding from the addons folder (or (de)install it from marketplace), then install the new official binding.
Dependencies should be resolved automatically now, including the new needed Openwebnet4j lib.

All text configuration should remain the same (at least for the BUS systems).
In case things where added from PaperUI instead, I suggest you delete them and discover them again.

As said: only lights/dimmers will be discovered and controllable for now.

Bye
MASSIMO

7 Likes

@massi Again… well done :star_struck:

1 Like

if i understand right if i add item from PaperUi i need to recreate from PaperUi ? it is ?

in reality i don’t even know how to add item directly from things file, but is more portable…

Well!!!

Nice, thank you for the hard work!

Great news and congrats Massi!

I could surely provide help with some testing for different WHO (Lightning, Termo, Multimedia, Alarm-Burglar, etc.) and maybe as a contributor.

I have to wait to remove completely the beta binding, since the official one lacks a couple of needed WHO.

Marco

Same for me. I actually need to go on with the beta version, but I can test most of new WHOs you will support, expecially BurglarAlarm that is actually unsupported and I hope will be soon supported via AUX commands.
Thanks for your great job!

hello all,

of course it is not easy to check the new binging, but if everyone waits until all works - the developer will never get necessary feedback for the binding. i think it is a good idea to do it step by step - and it would be great if somebody would honorize the work of the developer and try to help at least with testing.

so i added the binding-openwebnet - 2.5.8 and detected following:

after installing, the autodiscovery found my mh200n, my f454 and my myhome-screen (mh4893) and added all to inbox.

then i created a things-file with f454 as bridge and some lights and dimmers the file contends:

Bridge openwebnet:bus_gateway:BticinoGateway [
    host=my-ip,
    passwd=my-pw,
    discoveryByActivation=true
    // discoveryByActivation=false
]{
    Thing bus_dimmer                    EGFlur_Li                   "EGFlur_Li"                     @ "Lichter"     [ where="45#4#01" ]
    Thing bus_on_off_switch             EGFlur_Dekolampe            "EGFlur_Dekolampe"              @ "Lichter"     [ where="43#4#01" ]

next i switched EGFlur_Dekolampe on a physical switch on and off again. then i got this log:

2020-09-05 11:05:45.095 [WARN ] [openwebnet4j.message.BaseOpenMessage] - Exception parsing WHAT of frame *1*34*03#4#01##: Unsupported WHAT: 34

2020-09-05 11:05:45.137 [INFO ] [ery.OpenWebNetDeviceDiscoveryService] - newDiscoveryResult() WHERE=w:03#4#01, deviceType=SCS_DIMMER_SWITCH

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

2020-09-05 11:05:45.220 [home.event.InboxAddedEvent] - Discovery Result with UID 'openwebnet:bus_dimmer:BticinoGateway:03h4h01' has been added.

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

2020-09-05 11:05:45.232 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'openwebnet:bus_dimmer:BticinoGateway:03h4h01' to inbox.

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

2020-09-05 11:05:45.599 [hingStatusInfoChangedEvent] - 'openwebnet:bus_on_off_switch:BticinoGateway:EGFlur_Dekolampe' changed from UNKNOWN: waiting state update... to ONLINE

what is strange: the where is “43#4#01” but in the inbox it was added as where=“03#4#01” - as you can also see in the logfile here

next i switched EGFlur_Li on a physical switch on and off again. then i got this log:

2020-09-05 11:12:47.454 [WARN ] [openwebnet4j.message.BaseOpenMessage] - Exception parsing WHAT of frame *1*34*03#4#01##: Unsupported WHAT: 34

2020-09-05 11:12:47.472 [INFO ] [ery.OpenWebNetDeviceDiscoveryService] - newDiscoveryResult() WHERE=w:03#4#01, deviceType=SCS_DIMMER_SWITCH

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

2020-09-05 11:12:52.055 [hingStatusInfoChangedEvent] - 'openwebnet:bus_dimmer:BticinoGateway:EGFlur_Li' changed from UNKNOWN: waiting state update... to ONLINE

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

2020-09-05 11:12:52.364 [WARN ] [openwebnet4j.message.BaseOpenMessage] - Exception parsing DIM of frame *#1*45#4#01*4*140*1##: Unsupported DIM: 4

2020-09-05 11:12:52.380 [WARN ] [et.handler.OpenWebNetLightingHandler] - updateLightBrightnessState() Cannot handle message <*#1*45#4#01*4*140*1##> for thing openwebnet:bus_dimmer:BticinoGateway:EGFlur_Li

2020-09-05 11:12:54.618 [WARN ] [openwebnet4j.message.BaseOpenMessage] - Exception parsing DIM of frame *#1*45#4#01*4*100*1##: Unsupported DIM: 4

2020-09-05 11:12:54.630 [WARN ] [et.handler.OpenWebNetLightingHandler] - updateLightBrightnessState() Cannot handle message <*#1*45#4#01*4*100*1##> for thing openwebnet:bus_dimmer:BticinoGateway:EGFlur_Li

2020-09-05 11:12:55.476 [WARN ] [openwebnet4j.message.BaseOpenMessage] - Exception parsing WHAT of frame *1*34*03#4#01##: Unsupported WHAT: 34

2020-09-05 11:12:55.499 [INFO ] [ery.OpenWebNetDeviceDiscoveryService] - newDiscoveryResult() WHERE=w:03#4#01, deviceType=SCS_DIMMER_SWITCH

and now i have only a dimmer (where=03#4#01) in the inbox

next i added a items-file and then i played around in paperui. i realized that when i slide the dimmer to a value not step10 then i always cuts the one position, for example when selecting 57 it doesn´t round but jumps to 50, no problem i think.
but when i slide the dimmer to a value below 20, it always jups back to 20;

2020-09-05 11:30:58.876 [ome.event.ItemCommandEvent] - Item 'iBuero_Li' received command 5

2020-09-05 11:30:59.001 [nt.ItemStatePredictedEvent] - iBuero_Li predicted to become 5

2020-09-05 11:30:59.129 [vent.ItemStateChangedEvent] - iBuero_Li changed from 70 to 5

2020-09-05 11:30:59.387 [vent.ItemStateChangedEvent] - iBuero_Li changed from 5 to 20

that i my first impressions, please let me know if i can do any other tests.

1 Like

@massi, post this version, please.

Testing with version 2.5.8 (with a F454 gateway), works fine so far but I get a lot off error entries in the log, e.g.:

2020-09-16 22:14:00.741 [hingStatusInfoChangedEvent] - ‘openwebnet:bus_gateway:22cb12a0’ changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Disconnected from gateway (onDisconnected - BUS-MON-Rcv got IOException: Read timed out)
2020-09-16 22:14:03.396 [hingStatusInfoChangedEvent] - ‘openwebnet:bus_gateway:22cb12a0’ changed from OFFLINE (COMMUNICATION_ERROR): Disconnected from gateway (onDisconnected - BUS-MON-Rcv got IOException: Read timed out) to ONLINE

Didn’t happen with the “old” beta version.
THX for your hard work!

1 Like

correct what @cybermcm realizes, i have the same errors in my log. sorry i did not see before

1 Like

I created a test setup on spare RPi. For now I just used Paper UI. Downloaded and installed openhabian. Updated to latest stable version. Added openwebnet binding from PaperUI addons.

  • Two gateways were discovered
  • Added Screen 10 thing from inbox
  • 71 devices found all as switches including dimmers and F428 contacts interfaces
  • Added light thing from inbox
  • Created item link
  • Added dimmer thing
  • Created item link
  • Dimmer light worked but was wrong type. Edited type from switch to dimmer.
    I noticed there is no on/off switch for dimmer type and the dimmer stopped repsonding from control

The log shows this when operating from PaperUI control

2020-09-18 10:55:33.620 [ome.event.ItemCommandEvent] - Item 'Wall' received command 41

2020-09-18 10:55:33.626 [nt.ItemStatePredictedEvent] - Wall predicted to become 41

2020-09-18 10:55:33.635 [vent.ItemStateChangedEvent] - Wall changed from 0 to 41

The log shows this when operating from physical switch:

2020-09-18 10:43:57.217 [DEBUG] [bnet.handler.OpenWebNetBridgeHandler] - ownId=1.0412

2020-09-18 10:43:57.220 [DEBUG] [et.handler.OpenWebNetLightingHandler] - updateLightState() for thing: openwebnet:bus_on_off_switch:TOUCHSCREEN10_00035097038c:0412

2020-09-18 10:43:57.222 [DEBUG] [et.handler.OpenWebNetLightingHandler] - updateLightOnOffState() Ignoring unsupported WHAT for thing openwebnet:bus_on_off_switch:TOUCHSCREEN10_00035097038c:0412. Frame=*1*10*0412##

2020-09-18 10:43:57.741 [DEBUG] [bnet.handler.OpenWebNetBridgeHandler] - ownId=1.0412

2020-09-18 10:43:57.743 [DEBUG] [et.handler.OpenWebNetLightingHandler] - updateLightState() for thing: openwebnet:bus_on_off_switch:TOUCHSCREEN10_00035097038c:0412

2020-09-18 10:43:57.746 [DEBUG] [et.handler.OpenWebNetLightingHandler] - updateLightOnOffState() Ignoring unsupported WHAT for thing openwebnet:bus_on_off_switch:TOUCHSCREEN10_00035097038c:0412. Frame=*1*10*0412##

2020-09-18 10:43:58.264 [DEBUG] [bnet.handler.OpenWebNetBridgeHandler] - ownId=1.0412

2020-09-18 10:43:58.267 [DEBUG] [et.handler.OpenWebNetLightingHandler] - updateLightState() for thing: openwebnet:bus_on_off_switch:TOUCHSCREEN10_00035097038c:0412

2020-09-18 10:43:58.269 [DEBUG] [et.handler.OpenWebNetLightingHandler] - updateLightOnOffState() Ignoring unsupported WHAT for thing openwebnet:bus_on_off_switch:TOUCHSCREEN10_00035097038c:0412. Frame=*1*10*0412##

2020-09-18 10:43:58.787 [DEBUG] [bnet.handler.OpenWebNetBridgeHandler] - ownId=1.0412

2020-09-18 10:43:58.790 [DEBUG] [et.handler.OpenWebNetLightingHandler] - updateLightState() for thing: openwebnet:bus_on_off_switch:TOUCHSCREEN10_00035097038c:0412

2020-09-18 10:43:58.792 [DEBUG] [et.handler.OpenWebNetLightingHandler] - updateLightOnOffState() Ignoring unsupported WHAT for thing openwebnet:bus_on_off_switch:TOUCHSCREEN10_00035097038c:0412. Frame=*1*10*0412##

I left it running for a while and then noticed warnings in the log and my test light wasn’t responding anymore… All Things are offline. Disabling and renabling the Gateway Thing from PaperUI got them all back online again. Similar to the errors alread reported?

2020-09-18 11:56:26.550 [hingStatusInfoChangedEvent] - 'openwebnet:bus_gateway:TOUCHSCREEN10_00035097038c' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Disconnected from gateway (onDisconnected - BUS-MON-Rcv got IOException: Read timed out)

2020-09-18 11:56:26.557 [hingStatusInfoChangedEvent] - 'openwebnet:bus_on_off_switch:TOUCHSCREEN10_00035097038c:12' changed from ONLINE to OFFLINE (BRIDGE_OFFLINE)

2020-09-18 11:56:26.561 [hingStatusInfoChangedEvent] - 'openwebnet:bus_on_off_switch:TOUCHSCREEN10_00035097038c:0412' changed from ONLINE to OFFLINE (BRIDGE_OFFLINE)

2020-09-18 11:56:26.572 [hingStatusInfoChangedEvent] - 'openwebnet:bus_on_off_switch:TOUCHSCREEN10_00035097038c:16' changed from ONLINE to OFFLINE (BRIDGE_OFFLINE)

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

2020-09-18 11:56:29.064 [WARN ] [nwebnet4j.communication.BUSConnector] - (HS) ... STEP-2: cannot authenticate with gateway

2020-09-18 11:56:29.068 [WARN ] [org.openwebnet4j.OpenGateway        ] - --...re-connect FAILED. OWNAuthException: Handshake failed: cannot authenticate with gateway

2020-09-18 11:56:29.071 [INFO ] [bnet.handler.OpenWebNetBridgeHandler] - ------------------- AUTH error from gateway. Stopping reconnect

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

2020-09-18 11:56:29.080 [hingStatusInfoChangedEvent] - 'openwebnet:bus_gateway:TOUCHSCREEN10_00035097038c' changed from OFFLINE (COMMUNICATION_ERROR): Disconnected from gateway (onDisconnected - BUS-MON-Rcv got IOException: Read timed out) to OFFLINE (CONFIGURATION_ERROR): Authentication error. Check gateway password in Thing Configuration Parameters (org.openwebnet4j.communication.OWNAuthException: Handshake failed: cannot authenticate with gateway)

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

2020-09-18 11:56:31.061 [WARN ] [nwebnet4j.communication.BUSConnector] - (HS) ... handshake not completed but timeout expired, closing BUS-MON channel

2020-09-18 13:10:19.265 [DEBUG] [ebnet.handler.OpenWebNetThingHandler] - handleCommand() (command=ON - channel=openwebnet:bus_on_off_switch:TOUCHSCREEN10_00035097038c:16:switch)

2020-09-18 13:10:19.268 [INFO ] [ebnet.handler.OpenWebNetThingHandler] - Cannot handle command openwebnet:bus_on_off_switch:TOUCHSCREEN10_00035097038c:16:switch:ON for openwebnet:bus_on_off_switch:TOUCHSCREEN10_00035097038c:16: gateway is not connected

edited to add… Looks like the Gateway goes offline approximately every 5mins then the binding tries to reconnect. I guess the reconnect sometimes fails with the authentication error and it gives up.

2020-09-18 14:24:38.307 [INFO ] [bnet.handler.OpenWebNetBridgeHandler] - ------------------- DISCONNECTED from gateway. OWNException=BUS-MON-Rcv got IOException: Read timed out

2020-09-18 14:24:38.333 [INFO ] [bnet.handler.OpenWebNetBridgeHandler] - ------------------- Starting RECONNECT cycle to gateway

I changed to MH202 as gateway and now I dont see the offiline and reconnection events.

Hey, I just installed OpenHAB for the first time. I am running the latest openhabian alpha on a RBPi4 with the latest OpenWebNet binding. I discovered my MyHomeServer1 gateway but it seems to be going offline a lot spamming my logs with the following.

It seems only to occur when I’m connected to PaperUI.

When I trigger an action from my OpenHab iOS App, it doesn’t trigger any errors.
Does PaperUI just enable some higher log level when used?

@1V1rusYx The OpenWebNet binding is brand new and it seems that there are still a few bugs hidden inside. Let’s hope that @massi can find and solve them …

1 Like