Problem controlling Somfy blinds via RFXtrx

Hi,

I need some help to get my Somfy controlling via RFXCOM RFXtrx433E.

My configuration.yaml:

rfxtrx:
  device: /dev/serial/by-id/usb-RFXCOM_RFXtrx433_A12ISHOV-if00-port0
  debug: True

switch:
  - platform: rfxtrx
    automatic_add: False
    devices:
      # tuer kueche id 1:01:01 unit code 1
      071a000001010101:
        name: Küche Gartentür
      # kueche nord id 1:01:02 unit code 1
      071a000001010201:
        name: Küche Nord

These two switches appears in the frontend. But when I try to control my Somfy blinds, the home-assistant.log says:

2018-07-30 09:47:22 ERROR (MainThread) [homeassistant.core] Error executing service <ServiceCall switch.turn_on: entity_id=['switch.kuche_gartentur']>
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/core.py", line 1021, in _event_to_service_call
await service_handler.func(service_call)
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/switch/__init__.py", line 109, in async_handle_switch_service
await switch.async_turn_on()
File "/usr/lib/python3.5/asyncio/futures.py", line 380, in __iter__
yield self  # This tells Task to wait for completion.
File "/usr/lib/python3.5/asyncio/tasks.py", line 304, in _wakeup
future.result()
File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
raise self._exception
File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
result = self.fn(*self.args, **self.kwargs)
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/switch/rfxtrx.py", line 67, in turn_on
self._send_command("turn_on")
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/rfxtrx.py", line 366, in _send_command
self._event.device.send_on(rfx_object.transport)
AttributeError: 'RfyDevice' object has no attribute 'send_on'

Any idea?

Thanks, iaah

might be a silly question, but is the somfy protocol (RFY) enabled on your RFXTRX?
By default it’s not…

Hmmm, I think, it is the default configuration. I can program and control the RFXtrx via RFXmngr.exe in the RFY tab.

But in the Main tab there is no selectable option like RFY or Somfy.

silly question is was then.
I see a small difference with my RFXTRX switches, I have an indent in front of each device ID. Not sure if this is why:

switch:
  - platform: rfxtrx
    automatic_add: False
    devices:
      # tuer kueche id 1:01:01 unit code 1
      071a000001010101:
        name: Küche Gartentür
      # kueche nord id 1:01:02 unit code 1
      071a000001010201:
        name: Küche Nord

I have these indents too. I think, the copy/paste into this post delets them.

interesting. I’m stuck then…
Maybe @Danielhiversen can help us?

Try to add it as a cover: https://www.home-assistant.io/components/cover.rfxtrx/

Now it works.

Thanks a lot! :slight_smile:

Hi,
I have 7 Somfy RTS blinds that I programmed and that I can control just fine from my Windows laptop with the RFXCOM plugged on its USB port and the RFXManager tool.
I then plug my RFXCOM to my Raspberry Pi 4 running HA 0.115.2
I have the RFXCOM RFXtrx integration installed and I added 2 blinds to start with in my configuration.yaml :

rfxtrx:
  device: /dev/ttyUSB0
  automatic_add: true
  devices:
    #name: Study Blind
    071a000001010101:
      signal_repetitions: 1
    #name: Living room right Blind
    071a000001010501:
      signal_repetitions: 1

For some unknown reason, I am able to control the 1st blind but not the 2nd one :roll_eyes:
I don’t see any particular error in the Logs.
The yaml is valid, I restarted HA several times, uninstalled/reinstalled the integration to start from scratch, to no avail.
I don’t see any difference in the 2 devices / 6 entities that could explain a different behavior.
If you have any clue where to look, I’d be grateful, thanks !

Could you make a screenshot what you enter in Rfxmngr to control the second set of blinds?

Here is RFXCOM in action with an “up” then “stop” both successfully transmitted to my 2nd blind.
I chose ID 1 | 05 | 01 which translates into 010501
Unit code 1 (not sure its value matters as it is not used in HA)

Zoomed in pictures :


zoom2

My first blind has
ID 1 | 01 | 01 which translates into 010101 in HA’s configuration.yaml
Unit code 1

As both blinds work fine with RFXCOM directly connected to my PC, I guess the issue is coming from a bad config in HA…

Could you add debug key and check the logs which code it is actually sending?

What is your RFXCOM model that you use? Could it be a range issue?

rfxtrx:
  device: /dev/ttyUSB0
  automatic_add: true
  debug: true
  devices:
    #name: Study Blind
    071a000001010101:
      signal_repetitions: 1
    #name: Living room right Blind
    071a000001010501:
      signal_repetitions: 1

Wait…you mixed up unit code and id.

You need [ID][unit_code] so:

071a000001050101:

That was it ! It’s working now !
Silly me ! Thanks a lot ! :smiley: