Hauptmenü

FHEM watchdog

Begonnen von d4vid, 17 Dezember 2015, 12:42:53

Vorheriges Thema - Nächstes Thema

d4vid

Hello,

I have a problem with FHEM. I use it for heating control and sometimes FHEM hangs and stops responsing.
I have firmata connected to it and on firmata arduino I have 3 DS18B20 sensors.

I don't find anything usefull in log, but I guess it's One wire problem. Sensors refresh frequency is 5 seconds.

Arduino UNO is bought on Banggood website and it's not original one.

But if I restart fhem even in telnet (it takes around a minute to restart), everything is back to normal.

Can I set a watchdog timer to restart fhem when problem occurs on OWX device?

dev0

Zitat von: d4vid am 17 Dezember 2015, 12:42:53
FHEM hangs and stops responsing

You can check if FHEM is working well with a little shell script which will ask eg. for a dummy state every minute. If there is no answer you can kill fhem process if still running and start a new process...
But this is not recommended and is the worst way. Try to find the error! Use attr global verbose 5 and stacktrace = 1 at first and look for abnormalities in log file when the error occurs. Additionally you can use "strace -p <FHEM-PID>" to find an endless loop.

justme1968

it is probably safer and easier to leg FHEM write a timestamp to the filesystem and check if it is curtent from the watchdog side. the. you will mit have to deal wird the dummy query itself potentialy blocking.

but finding the real problem ist better.
hue, tradfri, alexa-fhem, homebridge-fhem, LightScene, readingsGroup, ...

https://github.com/sponsors/justme-1968