Thanks.

I tried hysteresis but there are 4 decision points and things are getting messy.

I set up Timer 1, counting seconds. The main loop runs fast but the relays are set (or reset) only after the defined time delay, now 10 sec.

Seems OK.

Ioannis