I try to get my RFXtrx433E to work with Hass.io running on a RPi3.
I have previously used the RFXtrx433E with a Vera Edge and imported the devices to HASS using the Vera component. I now want the RFXtrx433E directly plugged in the RPi.
I have unplugged everything else from the RPi. I get two USB ports when I run “hassio ho hardware” using putty: /dev/ttyUSB0 and /dev/ttyAMA0.
I have used both these ports in configuration.yaml:
Neither of these settings works. I do not get any devices auto detected. I know the RFXtrx433E have the right protocols enabled because my devices show when the RFXtrx433E is connected to my Vera.
I have added “automatic_add: True” to sensors, switches, lights and binary_sensors.
I read somewhere you could use the putty command “dmesg” but I don’t know what I’m looking at?
if you connect to your Pi and just type “ls /dev” is should give you a big list of all the devices the pi currently sees, you should be able to see if its TTYUSB0 or TTYUSB1, mine is…
Yes! By running “dmesg | grep tty” and rebooting the system my sensors started to show up!
I don’t know why (I thought the “grep” command in linux just listed things?) or if I need to do this every time I reboot, but I’m just happy it works!
The command “ls /dev” just printed:
core-ssh:~# ls /dev
char init null random stdin urandom
fd kmsg ptmx shm stdout zero
full mqueue pts stderr tty
EDIT: No, I was premature in my joy… Rebooted the RPi3 and the sensors are gone and don’t get autodetected again. Tried running “dmesg | grep tty” again:
core-ssh:~# dmesg | grep tty
[ 1.159050] 3f201000.uart: ttyAMA0 at MMIO 0x3f201000 (irq = 87, base_baud = 0) is a PL011 rev2
[ 4.491000] cdc_acm 1-1.2:1.0: ttyACM0: USB ACM device
[ 4.492567] cdc_acm 1-1.3:1.0: ttyACM1: USB ACM device
[ 5.874399] usb 1-1.5: FTDI USB Serial Device converter now attached to ttyUSB0
and SOMETIMES the sensors start show up again. This is not very stable.
Could someone who use a RFXtrx433E for Hass.io on a RPi3 (preferable together with other USB devices like Z-Wave USB stick) please share if they need to use the “dmesg | grep tty” every time after reboot?
[ 1.614323] usb 1-1: New USB device found, idVendor=0424, idProduct=9514
[ 1.614335] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 1.614789] hub 1-1:1.0: USB hub found
[ 1.614849] hub 1-1:1.0: 5 ports detected
[ 1.894042] usb 1-1.1: new high-speed USB device number 3 using dwc_otg
[ 1.994392] usb 1-1.1: New USB device found, idVendor=0424, idProduct=ec00
[ 1.994415] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 1.997365] smsc95xx v1.0.4
[ 2.057897] smsc95xx 1-1.1:1.0 eth0: register 'smsc95xx' at usb-3f980000.usb-1.1, smsc95xx USB 2.0 Ethernet, b8:27:eb:61:e0:ff
[ 2.294038] usb 1-1.2: new full-speed USB device number 4 using dwc_otg
[ 2.371857] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[ 2.397360] usb 1-1.2: New USB device found, idVendor=0658, idProduct=0200
[ 2.397384] usb 1-1.2: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 2.415099] EXT4-fs (mmcblk0p5): mounted filesystem with ordered data mode. Opts: (null)
[ 2.494064] usb 1-1.3: new full-speed USB device number 5 using dwc_otg
[ 2.619978] usb 1-1.3: New USB device found, idVendor=0403, idProduct=6001
[ 2.619999] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 2.620012] usb 1-1.3: Product: RFXtrx433
[ 2.620023] usb 1-1.3: Manufacturer: RFXCOM
[ 2.620035] usb 1-1.3: SerialNumber: A1XQFOUU
[ 2.704014] usb 1-1.5: new full-speed USB device number 6 using dwc_ot`
have something to say about what port the RFXtrx is connected to. Could someone interpret the output for me?
Based on your dmesg, I believe it would be /dev/serial/by-id/usb-RFXCOM_RFXrec433_A1XQFOUU-if00-port0 on your system.
If that doesn’t work, you’ll need to follow the steps at https://www.home-assistant.io/developers/hassio/debugging/ to enable SSH to the resinos host. Once done, you can ssh to the resinos host and check at /dev/serial/by-id/ for the right device id.
I finally got it to work and post here for others who are struggling (and for myself in the future when I have forgotten how I did it… ;))!
First you need to get SSH root access which you need to follow the instructions @NotoriousBDG link to ( https://www.home-assistant.io/developers/hassio/debugging). Copy the public key to a file called “authorized_keys” (no file ending) and put it in the root of the /resin-boot partition of the SD card (you need to remove the Sd card from the RPi to do this).
Then, connect as root to Hass.io using the generated private key and using port 22222. Use the “ls -al /dev/serial/by-id” command to list the long, real paths to all USB devices connected to the RPi:
Finally got it all working after a huge amount of trying and adjusting.
I’m a bit anxious to ever reboot my pi, as I think everything might change. So let’s not reboot is the thing now
So this is what my config looks like right now.
Because my listed rfxtrx device only had a number I found out that it is necessary to " " accolade them out.
Neither TTY were working for me but thanks to all tips described in this topic, I’ve been able to “easily” guess the by-id path ::
First run dmesg in CLI and find the following lines
[ 2.216443] usb 1-1.3: New USB device found, idVendor=0403, idProduct=6001
[ 2.217725] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 2.218961] usb 1-1.3: Product: RFXtrx433
[ 2.220177] usb 1-1.3: Manufacturer: RFXCOM
[ 2.221389] usb 1-1.3: SerialNumber: A1R17KD
Then just replace the here with the one from the last line
/dev/serial/by-id/usb-RFXCOM_RFXtrx433_-if00-port0