FHEM Forum

FHEM - Hausautomations-Systeme => RFXTRX => Thema gestartet von: egesia am 12 November 2013, 02:46:20

Titel: Crash on RFXCOM reconnection
Beitrag von: egesia am 12 November 2013, 02:46:20
Hello,

i've found lot of crash and restart on my log and after investigating i'm pretty sure it's related to RFXCOM module: quite often FHEM lose connection with the RFXLAN device and crash on reconnection. I tried enabling only this device on a clean fhem install on a different machine with the same result. Is this a known issue and how can i help in debug and fixing ?

Thanks !
Titel: Antw:Crash on RFXCOM reconnection
Beitrag von: rudolfkoenig am 12 November 2013, 10:38:11
AFAIK this is not a known issue, it would be helpful to show us the crash messages, and the OS where FHEM is running
Titel: Antw:Crash on RFXCOM reconnection
Beitrag von: Willi am 12 November 2013, 20:53:56
Zitat von: egesia am 12 November 2013, 02:46:20
Hello,

i've found lot of crash and restart on my log and after investigating i'm pretty sure it's related to RFXCOM module: quite often FHEM lose connection with the RFXLAN device and crash on reconnection. I tried enabling only this device on a clean fhem install on a different machine with the same result. Is this a known issue and how can i help in debug and fixing ?

Thanks !
Do you use a RFXLAN transceiver device with my old RFXCOM modules?

My RFXCOM modules probably have never been tested with an RFXLAN, so I suspect that there could be issues on reconnects using TCP on my modules. The only users I know with the RFXCOM modules (not really changed for more than one year) are using the USB based old RFXCOM receiver (I do also have on old RFXCOM receiver).
There is no support for transmits (sets) for RFXLAN using the RFXCOM modules. sets are only supported on my TRX modules for RFXtrx433.

As Rudolf asked you, please tell us more about the reconnect problems and the crash messages.

-- Willi


Titel: Antw:Crash on RFXCOM reconnection
Beitrag von: egesia am 13 November 2013, 00:53:02
Hello,
first of all many thanks for your fast support!
Yes, i'm using an rfxcom lan device with rfxcom. I tested on three different fhem installation and every time the connection with the rfxlan reappears fhem crashes and respawn.

Last lines of log:
2013.11.12 15:10:27 4: eventTypes: OREGON Tribuna temperature: 13.9 -> temperature: .*
2013.11.12 15:10:27 4: eventTypes: OREGON Tribuna humidity: 59 -> humidity: .*
2013.11.12 15:10:27 4: eventTypes: OREGON Tribuna battery: ok -> battery: ok
2013.11.12 15:10:27 4: eventTypes: OREGON Tribuna T: 13.9 H: 59 BAT: ok -> T: .* H: .* BAT: ok
2013.11.12 15:10:27 5: RFXCOM_Parse1 '501a2d10ab911390054247'
2013.11.12 15:10:37 1: 192.168.1.10:10001 disconnected, waiting to reappear
2013.11.12 15:10:37 5: Triggering RFXLAN (1 changes)
2013.11.12 15:10:37 5: Notify loop for RFXLAN DISCONNECTED
2013.11.12 15:10:37 4: eventTypes: RFXCOM RFXLAN DISCONNECTED -> DISCONNECTED
2013.11.12 15:11:40 1: 192.168.1.10:10001 reappeared (RFXLAN)


I can provide a link to the tcp port if you want to test on your machine.
Titel: Antw:Crash on RFXCOM reconnection
Beitrag von: Willi am 13 November 2013, 06:59:57
Thanks for the information.

On your logs I see one TCP disconnect and a reconnect which is normal if there are any network problems or a disconnect of the device.
Does the device work normally again after the reconnect? How often do these disconnect appear?

For TCP connection I simply use the common FHEM routines that are used by nearly all modules.

Where do you see "respawn" and "crashes".? I have not seen this in the logs submitted.
Crashes implies that the FHEM mail script (fhem.pl) crashed or one of the modules crashes.

Greetings

Willi
Titel: Antw:Crash on RFXCOM reconnection
Beitrag von: egesia am 13 November 2013, 14:02:45
Hello,

Now i'm running a fhem only for the Rfxcom on a Rpi and it's quite solid (two crashes in 24h) and connected with the main with FHEM2FHEM. On my main and installation i found respawn every 5-10 minutes. I also tested with a fhem outside the lan  (by a dyndns service) and got lot of disconnection.

On my Rpi the fhem process doesn't respawn so i have to do it manually, after that the log continues with "including fhem.cfg":

2013.11.12 15:11:40 1: 192.168.1.10:10001 reappeared (RFXLAN)
2013.11.12 15:53:06 1: Including fhem.cfg


Same situation later:

2013.11.12 19:34:52 1: 192.168.1.10:10001 reappeared (RFXLAN)
2013.11.12 20:53:16 1: Including fhem.cfg


Thanks
Titel: Antw:Crash on RFXCOM reconnection
Beitrag von: Willi am 13 November 2013, 17:08:06
I am still puzzled. You have quoted again
Zitat2013.11.12 15:11:40 1: 192.168.1.10:10001 reappeared (RFXLAN)
2013.11.12 15:53:06 1: Including fhem.cfg

Does it mean that there is no other log when FHEM is crashed?
Could you set the verbose attribute to 5 for the RFXCOM device?

Regards

Willi
Titel: Antw:Crash on RFXCOM reconnection
Beitrag von: egesia am 13 November 2013, 23:50:12
Yes, these were the last lines before fhem process stopped.

With verbose 5 on rfxcom (and respawn active):
2013.11.13 23:24:14 5: RFXLAN dispatch 501a2d10ab461100173a92
2013.11.13 23:33:32 1: 192.168.1.10:10001 reappeared (RFXLAN)
Can't call method "status" on an undefined value at ./FHEM/40_RFXCOM.pm line 369.
2013.11.13 23:33:32 1: Including fhem.cfg
Titel: Antw:Crash on RFXCOM reconnection
Beitrag von: Willi am 14 November 2013, 16:07:44
Thanks.

I will look into it when I have some time left. Unfortunately there is not much left before Xmas as I am currently renovating my house....

Regards

Willi