maxwellhadley / node-red-contrib-rfxcom

node-RED nodes to access an RFXtrx433 transceiver
BSD 2-Clause "Simplified" License
22 stars 13 forks source link

RFXtrx433XL does not connect #82

Closed insomniux closed 4 years ago

insomniux commented 4 years ago

Hi, I'm having a problem getting my RFXtrx433XL communicate with node-red. Nodered is newly installed on a Pi with the RFXtrx connected to /dev/ttyUSB0. This node remains to report 'Connecting' and never issues a message to debug:

[{"id":"5dafa944.694f28","type":"rfx-sensor","z":"23caef91.7f99a","name":"","port":"aa3c02a8.79614","topicSource":"all","topic":"","x":80,"y":280,"wires":[["523c366b.592968"]]},{"id":"523c366b.592968","type":"debug","z":"23caef91.7f99a","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":330,"y":280,"wires":[]},{"id":"aa3c02a8.79614","type":"rfxtrx-port","z":"","port":"/dev/ttyUSB0","enableDebug":true,"rfyVenetianMode":"EU"}]

Here some outputs of my system configuration: lsusb

Bus 001 Device 004: ID 0403:6015 Future Technology Devices International, Ltd Bridge(I2C/SPI/UART/FIFO)
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp. SMC9512/9514 USB Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

lsmod

Module Size Used by
cfg80211 525806 0
rfkill 21373 2 cfg80211
ftdi_sio 33030 1
usbserial 29996 4 ftdi_sio
snd_bcm2835 23131 0
snd_pcm 97825 1 snd_bcm2835
snd_timer 22706 1 snd_pcm
snd 68784 3 snd_timer,snd_bcm2835,snd_pcm
bcm2835_gpiomem 3791 0
fixed 3029 0
uio_pdrv_genirq 3718 0
uio 10166 1 uio_pdrv_genirq
ip_tables 12512 0
x_tables 20921 1 ip_tables
ipv6 384532 35

dmesg | grep ftdi

[ 26.396977] usbcore: registered new interface driver ftdi_sio
[ 26.397645] ftdi_sio 1-1.2:1.0: FTDI USB Serial Device converter detected

dmesg | grep tty

[ 0.000000] Kernel command line: bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2708_fb.fbswap=1 vc_mem.mem_base=0x1ec00000 vc_mem.mem_size=0x20000000 dwc_otg.lpm_enable=0 console=tty1 root=PARTUUID=18ff364c-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
[ 0.001389] console [tty1] enabled
[ 1.059168] 20201000.serial: ttyAMA0 at MMIO 0x20201000 (irq = 81, base_baud = 0) is a PL011 rev2
[ 26.514890] usb 1-1.2: FTDI USB Serial Device converter now attached to ttyUSB0

cat ser2net.conf

10001:raw:0:/dev/ttyUSB0:38400 8DATABITS NONE 1STOPBIT

I guess it's something with the configuration of ser2net but unfortunately the manual of RFXcom is outdated and does not include the newer raspbian versions.

Thanks for your help!

maxwellhadley commented 4 years ago

I don't have one of the new XL transceivers here yet...

Please can you enable rfxtrx-port debug, and post the console output from Node-RED. This option is on the 'Serial Port' edit pane:

image

The messages should look something like this (where I connected the RFX after starting Node-RED):

23 Aug 14:47:07 - [rfxcom] on /dev/tty.usbserial-A1R1A6A - Error: No such file or directory, cannot open /dev/tty.usbserial-A1R1A6A
23 Aug 14:47:07 - [rfxcom] on /dev/tty.usbserial-A1R1A6A - Cleared command message queue
23 Aug 14:47:13 - [rfxcom] on /dev/tty.usbserial-A1R1A6A - Error: No such file or directory, cannot open /dev/tty.usbserial-A1R1A6A
23 Aug 14:47:13 - [rfxcom] on /dev/tty.usbserial-A1R1A6A - Cleared command message queue
23 Aug 14:47:19 - [info] [rfx-detector-in:c36c9483.3f59a8] connecting to /dev/tty.usbserial-A1R1A6A
23 Aug 14:47:25 - [rfxcom] on /dev/tty.usbserial-A1R1A6A - Sent    : 0D,00,00,00,00,00,00,00,00,00,00,00,00,00
23 Aug 14:47:25 - [rfxcom] on /dev/tty.usbserial-A1R1A6A - Sent    : 0D,00,00,01,02,00,00,00,00,00,00,00,00,00
23 Aug 14:47:25 - [rfxcom] on /dev/tty.usbserial-A1R1A6A - Received: 14,01,00,01,02,53,28,08,00,24,00,01,03,FF,05,5D,00,00,00,00,00
23 Aug 14:47:25 - [rfxcom] on /dev/tty.usbserial-A1R1A6A - Sent    : 0D,00,00,02,07,00,00,00,00,00,00,00,00,00
23 Aug 14:47:25 - [rfxcom] on /dev/tty.usbserial-A1R1A6A - Received: 14,01,07,02,07,43,6F,70,79,72,69,67,68,74,20,52,46,58,43,4F,4D
23 Aug 14:47:25 - [rfxcom] on /dev/tty.usbserial-A1R1A6A - Copyright RFXCOM
23 Aug 14:47:25 - [rfxcom] on /dev/tty.usbserial-A1R1A6A - Started command message queue
23 Aug 14:47:25 - [info] [rfx-detector-in:c36c9483.3f59a8] connected: Serial port /dev/tty.usbserial-A1R1A6A
insomniux commented 4 years ago

Thanks for your advise, maxwellhadley. The solution, however came from an unexpected direction. Actually, when I checked, the debug-option was activated. I disconnected and reconnected the RFXtrx and after it came up, it was immediately showing the connection is OK. This remained after a reboot. I've been able to catch information from switches and forward the topic/payload to another MQTT broker. Thanks again for your time, and brilliant work!

maxwellhadley commented 4 years ago

OK - thanks!