I am very new to Node Red, have a question about Sliders

I am looking to take a slider and use it to adjust the value of the output of a dht22 humidity sensor.

The Humidity value is stored in msg.humidity and I would like the interface to allow me to "calibrate" the humidity by the amount selected on the slider.

I already have the humidity level triggering a relay

So will this be a "standing" calibration ? i.e. the same value used to offset the return value from the DHt22 everytime NR is restarted - or would you expect the user to do another calibration after each restart ?

If you want to keep the calibration factor - then take the output of the slider - feed it into a change node and store this in a flow context variable (make sure you have persistent storage setup)

Then reference that flow variable each time you restart node red and/or take a Humidity reading and use that in your calculation

Craig

My initial prototype does not require "standing" calibration. Once I have the code built, I'll be moving on to storing the data in a db. That being said, I can just store this in a flat file and use that as a flow variable.

Thanks for your suggestion. I appreciate it.

Mike

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.