A dummy is a task without any sensor or actor.
Let's say you use task No. 5 and define it as a dummy as you define an usual sensor or actor.
A dummy has 4 "outputs", var1...var4.
It can be set from rules with the command
Code: Select all
taslvalueset <tasknr>,<valuenr>,<value>
So create a dummy in task 5, call it "TempHys" for example, call the values var1...var4.
You may set the values with
Code: Select all
taskvalueset 5,1,[1#Temperature}-5
taskvalueset 5,2,[2#Temperature}+5
You can check the results inside the task list.
These values can be used as any other sensor value, so change your rules to
Code: Select all
on 1#Temperature do
taskvalueset 5,1,[1#Temperature}-5
taskvalueset 5,2,[2#Temperature}+5
if [1#Temperature] > [TempHys#var2]
gpio,5,0
endif
if [TempHys#Var1] < [2#Temperature]
gpio,5,1
endif
endon
It might even be possible to use the formula field within the dummy variables,
they can be set to "%value% - 5" and "%value% + 5".
Just antother thing I didn't note with my last post:
Are you sure, the tasks are just called "1" and "2" as [1#Temperature] says?
This might be not a good idea. I'm not sure if these are really recognized as an event.
If I may suggest (Assuming that it is a heating flow measuring) to call them
Task name: Vorlauf, Value name: Temp
Taskname: Ruecklauf, Value name: Temp
You may check the log if an event is generated at all.
If temperature changes a line with "EVENT Vorlauf#Temp xx.xx" should occur.
(Or "1#Temperature xx.x" with your actual rule)
If no such event is generated, nothing will happen.