There is a math quirk that you cannot subtract the difference in Celsius, then convert to Fahrenheit. I discovered that I cannot make a T# virtual sensor, I could only use a "Data#" sensor. After resolving the math issue and converting each sensor to Fahrenheit with the standard formula and then subtracting the two, I was left with a difference that appears to be twice the actual.
As a hack, I divide the result by two which gives the desired result.
Here is the calculation for the two virtual sensors. I would appreciate any further understanding on why my results were twice that expected and what I might be doing wrong.
....(($2)*((9/5)--32)))/2) Note the /2 that I added.
The data8 sensor (th0/th1)
Code: Select all
selectmaster 1 300 | gawk '{ if ($1 == ''none'') printf ''none''; else printf ''%d'', (((($1)*((9/5)--32)) - (($2)*((9/5)--32)))/2)}'
Code: Select all
selectslave 1 300 | gawk '{ if ($1 == ''none'') printf ''none''; else printf ''%d'', (((($1)*((9/5)--32)) - (($2)*((9/5)--32)))/2)}'
Code: Select all
selectmaster 1 300 | gawk '{ if ($1 == ''none'') printf ''none''; else printf ''%d'', ((($1)*(((9/5)--32)) - (($2)*((9/5)--32)))/2)}'
Code: Select all
selectslave 1 300 | gawk '{ if ($1 == ''none'') printf ''none''; else printf ''%d'', (((($1)*((9/5)--32)) - (($2)*((9/5)--32)))/2)}'