OpenHAB CULfw for Somfy RTS Rollershutters

Hi Daniel, hi Michael,

I checked the cul firmware version issuing ‘V’ :
‘3.3.1 SIGNALduino cc1101 (chip CC110 unknown) - compiled at Dec 3 2019 19:40:46’
CC1101 should offer a frequency switch from 433.92 MHz to 433.42 MHz, but I did not find the command for that.
My cul was delivered with a-cul FW 1.26.08 and I flashed it to SIGNALduino because it did not work with this FW as well.

I’m now using binding ‘org.openhab.binding.somfycul-2.5.1-SNAPSHOT.jar’

-> No success with openHAB.

Controlling the shutters with FHEM I observed in the logs that the lower nibble of the encryption key is not fix but always corresponds to the lowest nibble of the rolling code. I don’t know whether this is important.
Again I’m out of ideas how to proceed.

Best regards
Joachim

Hi @Michael_Schmidt, hi @Joachim1305,

I’m using a CC1101 - Busware stick with culfw 1.67. And yes according to the Perl FHEM code with the checking for signaduino, there seem to be a lot of differences.

Just some more information on how I got my configuration running.

So after all the simple checks with my stick and some reverse engineering of the Perl code all I did was just using a new address, setting the rolling to code to 0000 and the command to 8 (prog) in the Java code.

 // C - Command (1 = My, 2 = Up, 4 = Down, 8 = Prog)
 String command = "8";
 String rollingCode = "0000";
 String address = "000029";   

Then I put the shutter to learning mode, and after running the Java program, it confirmed the new remote and I was good to go.

Cheers
Daniel

Hi Daniel, hi Michael,

today I

  1. flashed my cul with culfw 1.67,
  2. set cul.things to
    somfycul:culdevice:cul [ port="/dev/serial/by-id/usb-SHK_NANO_CUL_433-if00-port0", baudrate=“38400” ]
    somfycul:somfydevice:markise (somfycul:culdevice:cul)
  3. modified file /var/lib/openhab2/somfyculsomfycul_somfydevice_markise.properties to
    address=000029
    rollingCode=000
  4. put the shutter to learning mode
  5. activate and deactivate prog switch
  6. enjoy

@Daniel_Weisser: thank you for your support

Best regards,
Joachim

1 Like

Hi,

Turns out that my stick doesn’t work at all with the cul fw (1.67). I can’t even control my shutters with this configuration in FHEM. This explains a lot.
And the interface as SIGNALduino is simply too different. It has (amongst other issues) a different encoding.

Thanks a lot anyway to all who helped!
Michael

Could anybody upload the newest java version of the bindig have actually no luck with the version of the Dropbox link above :frowning:

also my /var/lib/openhab2/somfyculsomfycul_somfydevice_markise.properties is empty

Could you try https://www.dropbox.com/s/mzy9v0lo7zz7wtu/org.openhab.binding.somfycul-2.5.0.jar?dl=0 ? This is the version that I’m running with my current OpenHAB 2.5.4 installation.

1 Like

Hi,

I am also very interested in that solution. Before I start just one question: Would this work with a LAN or Wifi based CUL too (by putting IP address in things config)?

Best regards
Duddits

is the CUL than exklusive for the somfy binding ? so i cant control my intertechno plugs anymore ?

Hi Duddits,

it just works with a local CUL stick. The address that is given must be a “String” pointing to a local device.

Cheers
Daniel

In the Somfy RTS binding the code for controlling the CUL and the SomfyRTS(es) are bundled. I have made some tests with reusing the same CUL for other purposes and succeeded but I’m currently not using it anymore.

So test with ne new version that you uploaded on dropbox - did exact steps as above - the somfycul_somfydevice_994a8c99.properties are still empty and the markise do nothing with openhab :frowning:

2020-05-06 10:42:03.757 [INFO ] [binding.somfycul.internal.CULHandler] - got port: /dev/ttyACM2

2020-05-06 10:42:03.786 [INFO ] [ng.somfycul.internal.SomfyCULHandler] - Read properties from file /openhab/userdata/somfycul/somfycul_somfydevice_994a8c99.properties

2020-05-06 10:42:03.856 [INFO ] [ng.somfycul.internal.SomfyCULHandler] - channelUID: somfycul:somfydevice:994a8c99:position, command: REFRESH

2020-05-06 10:42:03.856 [INFO ] [ng.somfycul.internal.SomfyCULHandler] - channelUID: somfycul:somfydevice:994a8c99:program, command: REFRESH

2020-05-06 10:42:03.068 [hingStatusInfoChangedEvent] - 'somfycul:somfydevice:994a8c99' changed from UNINITIALIZED to UNINITIALIZED (BRIDGE_UNINITIALIZED)

2020-05-06 10:42:03.752 [hingStatusInfoChangedEvent] - 'somfycul:culdevice:fd1a5e85' changed from UNINITIALIZED to INITIALIZING

2020-05-06 10:42:03.785 [hingStatusInfoChangedEvent] - 'somfycul:culdevice:fd1a5e85' changed from INITIALIZING to ONLINE

2020-05-06 10:42:03.796 [hingStatusInfoChangedEvent] - 'somfycul:somfydevice:994a8c99' changed from UNINITIALIZED (BRIDGE_UNINITIALIZED) to INITIALIZING

2020-05-06 10:42:03.843 [hingStatusInfoChangedEvent] - 'somfycul:somfydevice:994a8c99' changed from INITIALIZING to ONLINE

