I'm going slightly mad: RFXcom on HASSIO , tried every option , still no joy

After a week of tinkering and following every instruction I could find in this community , I still can’t get my RFXCom rfxtrx working.

A bit of background:

  • I’m moving away from Domoticz to Hass.io. running on Rpi3B+
  • In Domoticz , the RFXCom was set up using the RFXmngr and was working flawless
  • Device ID’s have been set in RFXmngr and copied over to Domoticz.
  • I use DC106 type blinds and several KAKU ACM-2300H switches, no remote controls

Starting point was this post
output from my devices:

bash-4.4# ls -al /dev/serial/by-id
total 0
drwxr-xr-x 2 root root 80 Apr 1 09:14 .
drwxr-xr-x 4 root root 80 Apr 1 09:14 …
lrwxrwxrwx 1 root root 13 Apr 1 09:14 usb-0658_0200-if00 → …/…/ttyACM0
lrwxrwxrwx 1 root root 13 Apr 1 09:14 usb-RFXCOM_RFXtrx433_A129KK8X-if00-port0 → …/…/ttyUSB0
bash-4.4#

added to Configuration.yaml:

rfxtrx:
    device: /dev/serial/by-id/usb-RFXCOM_RFXtrx433_A129KK8X-if00-port0  
switch:
  - platform: rfxtrx
    automatic_add: True
cover:
  - platform: rfxtrx
    automatic_add: True
binary_sensor:
  - platform: rfxtrx
    automatic_add: True

And here is where I can’t get my head around adding the devices.

  • As for the blinds, I’ve followed this post to no avail
  • I’ve rebooted the RPi, pressed the button on the KAKU, powered off/on the KAKU module in many different ways and orders , still nothing shows up in Hass.

Am I missing something obvious here.? I’m going in circles for a while…

Appreciate your insights and help

This is what I have in my config.yaml for rfxtrx set up.

  rfxtrx:
  device: /dev/ttyUSB1

Also I had to run this command in putty “dmesg | grep tty” to get the rfxcom to connect. Run the command from SSH and then restart home assistant.

Thanks and I have done that but no change.
changing devices in configuration.yaml made no change.
Neither dev/ttyUSB0 nor /dev/serial/by-id/usb-RFXCOM_RFXtrx433_A129KK8X-if00-port0 made any change.

Just so I’m expecting the right behaviour ; if you add

switch:
- platform: rfxtrx
  automatic_add: true

(or “Covers”/“Light” in the same format), to your configuration.yaml, do device ID’s auto populate into configuration.yaml.?

btw, There is no way I can trigger the KAKU switches to register, these ACM-2300’s only have a learn button and I don’t use any remote to operate them.

You won’t be seeing any device automatically added to configuration.yaml. But you may see “new devices discovered” or something. However, you need to trigger them in order to be detected. F.e., if it’s a light switch that works on 433, you have to press the button to send a signal.

Also, I see in your first post …/ttyUSB0, so this is what you should add (instead of ttyUSB1, if you try what @EGO01 used)

exactly, that’s what I did,

this is in my configuration.yaml:

rfxtrx:
 device: /dev/ttyUSB0
 debug: True

switch:
 - platform: rfxtrx
   automatic_add: True

cover:
 - platform: rfxtrx
   automatic_add: True

“dmesg | grep tty” done, restarted , nothing has changed.

triggering KAKU without remote seems to be the issue apparently… ACM-2300H is a switch behind a wall switch , flipping the wall switch changes nothing, pressing learn button , same, power off/on same.
no new devices discovered.

having said that, blinds don’t seem to discovered either, i do have a remote to trigger the blinds…
(Adding blinds ID’s manually to the device list didn’t work)

If you are running in a container (ie Hassio), then don’t you need to give the container access to the serial device? By default, a container is isolated and doesn’t get access to all of the system resources (devices, file systems/directories, etc).

I’m by no way an expert but I wouldn’t think so as hassio reports the connected USB devices per default.
Adding Zwave USB follows the same principal and immediately reports entities after reboot.

automatic_add: true

i.e. should be lowercase t for true

not

automatic_add: True

That may make a difference

Thanks for your input , Tried both as I’ve seen many different notations in different threads, lowercase/uppercase doesn’t change unfortunately

Well its still worth correcting. Also it does recommend in the docs only having one component as automatic add at a time as some devices can be registered in the wrong component i.e.switches as sensors.

Also as @Nitram pointed out you have to add each device by pressing the remote to program it. The device id is added as an entity to the component that is set to automatic switch.00472… for example.

