OpenHAB CULfw for Somfy RTS Rollershutters

you mean the implementation or the current configuration based on the code?

I mean the implementation, how to implement your somfy solution.

Hi Daniel,

some time is gone, this weekend i´ll have time to play around with OH.
How can I implement your solution?

Thx, Peter

Hi Peter,

sorry I was off for a while. As the solution is not perfect (yet) the solution existed of two steps:

  1. Learning the remote and shutter
    I used the code in my sample repo https://github.com/weisserd/serial-cul-test for learning the remote control. Therefore I manually set an address in the code and the control to P for programming. Then I set the shutter to programming mode and ran the program. The address is then needed for step 2.
  2. Here I used the address and then added my plugin to the OpenHAB installation. Via the paper UI I added a CUL interface and then based on the CUL interface a Shutter item:
    Rollershutter Shutter_Room "Room" {channel="somfycul:somfydevice:a59165d2:position"}

Hope this helps

Cheers
Daniel

Hi together,
I have a basic question regarding this topic: If I own e.g. a CC1101-USB-Lite 868MHz and I have a Somfy remote for my sunblind/marquise, would it be possible to just use OH2.3 to control the sunblind/marquise using the approach described above? Or do I need something in addition?
For now I have just the option to use the Somfy remote control manually if I want to drive the blind. Thanks for clarification!
Cheers,
Ben

Hi Ben,

with a couple of new additions I have a solution running just with a OpenHAB 2.2 / 2.3 instance.
Therefore I adapted a couple of things in the github repo mentioned above, packaged the binding and put it into the Eclipse marketplace: https://marketplace.eclipse.org/content/somfy-rts-cul-binding

The installation worked for me as follows:

  1. Install the binding into your OpenHab installation (see Distributing bindings through the IoT Marketplace)
  2. Add the appropriate things to your config (*.things)
somfycul:culdevice:cul [ port="/dev/ttyACM0" ]
somfycul:somfydevice:esslinks (somfycul:culdevice:cul)
  1. Add a rollershutter as a switch to your sitemap for programming the switch (*.items and *.sitemap)
Switch       Shutter_Ess_Links         "Eßzimmer links"  (somfyFF) {channel="somfycul:somfydevice:esslinks:program"}  
  1. Set the rollershutter to programming mode via your remote (should go up and down slightly)
  2. Press the switch in your sitemap (the rollershutter should go up and down slightly for confirmation)
  3. Change the rollershutter in your items and sitemap to a rollershutter :wink:
Rollershutter       Shutter_Ess_Links         "Eßzimmer links"  (somfyFF) {channel="somfycul:somfydevice:esslinks:position"} 

This is how I set up all my rollershutters in my house now via a CUL.

Cheers
Daniel

1 Like

Hi Daniel,
thanks a lot for the explanation. I’m quite excited to try it. However, first I have to get the Stick and then I’m going to test it and will report back here.
Cheers,
Ben

Hi,
I tried to learn in my marquise, however it didn’t work yet. The CUL is known to openhab, I have also added things and item. From the log everything seems to be fine. Where I struggle is the actual learning process. If I hold the “my” key on the remote there is no reaction of the actuator. If I press the “reset” Button on the backside of the remote the marquise is responding with a short up/down as supposed to with the “my” Button, I guess. What I also read in the manual of the remote is that for learning new devices, the new remote should be less than 30cm away from the receiver. Is that a constraint which must be met? Any ideas, why the my button is not acting as supposed?
Thanks again!
Cheers,
Ben

Hi Ben,

could you post the output from the logs?

As far as I understood the problem seems currently not with the OpenHab learning but setting the shutter to learning mode?

The constraint with the 30cm of the new remote is definitely not a problem. E.g. my remote (CUL stick) is at least 8m away from the shutter (with a couple of walls in between).

Cheers
Daniel

Hi Daniel,

thanks for your reply. I guess it is no issue with openhab or the binding, it seems indeed to be a problem in setting the shutter to learning mode. However, here is the log output:

2018-03-02 22:27:43.791 [INFO ] [ing.somfycul.handler.SomfyCULHandler] - channelUID: somfycul:somfydevice:terrasseMarqu:program, command: ON
2018-03-02 22:27:43.794 [INFO ] [.binding.somfycul.handler.CulHandler] - Send message YsA1800006000001 for thing somfyDeviceLabel
==> /var/log/openhab2/events.log <==
2018-03-02 22:27:43.804 [vent.ItemStateChangedEvent] - Shutter_Terrasse changed from OFF to ON
==> /var/log/openhab2/openhab.log <==
2018-03-02 22:28:23.802 [INFO ] [ing.somfycul.handler.SomfyCULHandler] - channelUID: somfycul:somfydevice:terrasseMarqu:program, command: OFF
2018-03-02 22:28:23.806 [INFO ] [.binding.somfycul.handler.CulHandler] - Send message YsA1800007000001 for thing somfyDeviceLabel
==> /var/log/openhab2/events.log <==
2018-03-02 22:28:23.802 [ome.event.ItemCommandEvent] - Item ‘Shutter_Terrasse’ received command OFF
2018-03-02 22:28:23.816 [vent.ItemStateChangedEvent] - Shutter_Terrasse changed from ON to OFF

