Open Need some help with a math formula

Discussion in 'Tasker' started by Michael Crossland, Sep 20, 2019.

  1. Michael Crossland

    Michael Crossland New Member

    Joined:
    Sep 15, 2015
    Messages:
    1
    Likes Received:
    0
    I am trying to setup a test that will take two verables I've setup. One is the room temperature from my Arduino and the other is the relative humidity from the same Arduino.
    I've found a formula to get a feels like temperature but when I input it into Tasker I get told I'm am not doing something right.
    Here is the formula.
    0.5*{%Avg+61.0+[(%Avg-68.0*1.2]+(%RH1*0.094)}
    The %Avg is my Temperature verable and the %RH1 is the Relative Humidity.
    Now here is what Tasker is telling me.

    17.46.27/Variables doreplresult: |%RH2| -> |159.224|
    17.46.27/Variables doreplresult: |0.5*{%Avg+61.0+[(%Avg-68.0*1.2]+(%RH1*0.094)| -> |0.5*{80.4+61.0+[(80.4-68.0*1.2]+(0.25*0.094)|
    17.46.27/E Variable Set: %RH2 -> %RH2
    17.46.27/Variables doreplresult: |0.5*{%Avg+61.0+[(%Avg-68.0*1.2]+(%RH1*0.094)| -> |0.5*{80.4+61.0+[(80.4-68.0*1.2]+(0.25*0.094)|
    17.46.27/Expr mathEval: 0.5*{80.4+61.0+[(80.4-68.0*1.2]+(0.25*0.094): dsv/Variable Set/0.5*{%Avg+61.0+[(%Avg-68.0*1.2]+(%RH1*0.094): Mathematical expression contains the invalid value "{80.4" at offset 4 in expression "0.5*{80.4+61.0+[(80.4-68.0*1.2]+(0.25*0.094)"
    17.46.27/E Variable Set: %RH2: failed, not numeric ?
    17.46.27/E result: stop task (error)
    17.46.27/Variables doreplresult: |%RH2| -> |159.224|
    17.46.27/E Error: 1
    17.46.27/MacroEdit action finished exeID 123 action no 1 code 547 status: Err next 1
    Any help with getting this to work would be great thanks.

    As and update I removed the {} and [] and replaced them with () and tasker works with that but the number it comes up is way to low then it should be all most 10 to 12 degrees.
     
    Last edited: Sep 21, 2019
  2. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    {} and [] are indeed not valid characters there. Are you sure the expression is correct?
     
: MATH

Share This Page