2020-05-06 10:52:45.337 [INFO ] [ng.somfycul.internal.SomfyCULHandler] - channelUID: somfycul:somfydevice:994a8c99:position, command: UP

2020-05-06 10:52:45.340 [INFO ] [binding.somfycul.internal.CULHandler] - Send message YsA120nullnull for thing Somfy Markise

2020-05-06 10:52:45.343 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.handleCommand()' on 'org.openhab.binding.somfycul.internal.SomfyCULHandler@335a12ee': For input string: "null"

	at org.openhab.binding.somfycul.internal.SomfyCULHandler.handleCommand(SomfyCULHandler.java:114) ~[?:?]

2020-05-06 10:52:54.547 [INFO ] [ng.somfycul.internal.SomfyCULHandler] - channelUID: somfycul:somfydevice:994a8c99:position, command: DOWN

2020-05-06 10:52:54.548 [INFO ] [binding.somfycul.internal.CULHandler] - Send message YsA140nullnull for thing Somfy Markise

2020-05-06 10:52:54.550 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.handleCommand()' on 'org.openhab.binding.somfycul.internal.SomfyCULHandler@335a12ee': For input string: "null"

	at org.openhab.binding.somfycul.internal.SomfyCULHandler.handleCommand(SomfyCULHandler.java:114) ~[?:?]

2020-05-06 10:52:59.001 [INFO ] [ng.somfycul.internal.SomfyCULHandler] - channelUID: somfycul:somfydevice:994a8c99:position, command: STOP

2020-05-06 10:52:59.002 [INFO ] [binding.somfycul.internal.CULHandler] - Send message YsA110nullnull for thing Somfy Markise

ok forget it now its working - WOW !! GREAT !!

But the cul is /dev/ttyACM2 and after a reboot my Jeelink USB Stick disappeard… its ttyUSB1 if i deinstall the jar . jeelink is working again. What could be the problem ?

ok reboot does not bring a solution but a real shutdown and cold start ! for now i will thank you very much !! this binding is a real real good thing for me and my family thanks !

Hello!
Just started thinking of a smarthome today as i am annoyed of all the different remotes i need to control my Somfy/Velux/Novoferm devices.

Did i get that right, that after installing my raspberry i would have to get a c1101 usb stick and your plugin to get my Somfy shutters working with openhab ?

And that this simple usb stick from amazon will get that working ( nanoCUL USB Stick FTDI CC1101 433MHz FW 1.67 FHEM CCU / CCU2 Knick-Antenne FHEM CUL 433 + Adapter ).

Thanks for each reply !

Hi @scotty,

yes that’s exactly the configuration (https://amzn.to/2X6sOuj), that I use.

Cheers
Daniel

Thanks for your reply, I go get the parts, install the Raspberry and maybe come back later to get some more help if you do not mind!

So, finally i got the needed devices, and OpenHAB up an running.

Now I would like to make a simple first test.

I found a nice description how to first off all use a simple input/output test to make sure the communication is working find.

minicom

BTW it use minicom all the time at work, so i am pretty sure how it is meant to work, but I can not connect to the device. There is simply no response.

[08:50:01] root@openhab:~# ls -alt /dev/serial/by-id/
total 0
drwxr-xr-x 2 root root 60 May 30 08:37 .
drwxr-xr-x 4 root root 80 May 30 08:37 …
lrwxrwxrwx 1 root root 13 May 30 08:37 usb-SHK_NANO_CUL_433-if00-port0 → …/…/ttyUSB0
[08:50:20] root@openhab:~#

[ 5.712591] usbcore: registered new interface driver usbserial_generic
[ 5.712652] usbserial: USB Serial support registered for generic
[ 5.743410] usbcore: registered new interface driver ftdi_sio
[ 5.743492] usbserial: USB Serial support registered for FTDI USB Serial Device
[ 5.743823] ftdi_sio 1-1.2:1.0: FTDI USB Serial Device converter detected
[ 5.743996] usb 1-1.2: Detected FT232RL
[ 5.763955] usb 1-1.2: FTDI USB Serial Device converter now attached to ttyUSB0

Any idea what is going wrong ?

I got it working, thanks for your work and support!

Ok So I am very sorry for my stupidity but I think I need some help.
I tried to follow all the steps mentioned here but I guess I did something wrong.
Now I bought a CUL Device NANO CUL 433mhz
and it has the culfw 1,67 firmware and apparently openhub recognizes the Dongle (at least in the PaperUI it is shown as online:
somfyDeviceLabel
somfyDeviceDescription
somfycul:somfydevice:b94fa2ad
But how to continue from here on?
When I moved in I had 2 Somfy Shutters preinstalled.
I have two “remotes” the exact same as shown here:
https://blog.emeidi.com/2019/07/16/somfy-rts-storen-von-einem-pc-aus-steuern/
Is the Dongle correctly installed? I did create a cul.things with

somfycul:culdevice:cul [ port="/dev/ttyUSB0" ]
somfycul:somfydevice:esslinks (somfycul:culdevice:cul)

in it - but I do have no *.sitemap and no *.items - as i only use the habpanel. Do i need the files?
What do I have to do next to get them to work.
Sorry for my stupid questions - this seems a bit hard for me.

Hi Matthias,

you do need the item-Files as you need to have the information that an item is a rollershutter. I don’t use HabPanel, but as far as I know it depends on items as well.

Have you followed the guide above in the comment to program the new remote?

Cheers
Daniel