I think it is looking normal.
Nevertheless, I’m glad that the 30cm rule is not to be taken that serious, I rather wont dismount my RPi and carry it to the shutter. I’ll try again to set the shutter to learning mode tomorrow, hopefully with a little bit more luck.
Cheers,
Ben

Hi Ben,

the log looks the same as my log file. So a trigger of the ON/OFF Event for programming and then the appropriate programming command (8 in the message - http://culfw.de/commandref.html#cmd_Y).

For reference I’m working with a Somfy Oximo 50 RTS motor and a Somfy Centralis RTS remote.

Cheers
Daniel

Hi Daniel,
it took some time to try again, but still I’m not successful. I tried different things in order to put the shutter into learning mode. I don’t no the motor type, but I have the Somfy Telis 1 RTS Pure as remote control. I tried various methods to put the system into learning mode:

  • press the up and down buttons together -> no reaction
  • turn of power for 3 seconds, turn on for 10seconds, and again for 3 seconds -> no reaction
  • press the rear button on the remote -> at least a short up and down of the shutter
    After all that methods I tried to use the item/switch combination, however, no success. My question now: Is there any type of confirmation after the learning process was successful? Or is the protocol silent here?
    I’m again attaching the log with debug output turned on. Maybe you still have some idea?

Thanks again,
Ben

2018-03-10 09:46:52.079 [INFO ] [ing.somfycul.handler.SomfyCULHandler] - channelUID: somfycul:somfydevice:terrasseMarqu:program, command: ON

2018-03-10 09:46:52.085 [DEBUG] [ing.somfycul.handler.SomfyCULHandler] - rolling code before command 0028

2018-03-10 09:46:52.091 [INFO ] [.binding.somfycul.handler.CulHandler] - Send message YsA1800028000001 for thing somfyDeviceLabel

2018-03-10 09:46:52.097 [DEBUG] [.binding.somfycul.handler.CulHandler] - Trying to write ‘YsA1800028000001’ to serial port /dev/ttyUSB0

2018-03-10 09:46:52.134 [DEBUG] [ing.somfycul.handler.SomfyCULHandler] - Updated rolling code to 0029

2018-03-10 09:47:06.723 [INFO ] [ing.somfycul.handler.SomfyCULHandler] - channelUID: somfycul:somfydevice:terrasseMarqu:program, command: OFF

2018-03-10 09:47:06.735 [DEBUG] [ing.somfycul.handler.SomfyCULHandler] - rolling code before command 0029

2018-03-10 09:47:06.748 [INFO ] [.binding.somfycul.handler.CulHandler] - Send message YsA1800029000001 for thing somfyDeviceLabel

2018-03-10 09:47:06.752 [DEBUG] [.binding.somfycul.handler.CulHandler] - Trying to write ‘YsA1800029000001’ to serial port /dev/ttyUSB0

2018-03-10 09:47:06.772 [DEBUG] [ing.somfycul.handler.SomfyCULHandler] - Updated rolling code to 002A

2018-03-10 09:47:19.323 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model ‘somfy.items’

2018-03-10 09:47:19.435 [INFO ] [ing.somfycul.handler.SomfyCULHandler] - channelUID: somfycul:somfydevice:terrasseMarqu:program, command: REFRESH

2018-03-10 09:47:19.438 [.ItemChannelLinkAddedEvent] - Link ‘Shutter_Terrasse-somfycul:somfydevice:terrasseMarqu:program’ has been added.

2018-03-10 09:47:19.455 [temChannelLinkRemovedEvent] - Link ‘Shutter_Terrasse_learn => somfycul:somfydevice:terrasseMarqu:program’ has been removed.

2018-03-10 09:48:23.876 [INFO ] [ing.somfycul.handler.SomfyCULHandler] - channelUID: somfycul:somfydevice:terrasseMarqu:program, command: DOWN

2018-03-10 09:48:34.181 [INFO ] [ing.somfycul.handler.SomfyCULHandler] - channelUID: somfycul:somfydevice:terrasseMarqu:program, command: UP

2018-03-10 09:48:46.101 [INFO ] [ing.somfycul.handler.SomfyCULHandler] - channelUID: somfycul:somfydevice:terrasseMarqu:program, command: DOWN

Hi Ben,

the rear button seems to be the right solution.

A short up and down of the shutter confirms the setting to program mode (at least with my shutters). When I then press the switch with the bound programming item the shutter moves up and down again to confirm that it recognized the new remote.

Cheers
Daniel

Hi Daniel, hi all
I try to install my selfmade CUL (433 Hz) in order to control my somfy rollershutters (remote: Telis 6 Chronis S RTS).
First I cannot install the binding from the marktplace. I have understood how to do it, and with another binding it works bot not with yours. So I downloaded the .jar file and placed it in the addon folder and rebooted the pi (openhabianpi, RP3b+).
I configured all the way you mentioned on your post from Feb 20.
When I set the rollershutter in programming mode via the switch at the wall after unmounting the cover (which leads to the programming mode without the remote), it goes up and down. After that, I press the switch in my sitemap, but nothing happened.

Is the remote necessary for the procedure?
Is the hole thing installed like it is described in the post from Feb 20?
Can I use your binding in addition to the Intertechno binding with one cul (for a control of a plug; If I installed only the Intertechno binding, the plug is reacting on the signals )?

Here an example of my logs:
2018-04-10 15:52:24.131 [vent.ItemStateChangedEvent] - Shutter_Ess_Links changed from NULL to ON

2018-04-10 15:52:26.505 [ome.event.ItemCommandEvent] - Item ‘Shutter_Ess_Links’ received command OFF

2018-04-10 15:52:26.524 [vent.ItemStateChangedEvent] - Shutter_Ess_Links changed from ON to OFF

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

2018-04-10 15:52:26.527 [INFO ] [ing.somfycul.handler.SomfyCULHandler] - channelUID: somfycul:somfydevice:esslinks:program, command: OFF

2018-04-10 15:52:26.533 [INFO ] [.binding.somfycul.handler.CulHandler] - Send message YsA180000F000001 for thing somfyDeviceLabel

Hi,
I have also tried with Daniels solution but still no luck. If i set the shutter to learning mode with the remote and switch the learning button than nothing happens. The debug log says that the code has been written to the device and the rolling code has been updated, but the learning process did not work. I was wondering if there is some way to debug the procedure somehow? Is the shutter motor unit supposed to send some acknowledge back to the CUL which could be tracked? Is there some other software which could be used to test the procedure?
Any help is really appreciated.
Cheers,
Ben

Hi Ben,

the process of debugging the whole process is painful or sometimes non existent. There is no feedback from the motor unit, so no way of tracing if the command was acknowledged.

For me the process was, that I had a working solution based on FHEM but wanted to replace it with OpenHAB.

Thus some hints can be found below:

Cheers
Daniel

Hi Daniel,
again, it took a while to go into testing, but pressure is gaining due to all the sun now :slight_smile:
In order to test if hardware, firmware, distance, etc. are good I’ve decided to give fhem a try. Here it works. I was using different guides, but this one here should be sufficient: https://forum.fhem.de/index.php?topic=45569.0 and https://wiki.fhem.de/wiki/Somfy_via_SIGNALduino. I still use a nanoCUL 863 instead of signalduino. However, I don’t want to have a second system to maintain and I also don’t like the “style” of fhem. I would really like if this is going to work in openhab as well and I’m sure it must!
One thing I was wondering about, but couldnt check because I cannot look into the sources of the binding: in fhem some attributes for the stick will be set like slowRF and also the SOMFY protocol like shown here:

I guess the binding will take care about this, right? Can I check it somehow? And one other thing, due to my tests I have a rolling code which is always increasing. Is there a possibility to reset it? Or is this no problem at all as long as the shutter is not trained?

Thanks for help and advice as always.
Cheers,
Ben

Hi Ben,

the sources of the binding can be found at: https://github.com/weisserd/openhab2-addons/tree/feature_somfycul

The binding uses a fixed encryption key - as this seems to work - at least for me the last 6 months :wink:

The rolling code is updated and can bei easily seen (and edited - reloaded after an OpenHAB restart) in the config file (see folder %USERDATA/somfycul/SHUTTER_UID.properties). I had the same problem when switching from FHEM to OpenHAB, so I decided to have the rolling code easily available.

Cheers
Daniel

@Daniel_Weisser : Wanna try your binding - come from FHEM and there my Markise runs with CUL - now i switch to OH2 and searching for a solution found this thread - but cant find your binding via OH2 and eclipse IOT marktplace just find Somfy Tahoma Binding but not yours :frowning:

hi @black0r1337,

it should be reachable via the marketplace. However it is tagged as Alpha and thus you probably have to change the configuration of the marketplace settings: https://www.openhab.org/docs/configuration/eclipseiotmarket.html#configuration

And maybe I should come up with a plan to further develop and/or integrate it directly into OpenHAB. Because it is currently in the state “Works for me”. But if there are any questions don’t hesitate to ask.

Cheers
Daniel