[BTicino/OpenWebNet] New openHAB2 binding ready for testing

Hi @jpcolin,
Have you set in Configuration->System under Marketplace “Include Bindings” and Maturity level to Alpha?

No it is set to beta, the openweb add-on is beta isn’t it?
I’ll try with alpha…

Yes, sorry beta

Ok, i tried yesterday evening and got it to work, but the Marketplace method does not works (eveng by setting maturity to alpha the add-on is not listed)
I had to install manually the Jar file in the add-ons directory and run Karaf console.
Maybe the instructions should be upgraded.

anyway thank you for your help, now i have to work on my config and try things out.
Configuration via UI is pretty easy, but i think i will give the manual config file method a try in couple days.
Are there any more evoluated examples of fonig file that the one the Github?

thanks

Hello to all,
first of all, thanks and congratulations for the job.
Also I installed the addon via jar file because in the marketplace was not present.

But I have another question:
I’m trying to connect light on Google Home but,after I login to myopnehab on google home, no items appear on it.
Instead on IFTTT I see all the items.
Why?

The problem with Marketplace is not about this single binding, but for every binding (in fact you cannot find ANY binding that is on the Marketplace, not just this one).
Since some weeks there are some security certificates problems and openHAB cannot access the Marketplace anymore.
A temporary solution is to add new certificates to your Java setup, following the instructions here
(search for the “Solved” reply):

M

Massi,

Fist of al congratulations and a big thank you for your work, i think you make a lot of people happy :wink:
As i’m new to openhab you binding was the first i installed as it is the most important for me, in fact it is one of the main reasons i choosed Openhab, so i did not try the market with other bindings… :wink:

I succesfull installed it like i said, but i want to go for the config files.
There are example on the binding page, unfortunately it’s not clear for me, i wil need some help.
I did read al the messages here but still. So i tried to combine some thing i found here…
Could you have a look and give me your comments or point at obvious errors or missings ?

<code>

Bridge openwebnet:bus_gateway:MH200N  [ host="192.168.1.35", passwd="xxxx" ] 
{
    Thing bus_on_off_switch  Living Room TV Light "Living Room TV Light" @ "Light" [ where="43" ]
    Thing bus_on_off_switch  Dining Room Table "Dining Room Table" @ "Light" [ where="45" ]
    Thing bus_on_off_switch  Kitchen Led "Kitchen LED Strip" @ "Light" [ where="32" ]
    Thing bus_dimmer         Living Room Main "Living Room" @ "Light" [ where="41" ]
    Thing bus_dimmer         Living Room Main "Living Room" @ "Light" [ where="46" ]
    Thing bus_automation     Kitchen Front "Kitchen Front" @ "Blinds" [ where="75", shutterRun="12000" ]
    Thing bus_automation     Kitchen Rear "Kitchen Rear" @ "Blinds" [ where="76", shutterRun="12000" ]
    Thing bus_automation     Living Room Front "Living Room Front" @ "Blinds" [ where="71", shutterRun="12000" ]
    Thing bus_automation     Living Room Rear "Kitchen Front" @ "Blinds" [ where="72", shutterRun="12000" ]
    Thing bus_automation     Dining Room Front "Kitchen Front" @ "Blinds" [ where="73", shutterRun="12000" ]
    Thing bus_automation     Dining Room Rear "Kitchen Front" @ "Blinds" [ where="74", shutterRun="12000" ]

    Thing bus_thermostat     Living Room Thermostat   "Living room Thermostat" @ “temperature”  [ where="1" ]
}

</code>

Thanks, next will be the Thing config.

if i compare with my things-file i would say try:

  • remove “Thing”
  • instead of for example “Kitchen Led” write “Kitchen_Led” to have one word
  • maybe correct but i don´t use additional “@ “Blinds””

Stefan,

thanks for your feedback, i saw that “Thing” in Mark’s conffig, don’t know why he did that… Massi your input is wecome.
As for the naming, it might be better, but i don’t know what these names are used for, aren’t they used for naming the devices for Alexa?
What is the difference between the bold and the italic text?
Thing bus_on_off_switch Living Room TV Light " Living Room TV Light" @ “Light” [ where=“43” ]

