YET another time controlled cover (RFLink)

Absolutely yes.
I have done with my covers, a new id to control 3 covers and a new id to control 2 cover (in addition to the IDs of each cover).

You have to put in pairing mode one by one.
In other words,

  • put cover1 in pairing mode, with your remote or using the exclusive ID from RFLink
  • pair the new RFLink ID, cover must react to the new code
  • be sure to finish the pairing mode

It is very important that you put only one cover in pairing mode at a time and make sure the pairing mode ends before you go to the next cover.
The process is exactly the same as if you use a new remote, you can get some hints from internet.

Yeah thanks man, figured that out from your first reply, appreciate the pointer - making use of your version for handling position control anyway thanks!

Is this compatible with HA 0.113 which add breaking changes to rfxrtx configuration files?

Although I have not yet updated HA to v0.113 this CC only shares a common library with the rfxrtx module, the rest of the implementations are independent, so there should be no problems.
Anyway I have reviewed the library and the classes I use have not been changed:

So, I think that it is safe to update.

Hey Javicalle,

Why don’t you formalize your RTS RFLink in HACS?

Hey,

I had the version of your rf link 0.0.51 which worked fine, I wanted to replace it with the version 0.0.52. So I replaced the 3 files in the rf_link directory with the new ones and I rebooted. Since then, shutter controls no longer work with the following error:

Cannot send command, not connected!
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 125, in handle_call_service
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1308, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1343, in _execute_service
    await handler.func(service_call)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 208, in handle_service
    await self.hass.helpers.service.entity_service_call(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 454, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 583, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 485, in _handle_entity_call
    await result
  File "/config/custom_components/rts_rflink/cover.py", line 255, in async_open_cover
    await self._async_handle_command(SERVICE_OPEN_COVER)
  File "/usr/src/homeassistant/homeassistant/components/rflink/__init__.py", line 498, in _async_handle_command
    await self._async_send_command(cmd, self._signal_repetitions)
  File "/usr/src/homeassistant/homeassistant/components/rflink/__init__.py", line 519, in _async_send_command
    raise HomeAssistantError("Cannot send command, not connected!")
homeassistant.exceptions.HomeAssistantError: Cannot send command, not connected!

Thanks for your help

I’d really like to add it to the official RFLink implementation, but I didn’t know how to solve the schema modification.
Maybe if I finish another change that I have planned, I will resume it.

From your logs you can see that the rts_rflink component is talking to the rflink component.
I would say that the problem is that the hub (for whatever reason) is not connected.
If you haven’t already, reboot the RFLink hub and check the boot traces to see if it gives you any clues.
Do you have your RFLink configured with the by-idport? The ttyUSB can change within reboots.

The rflink module works because I receive the signal from the Somfy remote controls in the logs.
By putting the old rflink and rts_rflink directories back, everything works again.

Have you also copied the RFLink component files to the custom_components folder?

In that case, you have to modify the line:

from homeassistant.components.rflink import (

so that it points to your local configuration:

from custom_components.rflink import (

Could this be your problem?

Hey,

Effectively, the rflink directory is in the custom_components directory and I didn’t modify the line for the new cover.py file. I will change the line ASAP.
Is it essential to have a copy of the rflink directory if you don’t modify the line?

Thank you for your help.

No, it is not.
I think in some of the previous versions I had it that way, but the current implementation is meant to use the ‘official’ module.

Thanks for this effort here, really appreciate, anyway, I’m having the problem running this with the last HA version 0.115.x. Seems there are some changes at the core. Anyone running this custom component with the latest version?

What is the problem you have?

EDIT: There have been significant changes in the library used (shared with rfxrtx xknx).
I will take a look at the changes to understand the scope, but it is very possible that it will affect the CC

It seems it’s not loading after the upgrade to the 0.115.x… the latest 0.114 is running fine.

Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 201, in _async_setup_platform
    await asyncio.gather(*pending)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 310, in async_add_entities
    await asyncio.gather(*tasks)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 481, in _async_add_entity
    await entity.add_to_platform_finish()
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 521, in add_to_platform_finish
    await self.async_added_to_hass()
  File "/home/homeassistant/.homeassistant/custom_components/rts_rflink/cover.py", line 147, in async_added_to_hass
    await super().async_added_to_hass()
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/rflink/__init__.py", line 372, in async_added_to_hass
    in self.hass.data[DATA_ENTITY_LOOKUP][EVENT_KEY_COMMAND][self._device_id]
KeyError: 'rflink_entity_lookup'

Would you be so kind as to take the following test?

In the CC manifest.json file, modify the value of the following line:

   "dependencies": ["rflink"],

Thanks in advanced.

That did the trick, it’s loading the component now. Thanks a lot for this workaround/fix.

I just updated the CC to the latest version of the xknx library which introduces changes in the position calculation.
For those that work well for you, it is not necessary to update the code, since it does not add functionalities or fix bugs.

@javicalle, that’s sound big stuff. Congratulations.

I discovered your post because I aml looking for the same custom component but with rfxrtx. I have a USB RFXCOM RFXtrx433E to pilot SOMFY RTS rolling shutters.

Can you advice me some other CC or adaptation to yours ?

I am a newbie in Home Assistant but I am not afraid at code lines.

I have had a look and adapting the implementation is not trivial. It is not complicated because both integrations are quite similar, but you have to take a lot of code (the configuration, initialization and new functionalities).

I can try to help you if you want to implement it on your own.

The other CC I know I don’t think are a good fit:

1 Like