HASS, Somfy RTS blinds and RFLink

I’m struggling to automate my Somfy RTS blinds and could do with help if anyone is able to, please.

I have an RFLink gateway and WiFi coupler installed and working. The RFLink has been paired and programmed and I can control the blind using the RFLink Loader v1.11. The ID I gave it is the one in the example, 0F0F0F.

The WiFi Gateway NodeMCU is configured to use port 9999 on ESPeasy R1.47 following the instructions on the NoDo website.

On HASS (running on an Ubuntu server) I have the RFLink configured in configuration.yaml as follows:

rflink:
  host: 192.168.10.190
  port: 9999
light:
  - platform: rflink
    automatic_add: true

I have created a cover in configuration.yaml and this shows on my HASS UI:

cover:
  - platform: rflink
    devices:
      RTS_0F0F0F_01: 
        name: Lounge Blind

blind

When I restart HASS the log shows that it finds and connects to RFLink:

2019-06-30 06:50:54 INFO (MainThread) [homeassistant.components.rflink] Initiating Rflink connection
2019-06-30 06:50:55 DEBUG (MainThread) [rflink.protocol] connected
2019-06-30 06:50:55 INFO (MainThread) [homeassistant.components.rflink] Connected to Rflink

Hitting the cover buttons show in log:

2019-06-30 06:53:22 DEBUG (MainThread) [homeassistant.components.rflink] Sending command: DOWN to Rflink device: RTS_0F0F0F_01
2019-06-30 06:53:22 DEBUG (MainThread) [rflink.protocol] sending command: {'protocol': 'RTS', 'id': '0F0F0F', 'switch': '01', 'command': 'DOWN'}
2019-06-30 06:53:22 DEBUG (MainThread) [rflink.protocol] writing data: '10;RTS;0F0F0F;01;DOWN;\r\n'
2019-06-30 06:53:22 DEBUG (MainThread) [rflink.protocol] waiting for acknowledgement

But the blind does not move.

What am I missing?

While writing the above I noticed again the 2019-06-30 06:53:22 DEBUG (MainThread) [rflink.protocol] waiting for acknowledgement and am wondering if, perhaps the problem is between the NodeMCU and RFLink Gateway - as it seems the HASS can see the NodeMCU so that part of the link appears to be working. I’ll double-check that part of the configuration but would appreciate any help at all in the mean time.

Thanks.

I’m convinced there is something wrong with the NodeMCU / ESPEasy configuration but I can’t figure out what it is yet - if anyone has successfully done this could you please share the settings you used?

Thanks.

Well, after quite a few attempts to reprogramme the NodeMCU with ESPEasy I left it for a few hours. Returned and it was working. Very strange! I can only imagine that the NodeMCU took a while to initialise properly.

Anyway, as it was so hit-and-miss setting it up I’ll try to write it up for others - it seems steady now.

Hello,

I’m dealing with similiar scenario and I can’t get it work in HAAS.

I have:

I put it together and it works with commands from RFLinkLoader.

10;RTS;0F0F0F;0;DOWN; (screen goes down)
10;RTS;0F0F0F;0;UP; (screen goes up)

Now I’m trying to add it to home-assistant. Configuration is similiar to yours:

# RFlink                                                                                                               
rflink:                                                                                                                   
  host: 10.0.0.54                                                                                                         
  port: 9999                                                                                                            
light:                                                                                                                    
  - platform: rflink                                                                                                        
    automatic_add: true

cover:                                                                                                                      
  - platform: rflink                                                                                                        
   devices:                                                                                                                  
     newkaku_0000c6c2_1:                                                                                                       
       name: Bedroom

ESPeasy R1.47 configuration:

  • Protocol under config is -Standalone-
  • Setting in Devices tab
    • Device: Serial Server
    • Name: RFLINK
    • TCP Port: 9999
    • Baud Rate: 57600
    • Data bits: 8
    • Parity: No parity
    • Stop Bits: 1
    • Reset target after boot:
    • RX Receive Timeout (mSec): 0
    • Event processing: RFLink

When I try to use it from home-assistant, blinds do nothing and this is in home-assistant log:

2019-08-12 10:44:19 INFO (MainThread) [homeassistant.components.rflink] Initiating Rflink connection
2019-08-12 10:44:19 DEBUG (MainThread) [rflink.protocol] connected
2019-08-12 10:44:19 INFO (MainThread) [homeassistant.components.rflink] Connected to Rflink
2019-08-12 11:19:45 DEBUG (MainThread) [homeassistant.components.rflink] Sending command: UP to Rflink device: newkaku_0000c6c2_1
2019-08-12 11:19:45 DEBUG (MainThread) [rflink.protocol] sending command: {'protocol': 'newkaku', 'id': '0000c6c2', 'switch': '1', 'command': 'UP'}
2019-08-12 11:19:45 DEBUG (MainThread) [rflink.protocol] writing data: '10;newkaku;0000c6c2;1;UP;\r\n'
2019-08-12 11:19:45 DEBUG (MainThread) [rflink.protocol] waiting for acknowledgement
2019-08-12 11:19:46 DEBUG (MainThread) [rflink.protocol] received data: 2
2019-08-12 11:19:46 DEBUG (MainThread) [rflink.protocol] received data: 0;02;OK;
2019-08-12 11:19:46 DEBUG (MainThread) [rflink.protocol] got packet: 20;02;OK;
2019-08-12 11:19:46 DEBUG (MainThread) [rflink.protocol] decoded packet: {'node': 'gateway', 'protocol': 'unknown', 'ok': True}
2019-08-12 11:19:46 DEBUG (MainThread) [rflink.protocol] command response: {'node': 'gateway', 'protocol': 'unknown', 'ok': True}
2019-08-12 11:19:46 DEBUG (MainThread) [rflink.protocol] packet acknowledged

I think there is something wrong with my ESPeasy configuration. Can you please share your setup there?

I just noticed that home-assistant command is different in our cases:

# your log output
sending command: {'protocol': 'RTS', 'id': '0F0F0F', 'switch': '01', 'command': 'DOWN'}
# my log output
sending command: {'protocol': 'newkaku', 'id': '0000c6c2', 'switch': '1', 'command': 'UP'}

But I have no Idea what could be wrong…

Thank you.

Got it woking. My bad… All I had to do is give it correct name in HA configuration file. RTS_0F0F0F_01 instead of newkaku_0000c6c2_1.

cover:                                                                                                                      
  - platform: rflink                                                                                                        
   devices:                                                                                                                  
     RTS_0F0F0F_01:                                                                                                       
       name: Bedroom

Glad you got it working. Very keen on how it works for you with that configuration long term.

Mine was never reliable using Ubuntu, Docker and NodeMCU. Eventually replaced the NodeMCU with a Raspberry Pi and it has been as solid as a rock!

I hope you can point me in the right direction, I’m unable to configure Home Assistant with my RFLink and EspEasy. Everything seems to be working, but the sensors and switches do not appear in Home Assistant.
This is how EspEasy is set up, and what’s showing in RFLink uploader:

Configuration.yaml:

#RFLink
rflink:
  host: 192.168.88.164
  port: 8989
  wait_for_ack: true

#RFlink sensors
  - platform: rflink
    automatic_add: false
    devices:
      02a4_temp:
        name: Outside Temperature
        sensor_type: temperature
      02a4_hum:
        name: Outside Humidity
        sensor_type: humidity
      02a4_bat:
        name: Outside Sensor Battery
        sensor_type: battery

I have also tried with bl999_02a4_temp, …
I have also tried auto_discovery with automatic_add: true.

EspEasy seems to be getting the data from RFLink as the log shows:
31802881: WD : Uptime 530 ConnectFailures 0 FreeMem 20568 WiFiStatus 3
31814960: EVENT: !RFLink#
31814971: EVENT: !RFLink#adioFrequencyLink - RFLink Gateway V1.1 - R48;
31820525: EVENT: !RFLink#
31820533: EVENT: !RFLink#RadioFrequencyLink - RFLink Gateway V1.1 -
31820541: EVENT: !RFLink#
31824053: EVENT: !RFLink#
31824061: EVENT: !RFLink#S;setRF433=ON;setNodoNRF=OFF;setMilight=OFF;
31824069: EVENT: !RFLink#ingColors=OFF;setAnsluta=OFF;setGPIO=OFF;
31824079: EVENT: !RFLink#=OFF;setMysensors=OFF;
31864652: EVENT: !RFLink#
31864660: EVENT: !RFLink#ID=41;SWITCH=1;CMD=ON;
32321956: EVENT: !RFLink#
32321964: EVENT: !RFLink#ID=02a4;TEMP=0084;HUM=74;BAT=OK;

Home assistant log shows Rflink to be connected, but not getting any data, apparently:
2019-10-24 08:38:17 INFO (MainThread) [homeassistant.components.rflink] Initiating Rflink connection
2019-10-24 08:38:22 INFO (MainThread) [homeassistant.components.rflink] Connected to Rflink

But still, no data is displayed in Home assistant, the sensors show “Unknown”.

Any ideas, where it went astray?
Thanks.

Registered an account just to say thank you for this thread, after a long time searching by myself for the integration of my Somfy blinds in HASS this thread has helped me discover the error in my config and all is working now! I know this is an old thread and reviving it might be frowned upon, my apologies in that case but I really wanted to offer my thanks

Great thread. Sorry to revive it also after 1+ year but I’m just configuring an RFLink integration for my Somfy shade. I managed to get it working and even recognized in Alexa, but right now it’s just an up7/down device. The rest of my covers (KNX and Shelly) can be controlled with percentages… Is there anything that can be added to the configuration to enable that feature?
All I have for now is this:

  - platform: rflink
    devices:
      RTS_0A0A0A_0:
        name: Toldo terraza
        aliases:
          - rts_8d5336_01 # ID of the remote control
        #type: inverted

Hi! Maybe this custom component does the trick: GitHub - nagyrobi/home-assistant-custom-components-cover-rf-time-based: Time-based cover with customizable scripts or entity to trigger opening, stopping and closing. Position is calculated based on the fraction of time spent by the cover traveling up or down. State can be updated with information based on external sensors.

Thanks! This looks great! I was somehow expecting this was included out of the box on the RFLink cover integration as it is (if I remember correctly) on the knx.cover integration…

Seeing as they are similar components, perhaps the code could be ported from one to the other? I’m a java guy, but might as well try to get a look at the code and maybe give it a try.

The problem with the custom component is that it probably won’t react to the physical remotes (the one I’m listing in the ‘aliases’ configuration), so the state can get lost if I use both the integration and the remote…

🤷 I don’t know RFLink at all so can’t say anything about that.
But I can assure that this custom component already uses the same code as the knx integration where it is burried deep in the knx driver xknx, not in the HA integration.
See xknx/travelcalculator.py at 03434ac32315823fd96bdd6c35532ec36bc7c0a1 · XKNX/xknx · GitHub
or the custom components code as they just copied the module :rofl: (but iirc a bit older version)
Integration breaks built-in KNX integration · Issue #50 · nagyrobi/home-assistant-custom-components-cover-rf-time-based · GitHub

1 Like