[BTicino/OpenWebNet] New openHAB2 binding ready for testing

Hello community,

I’m happy to announce the first version of the new BTicino (Legrand) / OpenWebNet binding for openHAB 2.
This is the first known openHAB 2 binding for BTicino/Legrand gateways and devices to support both BUS/SCS and BTicino ZigBee (using USB dongle).

Supported so far:

  • WHO=1 Lighting (switches/dimmers)
  • WHO=2 Automation (shutters)
  • WHO=4 Thermoregulation (thermostats and sensors)
  • WHO=15/25 CEN/CEN+ (scenario buttons and dry contact / IR sensors)
  • WHO=18 Energy Management (central unit)

other functionalities/devices will be added soon - hopefully with your help.
The final goal is to integrate all the functionalities available in the 1.x version of the BTicino binding.

Please test it in your environment and give me your feedback :slight_smile: !

cheers,
Massimo

Features:

  • first openHAB 2 binding to support BUS/SCS gw and devices
  • auto-discovery of:
    • BUS/SCS gateways (via UPnP) and devices
    • ZigBee gateway (USB dongle) and devices
  • BTicino BUS/SCS + ZigBee support in one single binding
  • support for lights, dimmers, green switches, automation (roller shutters) with position feedback, thermoregulation, CEN/CEN+, dry contacts and IR sensors, Energy Management
  • support for gateways with text passwords (HMAC authentication), like MyHOMEServer1, MyHOMEScreen10

Installation:

Since it’s still in development stage and not part of the official distribution, to install the binding refer to these instructions and steps.

Documentation:

For configuration and more details see the binding README

Screenshots:

BUS/SCS + ZigBee discovery

Control BUS/SCS + ZigBee devices (shutters, switch and dimmer)

Thermostat

Source code:

5 Likes

Hello Massimo,

thanks for your great work. As a total noob I have been waiting for a easy-to-use-binding for months.

I just had a quick test of it this morning. It was easy to install and get to work. All switches have been detected quick. Every switch I tested worked. When using another app or the physical switch the binding does not detect the change direct - a switched on light is shown as off. In my noob-opinion that would be necessary to get some automation done (for example: the light in the hall is often forgotten to switch off and needs a timer. If the binding doesn´t know the status it´s not possible to tell it to switch off — btw. do you know a easy way to realise a timer?)

I´m looking forward for the next version and the integration of the automation.

regards.

Faro

Hi @Faro, thanks for testing and for your feedback!

Your feedback is very important since the BUS/SCS integration was only partially tested so far.
To understand better why feedback from network does not work for you, would you be able to:

  1. set log level to DEBUG:
    • from Karaf console (more info here):
      • log:set DEBUG org.openhab.binding.openwebnet
      • log:set DEBUG org.openwebnet
  2. stop openhab
  3. start openhab
  4. switch ON a light from PaperUI (or HABPanel / Basic / Classic UI)
  5. switch the same light OFF from the physical switch

and send me the log?

thanks!
Massimo

Hi Massimo,
I’ve test your binding with the scs bus and the zigbee dongle 3578.
Items bus Scs:
F454 => Webserver
F411/2 => Lighting or Automation Actuator
Items Zigbee:
3578 => Dongle USB Bticino
088306 => Lighting Actuator
067263 => Automation Actuator (Celiane)

The lighting actuators bus and lighting actuators zigbee works in openhab.
But the status of the actuators (SCS) bus is not updated when using a button on the SCS bus => NOK
The status of the actuators zigbee is updated for using a remote control (zigbee) for example => OK

