Help with RFXTRX cover

I’m trying to add a cover, but am unable to control via HA. Using RFXmngr I received the following when pressing a button on the remote and I am able to open/close via RFXmngr.

Packettype = BLINDS1
subtype = Safy / RollerTrol / Hasta new
Sequence nbr = 12
id2-3 = 9BA8 decimal:39848
Unit = 1
Command = Open
Signal level = 7 -64dBm

Is the switch detected in HA?

I tried the following, but it wasn’t detected when I pressed a button on the remote:

cover:
platform: rfxtrx
automatic_add: True

I’ve tried running the type 2 firmware to see if that made a difference during detection, but it did not.

Is the rfxtrx component working with other sensors or switches?

Then it might not be supported by the library we are using: https://github.com/Danielhiversen/pyRFXtrx
That means that someone (probably you) have to add support for it.

I don’t have any other sensors or switches to add/test.
How would I go about adding support?

Make sure the parse function recognize your data https://github.com/Danielhiversen/pyRFXtrx/blob/master/RFXtrx/lowlevel.py#L39

Then you should make a new Packet class for your device.

A good start would be to add print(data) here https://github.com/Danielhiversen/pyRFXtrx/blob/master/RFXtrx/lowlevel.py#L38
Then you can inspect the data.

You should also google for documentation for your device protocol.

I spun up a ubuntu VM and connected the RFXCOM to the VM. Installed HA, pressed the open/close buttons on the remote and I got:

Recv: 0x09 0x19 0x00 0x00 0x00 0x9b 0xa8 0x01 0x00 0x70
Recv: 0x09 0x19 0x00 0x01 0x00 0x9b 0xa8 0x01 0x01 0x70

So data[1] is 0x19 , and currently no type of 0x19 is supported.
So you have to google and see if you can find any documentation for it.
Otherwise you have to decode the packet. It is normally not that hard if you have a look at the other packet classes.

data[3] is probably a seqn_nr
data[4:7] identification of your unit
data[8] is probably on/off

Similar to this: https://github.com/Danielhiversen/pyRFXtrx/blob/master/RFXtrx/lowlevel.py#L428-L440

so far i believe:
data[0]=packetlength (static as 09)
data[1]=packettype (static as 19)
data[2]=subtype (static as 00)
data[3]=seqnbr
data[4]=ID1 (static as 00)
data[5]=ID2 (9B)
data[6]=ID3 (A8)
data[7]=Unit (01)
data[8]=CMD (open 00, close 01, stop 02)
data[9]=? (static 70)

data[9]=signal level?

I figured it out and got things to work. As I have never created a pull request before, I made one for init.py & lowlevel.py respectively. Thanks for all your help!

Hi, sorry to ressurrect an old thread, but I am currently struggling with a similar problem, a cover with same packettype (0x19) that Home Assistant does not recognize. HerbDavisY2K: how did you get it to work? I could create my own pull request if I can see your example code.

Here is the info I get from /example/receive.py:

Recv: 0x09 0x19 0x00 0x07 0x00 0xb8 0xd6 0x02 0x01 0x80
<class 'RFXtrx.ControlEvent'> device=[<class 'RFXtrx.RollerTrolDevice'> type='RollerTrol' id='00b8d6:2'] values=[('Command', 'Down'), ('Rssi numeric', 8)]

Recv: 0x09 0x19 0x00 0x08 0x00 0xb8 0xd6 0x02 0x00 0x80
<class 'RFXtrx.ControlEvent'> device=[<class 'RFXtrx.RollerTrolDevice'> type='RollerTrol' id='00b8d6:2'] values=[('Command', 'Up'), ('Rssi numeric', 8)]

Recv: 0x09 0x19 0x00 0x09 0x00 0xb8 0xd6 0x02 0x02 0x80
<class 'RFXtrx.ControlEvent'> device=[<class 'RFXtrx.RollerTrolDevice'> type='RollerTrol' id='00b8d6:2'] values=[('Command', 'Stop'), ('Rssi numeric', 8)]

It was added a while ago:

Hmm, the cover does not show up in my Home Assistant with automatic_add, so I figured it was an unsupported subtype of some sort. I am running the latest Home Assistant version (0.49) and I checked that lowlevel.py in Home Assistant dependencies matches the current version in your repository. I tried to construct an ID string and add it by hand (0719000000b8d602 is what I came up with), but no luck. :frowning:
It is a BOFU motor, this one (I think): http://www.bofumotor.com/index_in.asp?id=19

From the codes you posted, it seams that it is supported.

Have you checked the logs? Enable debugging for rfxtrx.

This is my configuration:

rfxtrx:
  device: /dev/serial/by-id/usb-RFXCOM_RFXtrx433_A1YKV673-if00-port0
  debug: True
cover:
  - platform: rfxtrx
    automatic_add: True

The device path is correct since I have a number of other 433Mhz devices that show up correctly.
Blind0 protocol on RfxTrx is enabled and, since the packets show up when I run receive.py I assume RfxTrx itself gets the information.
However, nothing shows up in Home Assistant and nothing at all shows up in the home-assistant.log. Or am I looking in the wrong place?

Edit: this is the output I get from the blinds remote in RfxMngr:

Packettype    = BLINDS1
subtype       = Safy / RollerTrol / Hasta new
Sequence nbr  = 0
id2-3         = B8D6 decimal:47318
Unit          = 2
Command       = Close
Signal level  = 8  -56dBm

Update: I enabled the logger component as well:

logger:
  default: warning
  logs:
    homeassistant.components.rfxtrx: info

It logs adding my switches to network after a HASS restart, but still nothing about the cover. :confused:

Another update: Upon closer inspection of the RollerTrol section in lowlevel.py I realised that it always expects a 0x09 string length for ID, so I added four zeroes at the end of the ID I constructed.
It looks like this now: 0919000000b8d6020000
And now the cover shows up in Home Assistant and works as it should. So happy!
The lack of automatic_add support should perhaps still be investigated, but at least I can write a guide about how to go about making it work manually.
The reason I am investigating this is because my partner, online shop http://m.nu sells a lot of these motors for Ikea roller blinds, and there are several people I know who have had this issue when they try to add them to Home Assistant with RfxTrx.

Resurrecting this thread again because I have a similar issue. I’m just starting with hass (hello, world :slight_smile:) and if the install is super easy and auto discovery does discover some of my stuff, I find it quite painful to configure all the rest. I’m using RFXtrx with a lot of things including my blinds.

I went through the process of manually setting the ids for some switches, lights as well as my RFY blinds thanks to the documentation, but I have one more blind that’s a little exotic/ancient (type 11, works perfectly fine in domoticz though) and I have no idea how to determine the proper code. Here’s the data for it:

Packettype = BLINDS1
subtype = ASP
Sequence nbr = 1
id1-3 = 0020AA decimal:8362
Command = Open
Signal level = 8 -56dBm

Any guidance on how to get this to work would be greatly appreciated! It’s basically a showstopper for me :confused:

Edit: looking closer at the documentation as well as at the code on @Danielhiversen’s repository, I realize that cover support is actually limited to 2 types, excluding mine. I have no idea how to write support for that myself; so it does look like home assistant won’t be able to assist my home in the end :neutral_face: