[BTicino/OpenWebNet] New openHAB2 binding ready for testing

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

Hi, I am a total noob to OpenHab2 and the BTicino binding. So I am sorry if I am asking a very stupid question but maybe it will encourage others to give it a try.

I have MH202 gateway and have installed OpenHab2 on a Raspberry Pi3b using the OpenHab2 image. At first I had some trouble getting the binding visible in the Inbox but managed it in the end. I will describe that problem and the fix at the end of this post for the next noob.

I have the binding installed and followed instructions to set up the binding but after selecting ‘add manually’ I see nothing and nowhere to add the IP address, password etc for the gateway

Log shows this:
018-05-05 11:34:25.440 [INFO ] [ery.OpenWebNetBridgeDiscoveryService] - ==OWN:BridgeDiscovery== ------ startScan() - SEARCHING for bridges…

2018-05-05 11:34:25.452 [WARN ] [ery.OpenWebNetBridgeDiscoveryService] - ==OWN:BridgeDiscovery== onConnectionError() - CONNECTION ERROR: errorCode = NO_SERIAL_PORTS_ERROR

Is it stupid me or is something wrong?

OK… for my initial noob problem.

After starting the Pi with the image and leaving for while to do its thing all seemed good. I copied the binding jar file to the suggested folder using WinSCP but nothing showed in the OpenHab Inbox. I thought maybe it was a permission problem and changed the jar permissions to 4777. Still nothing. Next I tried connecting and copying the binding jar to the Addons folder by Samba share. That worked and now the binding shows in my Openhab Inbox but I cant yet find the place to add the gateway details. See above.

Edit: Started to work now :slight_smile: I thought maybe it was a browser issue so I switched from Chrome to Edge. In Edge I could know see what I needed. Went back to Chrome. Still nothing. Hit refresh and now that works too. Or maybe it was just leaving it for while I mowed the lawn :slight_smile:

1 Like

Thanks @m4rk for testing the binding, and congratulations with your first efforts with openHAB!
So, were you able to connect and discover your devices with your MH202 gateway?
Are you able to control them?
Feedback from BUS is still buggy, but it will be corrected soon…
Bye
Massi

Hi, Cool you replied…thanks

Not only did the binding find a lot of devices, 90, but I got my first rule working :slight_smile: My office light now turns On when my phone is connected to the LAN and Off when it disconnects. I am really pleased with that because I had no idea about the syntax for the rule file and thought it would require a lot of trial and error frustration. Its not so user friendly having to edit files that way but I guess that will improve in time.

1 Like