[BTicino/OpenWebNet] New openHAB2 binding ready for testing

So after the second scan the dinners were found correctly?

Yes in principle you can create things (and then items) associated with any WHERE address.
For example if you create a Switch thing with WHERE = 0 : that should switch on/off all lights and dimmers on the BUS.
But I never tested it.
It also overlaps with the group functionality you have in openHAB, so I do not know how much that is useful…

Bye
Massi

Yes second Scan all Good

OK, but I need to create a thing with text config?

bye
Massi

not necessarily, you can create new things manually from paperui (start a discovery, then find add manually at the bottom), and set the WHERE parameter in the config of the thing. If you have Config > System > Item Linking set to Simple Mode an Item will be also created.

I have tested a switch thing with WHERE = 0 and actually it works to switch all on/off.
However is less useful than openHAB groups because it does not change state from Off to On if one of the lights gets On…
Unless you have particular use cases, I would suggest to use openHAB groups instead.

Massi

Hallo,
I am happy to announce that a new release of the OpenWebNet biding is available: beta7.

Everyone is encouraged to upgrade to this version!

This new release brings Thermoregulation (WHO=4) and some important enhancements:

  • [NEW, FIX #5] Initial support for WHO=4 Thermoregulation on BUS. Currently supported: zones room thermostats and external (wireless) temperature sensors. Both heating and cooling functions are supported (TESTING NEEDED!)
  • The binding is now available on the Eclipse IoT Marketplace!
  • [BUG] corrected a bad bug on the connection part (originally taken from the BTicino 1.x binding) that caused loosing many monitoring (feedback) messages from the gateway when several messages were received together
  • [FIX #13] now commands sent close in a short time are sent re-using the same socket connection to the gateway. This should improve connection stability and speed in general and in particular with older BUS gateways (e.g. MH202)
  • [FIX] improved Shutter management and position estimation, thanks to previous 2 enhancements
  • minimum requirement is now openHAB 2.3, which is needed to support measurements units like °C

The new Thermostat things look like this in PaperUI:


For an explanation of the thermo channels/items and their values, see the README.

As someone reported imprecise shutter positioning when multiple shutters where activated, I tested a go-to-Position for a group of 10 shutters. Thanks to connection/monitoring fixes in this version, multiple shutters now work precisely: in the following small video 10 shutters move from 100% to 40% simultaneously and the final position (second line of the item) is correct (±2%) for all of them.
Of course it’s important that each shutter is first properly calibrated either automatically or manually (see shutterRun config parameter)
shutters

Dimmer items automatically added from PaperUI (Configuration > System > Item Linking > Simple mode) have also an On/Off switch:
dimmer
for dimmer items added in the .items file, this is the correct configuration (example):
Dimmer iBusDimmer "Brightness [%.0f %%]" <DimmableLight> ["Lighting"] { channel="openwebnet:bus_dimmer:mybridge:mydimmer:brightness" }
Note that the correct category must be: DimmableLight.

Installation and Upgrade

NEW! The binding is now also published on the Eclipse IoT Marketplace.
marketplace
I suggest someone tests the installation from the Marketplace; of course Favourite and Comments on the Marketplace are very very welcome! :wink:

To install/upgrade to the new version, follow the instructions in the README.

JAR File: https://github.com/mvalla/openhab-openwebnet/releases/download/v2.4.0-b7/org.openhab.binding.openwebnet-2.4.0-b7.jar

For any help/issue on the new binding, write here in this thread.

A special thanks goes to those who helped testing the preview release with their Thermo setup! (see README for a list).

Ciao!
MASSI

Well done Massimo,

Thank you for all your hard work. Its really helped my Openhab setup become something very interesting and useful, even futuristic. It impresses my friends when I voice command the blinds or ask Alexa to set the scene for dinner

:grinning:

Ciao Mark

When adding items manually to .items file to get the the Dimmer and Switch function item category is needed as you say but. I didn’t see this mentioned over at Github. At first I did it the wrong way and ended up with independent on/off switch and dimmer slider functions for the Thing until I found your comment here.

Am I correct that the auto calibration is only for Zigbee shutters with position feedback. If yes then I think it should be made clearer that for all other types you must enter the calibration time manually. Also, if there is no time entered then the blinds show their intermediate positions as Undefined

Ciao, Mark

No: calibration should work both for BUS and Zigbee shutters.

Position remains undefined when the shutters is stopped and calibration has not been done yet.
It may happen also when there has been a disconnection, so OH does not know anymore where the shutter was. But if shutterRun is defined (and correct), then just roll the shutter all Up / Down and position will be estimated again.

Hi,
I am seeing this happen again: MH202 Scenarios fail to run after BUS scan. They run fine again after MH202 reboot. The affected scenarios all have a switch in the ‘only if’ condition for the scenario. Its as though the discovery upsets the state and they end up somehow undefined and so MH202 scenarios do not run until reset…

just a additional info: i use the mh200n and have more than 200 partially complicated scenarios (even with “only if” conditions) loaded.

with this device i don´t see problems like mark during discovery

Hi,
I need to manually define a blind Thing that isn’t discoverable (due to a wireless bridge) but I am struggling to get the syntax error free. I have had it working (blinds respond) but with errors either in the log or designer depending on how I do it. So I nearly have it correct :slight_smile: Could some kind person please post an example(s) of creating a Thing but using a PaperUI defined gateway. So, in my case I don’t need to define the gateway but just the problem Things and the definition reference the gateway.

The binding ‘read me’ only shows an example of code where the gateway is defined at the same time as the Things.
Some questions:

  • Is it better to let PaperUI set up most of the Things wherever it can or is it better if I define things in the textual config file?
  • Is it better workflow in the long run to define the Gateway in the Thing file and let PaperUI do the discovery and setup for the rest??

I have read a lot of documents and the binding ’ read me’ but I find of all the Openhab stuff far this topic to be the hardest to decipher.

Reading for anyone else starting out on this topic:

https://www.eclipse.org/smarthome/documentation/features/dsl.html#defining-things

hi mark,

i would suggest to delete the gateway in paper-ui and put it in the things-file. this is harmless because you can do the automatic discovery even in that kind of config.

i have some dimmers that are not beeing found from discovery and beause of that i did a manual config of things just some days ago. my items already were manually configured in items-file and so i only had to acualize the gateway-information. for items that are discovered i think you will have do delete them and then after adding the gateway to things.file simply discover again.

specially for rollershutters i like the manually configuration because there you can just set the run-time and so no need to do the calibration ever again :slight_smile:

best stefan

Hi Stefan,

Could you post some example code please.

In my Things file

Bridge openwebnet:bus_gateway:Screen10 [ host="192.168.x.xx", passwd="xxxxxx" ]

That seems OK but I am struggling to get the blind Things working.

Thanks Mark.

of course :slight_smile:

this is a part of my things-file:

Bridge openwebnet:bus_gateway:mybridge  [ host="172.xx.xx.xx", passwd="xxxx" ] {
    
    bus_on_off_switch   EG_Li_GarageFenster     "EG_Li_GarageFenster"     [ where="51#4#01" ]

    bus_dimmer          EG_Li_Flur              "EG_Li_Flur"              [ where="45#4#01" ]

    bus_automation      EG_Ro_BueroTuere        "EG_Ro_BueroTuere"         [ where="88#4#01", shutterRun="27000"]
}

and here the items-items file

Group EG_Garage "Garage" <garage> (Home, EG)

Group EG_Flur "EG-Flur" <corridor> (Home, EG)

Group EG_Buero "Büro" <office> (Home, EG)

Switch EG_Li_GarageFenster "Fenster" <light> (EG_Garage) {channel="openwebnet:bus_dimmer:mybridge:EG_Li_GarageFenster:brightness"}

Dimmer EG_Li_Flur "Spots [%.0f %%]" <DimmableLight> (EG_Flur) {channel="openwebnet:bus_dimmer:mybridge:EG_Li_Flur:brightness"}

Rollershutter EG_Ro_BueroTuere "Fenster" (EG_Buero) {channel="openwebnet:bus_automation:mybridge:EG_Ro_BueroTuere:shutter"}

as you can see i use the same name for the thing and in the sitemap. that may be confusing a bit but i like it. hope that helps :wink:

Thanks it helps. I just got it working again before you posted . The same way as you. I should leave alone now as I am tired and keep messing it up. I was forgetting to copy the changed channel info from the new Thing into the items definition doh!!!

great, i´m pleased to read that :slight_smile:

I was kind of fighting how its done due to my file structure. It looked possible to define the gateway/bridge and elsewhere define the Things eg one file for blinds and another for lights etc.

Anyway I gave up the fight for now and did it how Massi has it in the readme and you posted, except I have the @ location specified so that the Things appear nicely tabbed in Paper UI and gave my gateway a nice name. I have two . Not sure if that’s useful or not.

Bridge openwebnet:bus_gateway:Screen10 [ host="192.168.xx.xx", passwd="xxxxx" ] {

    Thing bus_automation KitchenSouth "Kitchen south" @ "Blinds" [ where="79", shutterRun="60000" ]
    Thing bus_automation 78 "Kitchen east" @ "Blinds" [ where="78", shutterRun="70000" ]
    Thing bus_automation 55 "Office" @ "Blinds" [ where="55", shutterRun="45000" ]
}

you´re right, i actually changed the name of my gateway :slight_smile:

the location information i had inserted earlier but removed then because
i´ve a lot of locations and so the names will be shorten under
“control”, that becomes confusing. thats why i added the floor in first
position of the names (“EG_…” - ground floor, “OG_…” - upper floor) :wink:

Hello all! I need a help from you. I decided to move my MyHome configuration from Domoticz to OH2 and I’m just beginning. After trying the standard binding (no support for MHS1 and I used it through the 3.5 touch unofficial gateway) I’m now trying also this new one binding.
But I’m stuck on the very beginning! I can define the gateway, I can discover the things, but after that I do not know where to go. Official documentation does not help me much.
Things aded are in unknown state:

2018-09-08 08:17:39.764 [hingStatusInfoChangedEvent] - ‘openwebnet:bus_gateway:858b375d’ changed from UNINITIALIZED to INITIALIZING
2018-09-08 08:17:39.801 [hingStatusInfoChangedEvent] - ‘openwebnet:bus_gateway:858b375d’ changed from INITIALIZING to UNKNOWN
2018-09-08 08:17:40.243 [me.event.ThingUpdatedEvent] - Thing ‘openwebnet:bus_gateway:858b375d’ has been updated.
2018-09-08 08:17:40.249 [hingStatusInfoChangedEvent] - ‘openwebnet:bus_gateway:858b375d’ changed from UNKNOWN to ONLINE

2018-09-08 08:19:43.660 [home.event.InboxAddedEvent] - Discovery Result with UID ‘openwebnet:bus_on_off_switch:858b375d:11’ has been added.

2018-09-08 08:20:54.466 [hingStatusInfoChangedEvent] - ‘openwebnet:bus_on_off_switch:858b375d:11’ changed from UNINITIALIZED to INITIALIZING
2018-09-08 08:20:54.474 [hingStatusInfoChangedEvent] - ‘openwebnet:bus_on_off_switch:858b375d:11’ changed from INITIALIZING to UNKNOWN: waiting state update…

Thank you for any advice

hi fmalfatto,

i suppose you did not add the corresponding items to each thing?

you can do this easyli by adding a thing in paper-ui.

i do this manually by editing a *.items file (in folder “items” nearby
folder “sitemaps” add a file, name doesn´t matter, but with extension
“items”, for example “bticino.items” and add sth like:

SwitchOUT_LIGHT"light
outside"{channel=“openwebnet:bus_on_off_switch:858b375d:11:switch”}

you see there is your gateway-address “858b375d” and your lightpoint “11”.