the text in the qoutation marks is the description displayed in the website
the bold text ist the name of the variable, because of that it has to be one word: Living_Room_TV_Light

Ok this is is clear now,
The “Thing” is mentioned in the Openhab manual for the definition of things:
Thing <binding_id>:<type_id>:<thing_id> “Label” @ “Location” [ ]
I don’t have the “:” before the thing ID, and i don’t see it here in any thing config. So this is not necessary?

I use both the Thing and the @‘location’. They work. I would post an example but I am at work. Maybe later.

Some examples. Note the blind with the shutter time calibration.

I think the BUS number Thing… bus_on_off_switch 1007 “South bedroom guests” @ “Mode” [ where=“1007” ] … in bold could be anything you want. I just use the BUS where address
the @‘location’ makes it easier find stuff in PaperUI

.things

Thing bus_thermostat 1 "West bathroom" @ "Thermo" [ where="1" ]
Thing bus_on_off_switch 1007 "South bedroom guests" @ "Mode" [ where="1007" ]
Thing bus_on_off_switch 83 "Garden socket 2" @ "Sockets" [ where="83" ]
Thing bus_on_off_switch 25 "Utility room light" @ "Lights" [ where="25" ]
Thing bus_dimmer 96 "South bedroom spots" @ "Lights" [ where="96" ]
Thing bus_automation 79 "Kitchen south" @ "Blinds" [ where="79", shutterRun="40220" ]

Note Alexa tags eg [“Lighting”] and groups eg (gUpperFloorTemperature)

.items

Rollershutter WestBedroomWest_RollerShutter "West bedroom west blind [%d %%]" <blinds> (gAllBlinds) { channel="openwebnet:bus_automation:Screen10:65:shutter" }
Dimmer Sauna_Brightness "Sauna spots" <DimmableLight> (gAllLights) ["Lighting"] {channel="openwebnet:bus_dimmer:Screen10:97:brightness"}
Number WestBedroom_Temperature "W bedroom [%.1f °C]" <temperature> (gUpperFloorTemperature) {channel="openwebnet:bus_thermostat:Screen10:2:temperature"}
Number Office_TargetTemperature "Target [%.1f °C]" <temperature> {channel="openwebnet:bus_thermostat:Screen10:6:targetTemperature"}
Switch Office_Heating "Heating" <switch> {channel="openwebnet:bus_thermostat:Screen10:6:heating"}
String Office_Mode "Mode" <text> {channel="openwebnet:bus_thermostat:Screen10:6:activeMode"}

Thank you Mark,

I made 2 files, .things and .items, uploaded the files /etc/openhab2/.
But nothing shows up in Paper UI, should i do something extra to “discover-activate” the things i defined in the config file?
In the meantime i already made an openhab cloud account and linked the Alexa skill.
But since no things are showing up in openhab, Alexa doesn’t see any things.

The myItems.items and my things.things files should be in the corresponding folders of course. I access these through desktop shortcut to samba share. Already configured in openhabian. No discovery is needed it should just work. If files were not placed there this way maybe check permissions, remove similar PaperUi things and items, restart openhab. Refresh browser. Check log for error messages when creating files. Should jusr say refreshing followed by adding the items. May need to toggle the states…switch on and off items to get them initialized to correct state…

Yes of course they are in the correspondingn folders…
I removed all the items in Paper UI, there must be something wrong because it is not only the Bticino items that not show up, but also my sonos.
I’ll check and try again and let you know

nobody can help me?
otherwise, where can I find the .things and .items files created with the PaperUI? so I verify that there are tags explained in this guide Google Assistant Action

sorry alberto, i don´t have any experience with google home and cannot help here.

the things and items created in paperui are stored in an internal database, for my openhabian it is located at /var/lib/openhab2/jsondb but i think it is not good to manipulate there. better go the other way and delete the entries in paperui and create manually files for things and items

I have Amazon Alexa and so cannot help with Home either. You can check, add and delete the tags using REST API or as Stefan says create the entries manually. REST API is the easier route and accessed from the openhab dashboard. I have not tried but I don’t think its an easy task to safely edit the json database directly… use REST API.

eg below is part of the API response to ‘get items’ and you can see the tag. Editable =false because this item was created using the items file but PaperUI created items will be editable.

