Value formula, seems to work, but can anyone confirm?

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
Strider336
Normal user
Posts: 14
Joined: 13 Jan 2018, 11:51

Value formula, seems to work, but can anyone confirm?

#1 Post by Strider336 » 14 Oct 2018, 12:46

I have an AM2302 sensor attached to a NodeMCU3, running ESPEasy (v2.0-20180113), i'm using to monitor temp/humidity in my garage and control a dehumidifier on a Sonoff switch (running 147) on the other side of the room.

The problem I have is the sensor is horribly inaccurate, temperature is OK, but relative humidity reads around 55% when it's actually 65%, and reads around 45% when it really is 50%.

I really wanted to add a percentage to the value, and noting that % is not an option, I've used formula %value%/100*15+%value% to increase by 15% (actually needs to be more like 20%, but later), it seems to work, but the use of long formulas does not seem to be documented at https://www.letscontrolit.com/wiki/inde ... asyFormula

It works, but I do wonder if there's a reason it's not documented? Usually if something like this is omitted from documentation, then it's for a very good reason.

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: Value formula, seems to work, but can anyone confirm?

#2 Post by grovkillen » 14 Oct 2018, 13:35

I don't think your formula is very long, complicated or unusual. The wiki only explain the formula functions in general terms.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

Strider336
Normal user
Posts: 14
Joined: 13 Jan 2018, 11:51

Re: Value formula, seems to work, but can anyone confirm?

#3 Post by Strider336 » 14 Oct 2018, 16:15

grovkillen wrote: 14 Oct 2018, 13:35 I don't think your formula is very long, complicated or unusual. The wiki only explain the formula functions in general terms.
:)

I know, but i'm just careful since I bricked a NodeMCUV3 for no apparent reason after adding a new rule. :oops:

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: Value formula, seems to work, but can anyone confirm?

#4 Post by grovkillen » 14 Oct 2018, 16:31

Strider336 wrote: 14 Oct 2018, 16:15
grovkillen wrote: 14 Oct 2018, 13:35 I don't think your formula is very long, complicated or unusual. The wiki only explain the formula functions in general terms.
:)

I know, but i'm just careful since I bricked a NodeMCUV3 for no apparent reason after adding a new rule. :oops:
That must have been a corrupt settings file or similar? Don't see how you could brick the unit really.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

Strider336
Normal user
Posts: 14
Joined: 13 Jan 2018, 11:51

Re: Value formula, seems to work, but can anyone confirm?

#5 Post by Strider336 » 14 Oct 2018, 17:43

grovkillen wrote: 14 Oct 2018, 16:31
Strider336 wrote: 14 Oct 2018, 16:15
grovkillen wrote: 14 Oct 2018, 13:35 I don't think your formula is very long, complicated or unusual. The wiki only explain the formula functions in general terms.
:)

I know, but i'm just careful since I bricked a NodeMCUV3 for no apparent reason after adding a new rule. :oops:
That must have been a corrupt settings file or similar? Don't see how you could brick the unit really.
It got to a point where it refused to start, serial data showed it was stuck in a loop, reflash wouldn't fix it, the only solution (which I read about on some forum) I didn't try was reflashing the original NodeMCU firmware. But that's not really a problem, I just want to avoid screwing up any more of these boards.

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: Value formula, seems to work, but can anyone confirm?

#6 Post by grovkillen » 14 Oct 2018, 17:57

A blank bin file flash solves most corruption problems.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

Post Reply

Who is online

Users browsing this forum: No registered users and 24 guests