Sonoff THR316 configured as a differential thermostat

Hi All,

I am new to the forum and I will be very grateful of help and suggestions.

I have 3 THR316’s, call them S1 to S3, configured as differential thermostat for solar thermal control.

S1 - monitors the temperature of the solar panel and controls on-off of the circulation Pump.

S2 - monitors the temperature of solar domestic hot water, Cylinder number 1 and when satisfied, diverts hot water from the panel to hot water Cylinder number 2

S3 - monitors the temperature of solar domestic hot water Cylinder number 2. There is an over temperature control on this cylinder that opens a valve at a specific threshold.

Control of the circulation Pump is derived from logic in scenes and is dependant of temperature differential between S1 and S2, S1 and S3.

now for the small problem…

Switching the circulation Pump on is no problem, for example when S1 >S2 by 6degrees.

However, the switching off logic is more difficult. Scenes will only allow S1 <S2 by 0.5degrees which in reality for solar thermal, starts to cool cylinder before switching off the pump.

Ideally I would like switch off when S1>S2 between 2 and 6 degrees.

Any ideas how to achieve this?

I have played with scenes logic but cannot get it to work.

If this is doable. Next issue is to improve cloud latency!