Target Humidity

Posted on
Sun Jan 04, 2015 11:44 am
DaveL17 offline
User avatar
Posts: 6753
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Target Humidity

Bringing my HVAC humidifier into Indigo and thought that others would find this script segment helpful. I am basing target humidity on data published by Trane, which suggests the following (fans of the metric system will have to convert the formula to fit):

Code: Select all
Outdoor Temp      Indoor Humidity
+40°F               45%
+30°F               40%
+20°F               35%
+10°F               30%
  0°F               25%
-10°F               20%
-20°F               15%

The 10° range between temperatures means that the outside temperature of 39° will call for 40% humidity (even though you'd want closer to 45%.) Since the relationship between temperature and humidity is linear (and because I can't leave well enough alone), I came up with the formula:

Code: Select all
   targetHumidity = 45 - ((40 - currentTemp) / 2)

So I run this every 15 minutes:
Code: Select all
currentTemp = float(indigo.devices[12345678].states["temp"]) # "OUTSIDE TEMPERATURE"

# not more than 45% humidity
if currentTemp >= 40:
   indigo.variable.updateValue(12345678, '45')
   
# not less than 15% humidity
elif currentTemp < -20:
   indigo.variable.updateValue(12345678, '15')

# temperature is between -20 and 40
else:
   targetHumidity = 45 - ((40 - currentTemp) / 2)
   targetHumidityRnd= round(targetHumidity)
   targetHumidityInt= int(targetHumidityRnd)
   targetHumidityStr = str(targetHumidityInt)
   indigo.variable.updateValue(12345678, targetHumidityStr)

[EDIT} Takes out an unnecessary python variable.
Last edited by DaveL17 on Sun Jan 04, 2015 12:29 pm, edited 2 times in total.

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Sun Jan 04, 2015 11:45 am
matt (support) offline
Site Admin
User avatar
Posts: 21416
Joined: Jan 27, 2003
Location: Texas

Re: Target Humidity

Great tip, thanks for sharing Dave.

Image

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 3 guests