RFXreceiver unable to connect

Forum about Domotiga Open Source Home Automation for Linux.

Moderator: RDNZL

Post Reply
djo28
Starting Member
Starting Member
Posts: 12
Joined: Wed Jan 12, 2011 5:11 pm

RFXreceiver unable to connect

Post by djo28 »

Hello,

Sometimes, I don't know why, DomotiGa fails to connect to the RFXcom Reciever on startup but succeeds on connecting to the RFXTransmitter.
Even restarting DomotiGa doesn't solve this. To correct this issue I have to run the "rfxReciever.exe" software on my Windows XP computer, connect to the RFX Reciever and quit. Then when I restart DomotiGa, it succeeds in conecting to the reciever.

If I restart the RFXcom it works too but ... :shock: not a solution for me :D

Don't know what's happening.
User avatar
RDNZL
Forum Moderator
Forum Moderator
Posts: 1008
Joined: Sun Sep 24, 2006 1:45 pm
Location: Dordrecht, The Netherlands
Contact:

Re: RFXreceiver unable to connect

Post by RDNZL »

To be honest I have had only RFXCom USB modules for years, only until recently I have gotten a LAN interface, thanks Bert.

I haven't had this problem while using them the last weeks, and I restart my development domotiga often.

I suspect that there is an open connection still running, keeping the port occupied, you can only have one connection to each interface port.

You can check this by running:

Code: Select all

$ netstat -an|grep 10001 
(or your rfxcom receiver port number)
tcp        0      0 192.168.1.60:45825      192.168.1.19:10001      ESTABLISHED
If you get a line without having domotiga running, thats the issue.

If you want to see which program has this connection open run:

Code: Select all

$ lsof |grep 10001
gbx2      29878        ron   13u     IPv4    5009300      0t0        TCP domo.cyberjunky.nl:45825->192.168.1.19:10001 (ESTABLISHED)
If you don't get an open connection we have to look further, maybe it's an init issue or something like that.
Regards, Ron.
djo28
Starting Member
Starting Member
Posts: 12
Joined: Wed Jan 12, 2011 5:11 pm

Re: RFXreceiver unable to connect

Post by djo28 »

Here is the result. Domotiga not started :

Code: Select all

$ netstat -an|grep 10001 
$ lsof |grep 10001
No open connections.

Now starting DomotiGa results in those lines in the "logfiles" tab :

Code: Select all

2011/01/13 21:29:19 RFXCom receiver: Unable to connect. Connection refused.
2011/01/13 21:29:19 RFXCom transmitter: Unable to connect. Connection refused.
This time the transmitter also stoped working and I can not connect with my other PC running WindowsXP. The embedded webserver in the RFXcom still works fine.

Rebooting the RFXcom brings all back working.

It's like if exiting DomotiGa left the RFXcom in a sick state. RFXcom issue ?
User avatar
RDNZL
Forum Moderator
Forum Moderator
Posts: 1008
Joined: Sun Sep 24, 2006 1:45 pm
Location: Dordrecht, The Netherlands
Contact:

Re: RFXreceiver unable to connect

Post by RDNZL »

I need more info, do you use a domain name or an ip address in your DomotiGa rfxcom settings?
Ip address is the best.

Are you sure that there are no local network issues?
Try changing the ip address of the rfxcom device, to rule out any conflicts?
Sure that there are no port scanners running or things like that?
The device is on your LAN right, not somewhere on the internet?
Which Linux distro are you running? Firewall active?

If you can receive and send data with from/to rfxcom device with domotiga ones it connects, init is ok, all domotiga does when you close it is close the tcp sockets, there is nothing special about that.
I use a dozen tcp connections from domotiga to all sorts of devices and services without problems.

Are you running the latest Gambas stable code compiled from svn?
Because a long time ago Gambas had some bugs regarding sockets, but they didn't corrupt anything.

Can you telnet to the device when it is stuck?

Code: Select all

telnet 192.168.1.19 10002
Trying 192.168.1.19...
Connected to 192.168.1.19.
Escape character is '^]'.
Z
Z
Regards, Ron.
djo28
Starting Member
Starting Member
Posts: 12
Joined: Wed Jan 12, 2011 5:11 pm

Re: RFXreceiver unable to connect

Post by djo28 »

I use IP adress in the rfxcom settings in DomotiGa.

Everything else is working well on the network. Will try to change ip adress of rfxcom.
Rfxcom is on the my LAN yes.

Last version of Gambas from svn. Ubuntu 10.10 - Maverick Meerkat - No firewall configured.

Right now after closing DomotiGa and restarting it, the reciever refuses my connection but the transmitter is ok :

Code: Select all

2011/01/15 12:05:53 RFXCom receiver: Unable to connect. Connection refused.
2011/01/15 12:05:53 RFXCom transmitter TCP socket connected.
Then after closing DomotiGa again :

Code: Select all

$ telnet 192.168.1.4 10001
Trying 192.168.1.4...
telnet: Unable to connect to remote host: Connection refused
$ telnet 192.168.1.4 10002
Trying 192.168.1.4...
Connected to 192.168.1.4.
Escape character is '^]'.

Code: Select all

$ netstat -an|grep 10001 
$ netstat -an|grep 10002
Hope this helps.
User avatar
RDNZL
Forum Moderator
Forum Moderator
Posts: 1008
Joined: Sun Sep 24, 2006 1:45 pm
Location: Dordrecht, The Netherlands
Contact:

Re: RFXreceiver unable to connect

Post by RDNZL »

I have no idea what we could check next.
Do they connect if you just enable one module, so only RX and only TX in DomotiGa?

I'm beginning to think your LAN interface is not working correctly.
Do you use a correct power supply, correct voltage and amps?
Can you press the modules firmly into their sockets?

@Bert, any ideas?
Regards, Ron.
Post Reply

Return to “DomotiGa Forum”