Detection:
Scs: The actuators have been detected with the adress A-PL (2 or 4 digits) ex: A=1 PL=2 or A=10 PL=12
Zigbee ; All actuators (Lighting or Automation) have been detected.
The Actuators Automation is unknow in system (Normal Currently)
Ex:
OpenWebNet GENERIC Device (WHERE=759452900#9)
OpenWebNet Generic Device

An OpenWebNet Generic Device.

Status: UNINITIALIZED - HANDLER_MISSING_ERROR

It’s a good job for a start

Thanks

Thanks Arnaud!
Your feedback is particularly useful because you have a mixture of SCS and ZigBee, so I am particularly interested (this new binding was designed just for that!).

If I understand correctly your only error is that SCS monitoring (feedback) is not working , same as happened to @Faro above.

Would you be able to remove all things (not just from inbox, also from PaperUI Things menu) , set the log level to debug as explained above and start again with a new discovery of both SCS and Zigbee devices?
And then follow the instructions I sent to Faro (first activate the SCS device from OH and three from the physical device).

And send me the log, as private message if you prefer?
I will analyze the log and try to understand why monitoring is not working .
I have some suspect but I need your log to confirm.

Thanks
Massimo

Thank you Massimo for this effort, I was really hoping for a binding like that!!!

I tried to use it with Myhomeserver1 but I receive this error:

It is probably related to the Myhomeserver1 requiring an alphanumeric password

Please let me know if you need more info, I would really like to help with the testing
Thanks,
Enrico

1 Like

Hello Enrico,
thanks for your feedback. Support for string passwords (Test1234) is not there yet, but if you provide me the logs at DEBUG level, it will help to understand the solution.
Here are the instructions:

  1. remove the current BUS/SCS Gateway thing
  2. set log level to DEBUG:
    • from Karaf console (more info here):
      • log:set DEBUG org.openhab.binding.openwebnet
      • log:set DEBUG org.openwebnet
  3. stop openhab
  4. start openhab
  5. start a new discovery from Inbox
  6. add manually a new BUS/SCS gateway

and then send me the log here, or even better as private message.

Bye,
Massi

Hello Enrico,

The MyHomeServer1 is not a gateway openwebnet.
It is only used with Legrand cloud and applications “MyHome_Up”

Regards

@enrico.mcc can you do a very quick test?
Download from BTicino this client:
https://www.myopen-legrandgroup.com/developers/ then tab TOOLS then download and run OpenWebNet Client - Windows (exec file is OpenWebNet_Client.exe).
There you can put the IP address of your MyHomeServer1 and text password, select HMAC and the click on the green OpenEvent button.
If the near button Event Connected becomes red, then your client is connected to MyHomeServer1 and you can try to activate any of your physical devices and you should be able to receive events on the log window below the buttons.
Can you the test it and tell us what happens (may post an image)?
If you succeed in connecting and receiving events on the client, the MyHomeServer1 can be used as OpenWebNet gateway !
Thanks,
MASSI

It works! :champagne:

But I have no idea on how can I make the binding work using HMAC authentication :roll_eyes:

Excellent! :v: than you have a OpenWebNet gateway in your setup!
I am already working on implementing HMAC (text passwords) authentication in my new OH2 BTicino binding, exactly to support also these gateways.
Another 2 quick test to try:

  1. try switching on/off a light from the command.
    • In the “Frame” input box of the client put for example *1*0*WHERE## to switch OFF (1->to switch ON), where WHERE is the address of you light actuator (for example A=1, PL=1 becomes WHERE=11).
      Can you do this command test as well? Just to be sure that MyHomeServer1 does support both feedback and commands from OpenWebNet protocol.
  2. another test is to discover devices: just send the status query:
    • *#1*0## and you should receive a status response for every light actuator in your setup environment, with all WHERE addresses just before the final ## of each Open Message.
    • *#2*0## and you should receive a status response for every shutter actuator in your setup environment

Also if you can post snapshot images of the client in the 2 tests would be useful to understand (especially the response for the shutter status response).

Bye!
Massi

Hi Arnaud, do you have an official page/doc where it is said that MyHomeServer1 does not support OpenWebNet? This would be strange as from the test by @enrico.mcc the server does actually respond to a login handshake (HMAC, text password) and sends events to a client.
Cheers,
Massi

Here are the results, everything is working: :smiley:
Switch command

Light status:

Shutter status:

Hello Massimo,

This looks great.

I installed your binding but the discovery doesn’t detect my Zigbee 3578 dongle.

it seems the dongle is identified by the system and connected on /dev/ttyUSB0

Any idea what could be the problem?

Hi @rbroudo.
One possibility is that the USB port is not accessible by openHAB. To check this, in the binding README I wrote:

  • as for the Serial binding, if you run OH2 on Linux to access the USB/serial port you might require that you add the openhab user to the dialout group to grant permission to read/write to the serial port:
sudo usermod -a -G dialout openhab

the user will need to logout from all login instances and log back in to see their new group added. If you add your user to this group and still cannot get permission, reboot Linux to ensure the new group permission is attached to the openhab user.

Please try this first.

If this also does not work, please set log level to DEBUG (find instructions previously in this thread), start a new dongle discovery and send me the logs here via private message.

Bye!
Massi

Hi @massi,

Thank you so much for your advice it really pointed me in the right direction.
It was indeed an access problem.
The ttyUSB0 device was created with permission to the user: root and group: root and not the group: dialout.

Once I changed the permissions (I still have to find out how to make this change permanent) the 3578 dongle was discovered and so were the light switches.

Are you going to add support the shutter switches (Up,Down,Stop) anytime soon?

Thanks again for your help and great work.

Ran

Hi,

Happy that it worked also for you!
The serial port permissions depend on your installation. In my case I use Linux and installation from packages (apt install) and openHAB is executed by the openhab user. After setting this user to be member of the dialout group (see command above), the setting became permanent.

Yes, already working on that.
Stay tuned for a new version!

Massi

Working like a charm with google home!! Thank you! How can i remain up to date to the new features?
Theres the possibility in the future to support even the termostat?

Thanks for you wonderful work!

1 Like

Thanks @jkendan !
Please can you give back some info about your setting? so that we know what works and what not.

  • are you using BUS or radio ZigBee devices, or both?
  • in case of BUS, which BTicino Gateway have you tested? (F453? F454? , …). With password or with IP range?
  • does monitoring/feedback work for you? That is: when you switch on/off a light from the physical device, does the status of the device change in openHAB/PaperUI ?

This info is helpful to get some stats about what is working and what not!

The final goal is to have LIGHTING, AUTOMATION and THERMO all supported, as in the BTicino v1 binding.

It would be very useful to get some logs from your installation to test all cases. If you are available to help, please send me a PM and I will tell you which tests/logs are useful.

Bye Thanks,
Massi

I use a Bticino gateway F454, i’ll send more informetion via PM after doing this test. Can you send me the instruction via PM to give you the right logs? I’m new on the forum it seems i can’t send pms right now.

Thanks