I want to build a 3D valve controller on the basis of the ESP 8266 and ESP Easy to control the floor temperature. The temperature is to be set according to the heating curve, i.e. take into account the temperatures outside.
In ESP Easy I have set myself a Dummy Device with 4 variables. -20, -10,0,10
I have assigned values to each variable, 30, 28, 26, 24 in turn.
And now in Rules I want to calculate what the temperature should be for the underfloor when it's e.g. -15°C outside.
This is where school knowledge and a formula found on the internet comes in handy.
a=(yb-ya)/(xb-xa)
y=(x-xa)+ya
In my case xa,ya are the values for curve#-20 q xb,yb are the values for curve#-10, the value of x is tempZewn
In my case the code looks like this:
.
I also tried a version with the whole formula in one variable, it didn't return any value. Probably too many brackets.
Well, and in the preview of the executed functions (tools>log) it displays this value. There are only two problems. When the outside temperature is below the value of [curve#-20] it doesn't display the calculated value but the value entered for -20, if I enter 35 the max is 35, if I enter 38 the max is 38, and I want it to count also for temperatures below -20.
And the second thing is the function
.
It does not assign the variable var#4 to the given shuffle.
Even though a few lines further on there is a function
Anyone able to help me out, guide me to the correct track?
In ESP Easy I have set myself a Dummy Device with 4 variables. -20, -10,0,10
I have assigned values to each variable, 30, 28, 26, 24 in turn.
And now in Rules I want to calculate what the temperature should be for the underfloor when it's e.g. -15°C outside.
This is where school knowledge and a formula found on the internet comes in handy.
a=(yb-ya)/(xb-xa)
y=(x-xa)+ya
In my case xa,ya are the values for curve#-20 q xb,yb are the values for curve#-10, the value of x is tempZewn
In my case the code looks like this:
Code: Arduino
I also tried a version with the whole formula in one variable, it didn't return any value. Probably too many brackets.
Well, and in the preview of the executed functions (tools>log) it displays this value. There are only two problems. When the outside temperature is below the value of [curve#-20] it doesn't display the calculated value but the value entered for -20, if I enter 35 the max is 35, if I enter 38 the max is 38, and I want it to count also for temperatures below -20.
And the second thing is the function
Code: Arduino
It does not assign the variable var#4 to the given shuffle.
Even though a few lines further on there is a function
Code: Arduino
Anyone able to help me out, guide me to the correct track?