RFXCOM No things

Hi,

Need help. Trying to get RFXCOM to work. The antenna was moved from Domoticz to openHAB. This is the last addon from Domoticz to openHAB, and it is giving me headaches.

My setup:
RFXCOM connected:

[10:00:59] openhabian@openhab:~/scripts$ ll /dev/ttyUSB*
crw-rw---- 1 root dialout 188, 0 Jan  7 08:32 /dev/ttyUSB0
crw-rw---- 1 root dialout 188, 1 Jan  7 08:32 /dev/ttyUSB1
lrwxrwxrwx 1 root root         7 Jan  7 08:32 /dev/ttyUSB_P1 -> ttyUSB1
lrwxrwxrwx 1 root root         7 Jan  7 08:32 /dev/ttyUSB_RFX -> ttyUSB0

Reason to config like this, is that if USBx order changes during reboot, the linked devices represent the correct device due to serialnumber scan. Setup:

[10:08:05] openhabian@openhab:/etc/udev/rules.d$ ll
total 16K
drwxr-xr-x 2 root root 4.0K Jan  4 09:43 ./
drwxr-xr-x 4 root root 4.0K Dec 28 12:13 ../
-rw-r--r-- 1 root root  237 Jan  4 09:43 10-usb-serial.rules
-rw-r--r-- 1 root root 1.1K Nov 27  2017 99-com.rules
[10:08:06] openhabian@openhab:/etc/udev/rules.d$ cat 10-usb-serial.rules
SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ATTRS{serial}=="AI1SQ0E9",  SYMLINK+="ttyUSB_P1"
SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ATTRS{serial}=="A11SEKAG",  SYMLINK+="ttyUSB_RFX"

The /dev/ttyUSB_RFXCOM is listening and responding:

[09:50:59] openhabian@openhab:~/scripts$  sudo -u openhab stty -a -F /dev/ttyUSB_RFX
speed 9600 baud; rows 0; columns 0; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V;
discard = ^O; min = 1; time = 0;
-parenb -parodd -cmspar cs8 hupcl -cstopb cread clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff -iuclc -ixany -imaxbel -iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke -flusho -extproc

Running:

Release = Raspbian GNU/Linux 10 (buster)
Kernel = Linux 4.19.75-v7l+
Platform = Raspberry Pi 4 Model B Rev 1.2
openHAB 2.5.0-1 (Release Build)

Bridge config:

Bridge rfxcom:rfxbridge:usb_rfx [ serialPort="/dev/ttyUSB_RFX" ] {
 
}

Now how do I discover things connected to the RFXCOM antenna ?
Using the blue+ (Searching for things) …NOTHING.
Increased the debuglevel DEBUG for org.openhab.binding.rfxcom in Karaf log.
No message that helps or even mentions RFX log messages.

Searched the community and the rest of the internet for clues or (even better) solutions.
A lot of posts but nothing seems to help me :frowning:

Getting somewhat frustrated…hope anybody can help.

Thx in advance

Add info:

dmesg:

[    1.481670] usb 1-1.3: new full-speed USB device number 3 using xhci_hcd
[    1.626552] usb 1-1.3: New USB device found, idVendor=0403, idProduct=6001, bcdDevice= 6.00
[    1.626586] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    1.626616] usb 1-1.3: Product: RFXtrx433
[    1.626638] usb 1-1.3: Manufacturer: RFXCOM
[    1.626661] usb 1-1.3: SerialNumber: A11SEKAG
.......
[    5.550746] ftdi_sio 1-1.3:1.0: FTDI USB Serial Device converter detected
[    5.550907] usb 1-1.3: Detected FT232RL
[    5.569465] usb 1-1.3: FTDI USB Serial Device converter now attached to ttyUSB0

After digging, I think I am somewhat further in my quest:

Reading very closely the documentation page for the RFXcom addon.

My Things file now look like:

    Bridge rfxcom:rfxbridge:usb_rfx [ serialPort="/dev/ttyUSB_RFX" ] {

        Thing lighting1 ELRO3 [ deviceId="H.25", subType="AB400D" ]

        Thing lighting1 ELRO5 [ deviceId="M.25", subType="AB400D" ]

    }

But in my Paperui-> Things I see

rfxbridge

Is there something wrong with my bridge ?

I cant disable FTDI because I am using DSMR addon ( also uses USB port ).
Disabling FTDI is mentioned in the addon docu

Try adding openhab to tty group or use the sudo openhabian-config tool and select fix permissions (it listed under “Apply Improvements”). While there I would also select “add needed packages” and svr mounts.

Hi H102,

Thanks for your reply !

Did all you advised. All was OK…no actions were taken, and the bridge seems to be a bridge too far for my setup. :wink:

Removed all references to RFXcom and retried from start (after clearing cache/restart OH2).
Installing the AddIn takes forever: the wheel keeps spinning around…and around…(now for 15 minutes)

I donot want to stop this, or go to another page…might cause corruption ??
I will leave my system ON and come back before I go to bed.

It’s ok to exit the page and you can check frontail log to see when it gets installed. BTW, I also notice that wheel keeps spinning most every time I add a binding. Once you leave the page then return it should show as installed.

The wheel kept on turning, and I acted as you suggested.

Now I added the RFXComm using the PaperUI, not by editting the files, and it looks promissing: I see things adding into my inbox. :slight_smile:

Going to continue tomorrow. I will keep you updated.

BTW: family of R2D2 ? :wink:

Glad you have it working. Did you mean added RFXComm addon via PaperUI or you created the Things using PaperUI?

If you plan to use PaperUI, for things, then I recommend commenting out the Things in your things file with // for each line or /* at the top and */ at bottom of file. After that stop OH, clean the cache, and restart.

Commands for cleaning cache:

sudo systemctl stop openhab2

sudo openhab-cli clean-cache

sudo systemclt start openhab2

Then create/config your things in PaperUI and use files for the items.

You are exactly right. Done that and things appears in the PaperUI.
Doing it all manual by editting the openhab-config is not the right way to do it. At least for me :slight_smile:

Thanks for you great help…again !

1 Like

Having options is what I like about OH. :smiley:

Glad to help, hope you enjoy OH, and thanks for clicking the solution. :+1:

Also, remember the community is here to help anytime you have an issue. The stop OH and clean cache is one of the first things I do when OH acts weird or I have strange messages in logs so keep that in your notes. :wink: