a year ago I started a project here.
A few weeks ago I changed something.
I have tried many different rules and this current one is the best.
Unfortunately it switches where it shouldn't.
Let me explain:
- RelayHeat (GPIO-5) have only to switch, if the temperature TempWater is under FormalALL.
- RelayTime (GPIO-0) have to switch, between 22:00 and 06:00, to heat the Watertank in the Night.
- RelayTime2 (GPIO-14) have to switch, between 23:30 and 04:00, for an additional heater.
On the pictures you can't see it, but the RelayTime works fine. But not the other ones.
RelayHeat switches several times, but it shouldn't.
RelayTime2 switches in the time between 22:00 and 06:00, but it should switch constantly between 23:30 and 04:00.
My question is, can I change it in the Rules?
Code: Select all
On System#Boot do
TimerSet,1,10
endon
On Rules#Timer=1 do
TaskValueSet 4,1,([TempExtern#temperature]-24)
TimerSet, 2,10
endon
On Rules#Timer=2 do
TaskValueSet 5,1,([DAR#Dummy]*[DAR#Dummy])
TimerSet,3,10
endon
On Rules#Timer=3 do
TaskValueSet 6,1,(24+12.3-(0.67*[DAR#Dummy]*(1.4347+0.021*[DAR#Dummy]+247.9*0.000001*[DAR2#Dummy])))
TimerSet,4,10
endon
On Rules#Timer=4 do
if [FormelAll#Dummy]>[TempWater#temperature]
gpio,5,0
else
gpio,5,1
endif
TimerSet,5,20
endon
on WiFi#Disconnected do
TimerSet,5,20
endon
on WiFi#Connected do
TimerSet,5,0
endon
On Rules#Timer=5 do
Reboot
TimerSet,1,10
endon
On Clock#Time=All,**:** do
if %eventvalue2%>=06:00 and %eventvalue2%<=22:00
gpio,0,1
else
gpio,0,0
endif
endon
On Clock#Time=All,**:** do
if %eventvalue2%>=04:00 and %eventvalue2%<=23:30
gpio,14,1
else
gpio,14,0
endif
endon
13442: EVENT: Rules#Timer=1,1
13454: ACT : TaskValueSet 4,1,(7.9-24)
13460: ACT : TimerSet, 2,10
13585: Dummy: value 1: 48.8
13603: EVENT: FormelAll#Dummy=48.8
15247: DS : Temperature: 76.4 (28-ff-0a-c2-21-17-04-17 [DS18B20])
15262: EVENT: TempWater#temperature=76.4
23463: EVENT: Rules#Timer=2,1
23479: ACT : TaskValueSet 5,1,(-16.1*-16.1)
23486: ACT : TimerSet,3,10
23586: Dummy: value 1: 48.8
23599: EVENT: FormelAll#Dummy=48.8
25223: DS : Temperature: 7.9 (28-ff-54-99-21-17-04-6c [DS18B20])
25239: EVENT: TempExtern#temperature=7.9
25262: DS : Temperature: 76.4 (28-ff-0a-c2-21-17-04-17 [DS18B20])
25277: EVENT: TempWater#temperature=76.4
33520: EVENT: Rules#Timer=3,1
33538: ACT : TaskValueSet 6,1,(24+12.3-(0.67*-16.1*(1.4347+0.021*-16.1+247.9*0.000001*259.2)))
33546: ACT : TimerSet,4,10
33585: Dummy: value 1: 48.8
33602: EVENT: FormelAll#Dummy=48.8
34779: WD : Uptime 1 ConnectFailures 0 FreeMem 18712 WiFiStatus: WL_CONNECTED 3 ESPeasy internal wifi status: Conn. IP Init
35250: DS : Temperature: 76.4 (28-ff-0a-c2-21-17-04-17 [DS18B20])
35264: EVENT: TempWater#temperature=76.4
36223: EVENT: Clock#Time=Wed,8:41
36234: ACT : gpio,0,1
36236: GPIO: port#0: set to 1
43578: EVENT: Rules#Timer=4,1
43600: ACT : gpio,5,1
43603: GPIO: port#5: set to 1
43606: ACT : TimerSet,5,20
43612: Dummy: value 1: 48.8
43626: EVENT: FormelAll#Dummy=48.8
45221: DS : Temperature: 7.9 (28-ff-54-99-21-17-04-6c [DS18B20])
45238: EVENT: TempExtern#temperature=7.9
45265: DS : Temperature: 76.4 (28-ff-0a-c2-21-17-04-17 [DS18B20])
45285: EVENT: TempWater#temperature=76.4
53585: Dummy: value 1: 48.8
53603: EVENT: FormelAll#Dummy=48.8
55249: DS : Temperature: 76.4 (28-ff-0a-c2-21-17-04-17 [DS18B20])
55263: EVENT: TempWater#temperature=76.4