to add a tag use PUT and enter the item name and tag

I checked everything, it worked with the paper UI config, sur the binding is working.
I cleared browser history, refreshed the page, still no go.
When i go to things in paper UI, i see no Bticino things, nor in Items. Anyone has an idea what i’m doing wrong?

<code>


.Things:

     Bridge openwebnet:bus_gateway:MH200N  [ host="192.168.1.35", passwd="xxxxxx" ] 

{
    Thing bus_on_off_switch  living_room_tv_light "Living Room TV Light" @ "Living Room" [where="43"]
    Thing bus_on_off_switch  Living_room_wall "Living Room Wall" @ "Living Room" [where="42"]    
    Thing bus_on_off_switch  dining_room_table "Dining Room Table" @ "Dining Room" [where="45"]
    Thing bus_on_off_switch  dining_room_ground "Dining Room Ground" @ "Dining Room" [where="45"]
    Thing bus_on_off_switch  kitchen_bar " Kitchen Bar" @ "Kitchen" [where="33"]
    Thing bus_on_off_switch  kitchen_ledstrip "Kitchen LED" @ "Kitchen" [where="32"]
    Thing bus_on_off_switch  Living_ledstrip "Living Curtain LED" @ "Living" [where="44"]
    Thing bus_dimmer         Kitchen_main "Kitchen Main" @ "Kitchen" [where="31"]   
    Thing bus_dimmer         living_room_main "Living Room Main" @ "Living Room" [where="41"]
    Thing bus_dimmer         dining_room_main "Dining Room Main" @ "Dining Room" [where="46"]
    Thing bus_automation     kitchen_front_shade "Kitchen Front Shade" @ "Kitchen" [where="75", shutterRun="12000"]
    Thing bus_automation     kitchen_rear_curtain "Kitchen Rear Curtain" @ "Kitchen" [where="76", shutterRun="12000"]
    Thing bus_automation     living_room_Front_shade "Living Room Front Shade" @ "Living Room" [where="71", shutterRun="12000"]
    Thing bus_automation     living_room_Rear_curtain "Kitchen Front Curtain" @ "Living Room" [where="72", shutterRun="12000"]
    Thing bus_automation     dining_room_Front_shade "Dining Room Front Shade" @ "Dining Room" [where="73", shutterRun="12000"]
    Thing bus_automation     dining_room_Rear_curtain "Dining Room Rear Curtain" @ "Dining Room" [where="74", shutterRun="12000"]

    Thing bus_thermostat     living_room_thermostat   "Living room Thermostat" @ “temperature” [where="1"]
}


.Items:

/* Living Room - Dining Room – Kitchen*/
{
Switch living_room_tv_light "Switch" <light> (LivingRoom) ["Lighting"]  { channel="openwebnet:bus_on_off_switch:MH200N: living_room_tv_light:switch" 
Dimmer living_room_main "Brightness [%.0f %%]"  <DimmableLight>  (LivingRoom) ["Lighting"]  { channel="openwebnet:bus_dimmer:MH200N: living_room_main:brightness" 
Rollershutter kitchen_front_shade "Shutter [%.0f %%]"  <rollershutter>  (LivingRoom) { channel="openwebnet:bus_automation:MH200N: kitchen_front_blind:shutter" 
}



Group  living_room_thermostat   "Living room Thermostat"  [ "Thermostat" ]
  Number  Living Room _Temp                "Temperature [%.1f °C]"      <temperature>  (Living Room Thermostat) [ "CurrentTemperature" ]          { channel="openwebnet:bus_thermostat:MH200N:living_room_thermostat:temperature" }
  Number  Living Room _SetpointTemp        "Set Temperature [%.1f °C]"  <temperature>  (Living Room Thermostat) [ "TargetTemperature" ]           { channel="openwebnet:bus_thermostat:MH200N:living_room_thermostat:setpointTemperature" }
  String  Living Room _HeatingCoolingMode  "HeatingCoolingMode"                        (Living Room Thermostat) [ "homekit:HeatingCoolingMode" ]  {  channel="openwebnet:bus_thermostat:MH200N:living_room_thermostat:heatingCoolingMode" }

</code>