It could be part of the problem that you have automatic add for everything. Try setting to false everything but switches and try the plug with the remote. You will need to restart home assistant after changing the automatic add.

1 Like

Do you have the permissions set for the user you are running hassio under?

you can see which group has access to the serial port by running
ls -al /dev/ttyUSB*

this should show you something like this:
crw-rw---- 1 root dialout 188, 0 Apr 1 16:22 /dev/ttyUSB0
crw-rw---- 1 root dialout 188, 1 Apr 1 16:22 /dev/ttyUSB1

in this case your hassio user needs to be a member of the dialout group. you can check by running ‘groups’ as that user.

Thanks for your help,
below is the output:

core-ssh:~# ls -al /dev/tty*
crw-rw-rw-    1 root     root        5,   0 Apr  1 15:31 /dev/tty
crw-rw----    1 root     audio     166,   0 Apr  1 15:31 /dev/ttyACM0
crw-rw----    1 root     audio     204,  64 Apr  1 15:31 /dev/ttyAMA0
crw-rw----    1 root     audio     188,   0 Apr  1 15:31 /dev/ttyUSB0

zwave works fine although root is not part of audio group;
groups show:

 core-ssh:~# groups 
 root bin daemon sys adm disk wheel floppy dialout tape video

have to admit I have no idea how to add root to the audio group, usermod is unknown command…
I’ve chgrp the USB0 device to take part of dialout goup but that is not persistant across reboots

After chgrp and restarting Hass , no new devices discovered (on the KAKU: flipping switches, power off/on , bind button pressed, again, no remote so no other options to trigger anything)

@EGO01 , I’ll follow up your advice and double-check , thanks

I’ll set up an Ubuntu instance tonight and see if that works as advertised , It has to be something really basic I’m missing in my current setup.

#scratchinghead

Got a dark feeling this will never work without a remote… :thinking:
but then again, blinds don’t work either , and i do have a remote for that…

I’ve gave up doing this the easy way…
I’m generating codes through /dev-template and add them manually to configuration.yaml
Good news is I can control them finally, bad news is I need to remove all wall switches to access the bind button.

Blinds is the next challenge, at least I know the communication to the RFXcom is working.

Anyone know how to change group persistently across reboots.?

thanks all for sharing your knowledge !

I’m also not able to get my Rfxtrx working. Have no clue what I’m doing wrong. Tried almost everything in al the fora I read.

update: ha ha and just when I post this message it finally works. I think it has to do with the dmesg | grep command

Not sure if anyone still has a problem with this. I managed to make it work (after plenty of attempts and hours) and thought I’d share what I did to save someone the frustration. I’m running Hassio on Rpi3 with a transmitter connected via USB. These are the steps I did:

First Part: SSH/PUTTY/Dmesg
1.1 Install SSH addon in HA from the addon store.
1.2 Enter a password on SSH addon page in the “Config” section. Set Addon to auto-start and restart HA.
1.3 Install PUTTY on your computer.
1.4 Enter “[email protected]” in host name and keep port at 22 and then press Open.
1.5 Press Yes on the popup and then enter your password in PUTTY.
1.6 Enter “Hassio Hardware Info” (this has changed I found this by trial and error) to see what is connected to your device, we are looking for the USB path to your device. You may see dev/ttyUSB0 or /dev/serial/by-id/usb-RFXCOM_RFXtrx433_A129KK8X-if00-port0. For me it was the long one. Save the path since thats what you will be entering in Configuration file.
1.7 Type the command “dmesg | grep tty”. You can close PUTTY now.

Second Part: Setting Up HA
2.1 Add the following to your Configuration file: (Replace the “-” with spaces or Tab")
rfxtrx:
–device: /dev/YOURPATHHERE
2.2 Depending on if you have a switch or sensor type what you have. I will use switch in this case. Remember these lines are not within the rfxtrx segment above. Your file should look like this now:
rfxtrx:
–device: /dev/YOURPATHHERE
switch:
–platform: rfxtrx
–automatic_add: True
2.3 Check config file and then restart server.
2.4 Press on your remote to trigger the switch. For me there was no popup, I suddenly realized that i had a device called 00100120192something in my entity list and saw it worked.
2.5 Remove automatic_add from your config file and enter your name for that device which is explained on this page: https://www.home-assistant.io/integrations/sensor.rfxtrx/

Hope this helped someone

2 Likes

I’m doing some refactor of the rfxtrx component. Could use some help testing stuff once this goes into standard hass. Are you guys still using the integration?

Yep. Happy to help if I can

Same here , happy to help!
Using Brel shutters and some KaKu switches