Using indoor dew-point and node-red to control temperature/relative humidity

Nope. :slight_smile:

The difficulties in control in this building are that it is just a 24 x 30 metal shop kit with spray-foam insulation. We're living in it until we're able to build a new house.

The "HVAC System" in the bedroom is a window air conditioner on a zigbee outlet.

The "HVAC System" in the 24 x 20 main area is a larger window unit that is self-controlled and that doesn't quite keep up with a Texas heat (you can see the outdoor temperature there) without arranged help from the bedroom unit.

I'm not home right now, but looking at this I'd guess my wife left the bedroom door closed when she left this morning so the bedroom HVAC isn't helping the living room HVAC out at all. :stuck_out_tongue:

1 Like

So I've just finished "calibrating" my ecobee and a pair of Sonoff temperature and humidity sensors in order to test your dewpoint control method this summer. I was shocked that the ecobee temperature seemed to be off by 2.0 deg. F. and the relative humidity was off by 8%. The $8 Sonoff sensors were more accurate out-of-the-box than the $200 ecobee. I think that at least part of the error is due to internal heat dissipation from the electronics.

Anyway, your previous comments indicate you use a 1.5 degree deadband on the dewpoint value but the screenshot of your Node Red flow seems to show 2.5 degrees. Can you confirm which you've been using?

1.5 degrees for Home/Sleep mode. 2.5 degrees for Away mode.

Thank you for the dewpoint app. I am hoping this will settle arguments about the thermostat at home.

I would like to graph the measurements and have notations when the HVAC cycled off and on. Is there a simple way to accomplish this in Hubitat, or if outside of Hubitat, with least coding required?

Well, depends on what you mean by 'simple'. I think the community would suggest that this is best done outside of Hubitat, and there are a few discussion topics here that will give you some guidance. Here's the one that started me down the path I've taken:

The quick summary is:

  1. Get a Raspberry Pi (or equivalent compute node)
  2. Install a time series-capable database (Influx, MySQL, ...) to store Hubitat device events
  3. Install Grafana to render the device events in graphical form
  4. Configure Hubitat MakerAPI to feed the time series database (via NodeRed or a Hubitat app)
  5. Configure Grafana visualizations however you want

Here's one of my Grafana dashboards for the Upstairs HVAC, to give you an idea about what is possible:

I guess this is a lot of complexity is all you want to do is create a single visualization with a couple of variables. I use this "stack" for a lot of other things as well, so makes more sense if that's where you think you will go with it.

The InfluxDB/Grafana combo is pretty common, there are lots of resources on the web about setting up this stack (using Docker, installing standalone, installing on a NAS, ...).

As mentioned above there are a lot of informative discussion topics on this forum as well, just search for Influx or Grafana.

Hopefully others will chime in on simpler methods that would possibly do the job for what you described. I went down this path mainly because I used to be involved in the industrial automation software and systems integration realm, so why not kit out my home with similar capability :crazy_face:


Those are beautiful and useful looking graphs! I no longer have the energy and mindspace to code due to my health condition, so I just went ahead with the unsupported HubiGraph app.

I haven't tweaked all the settings yet but, here is a screenshot. I am keeping an eye on how often my HVAC remains idle (gray area plot indicates "idle", while empty indicates fan or cooling) while maintaining my desired dewpoint range.

How might I get the dewpoint calculated from multiple temperature and humidity probes, using your app? I guess this is a feature request that I must post in your thread, if I can find it...

Yes that is a good visual, I've seen some performance caveats about HubiGraph on this forum when it's applied extensively, so please keep that in mind.

As far as averaging sensor values, what I do is use @bravenel public averaging apps on GitHub here to create an average temperature device and an average humidity device, then point the dewpoint app at those two averaged sensors.

I thought about incorporating code to perform averaging of the temp and humidity in my app, but no real advantage to doing so.

1 Like

Oh, thank you so much for your help!

I now have exactly what I wanted. I just have to observe if my family is comfortable with the dewpoint settings I applied.

1 Like

Thank you @aaiyar for sharing your thoughts and idea for dew point AC system control. Also thanks to @Guffman and @JohnRob for the groovy code I used as a starting point for my dew point app with independent room control.

To my surprise the house is currently comfortable at T: 79F, RH 50%, TD: 58.6F

Just wondering if adding some additional Humidly sensors would make this more accurate?

My devices
5 Fujitsu mini splits
5 virtual thermostats with temperature set by average temperature app
One whole house virtual thermostat set by average temperature app (setting mode to dewpt triggers the dew point app)
Ecobee thermostat mainly used for humidity, average temperature (and winter heating)

The Dew Point app adjusts the 5 virtual thermostats, triggering
My personal mini-split app sending device control requests to the
Deprecated Broadlink Device app controlling
5 Broadlink IR devices sending codes to the mini-splits

My AC cool settings 7:30Am 77.5; 11:30PM 80 except master BR 76.5, Away 85
Dew Point settings: Disarm/Home On:59 Off 58.9; Night On 58 Off 57.9: Away On 64 Off 63.8

I'm still tweaking all of this so things may change.

App Source


To a point.

I have a small upstairs/downstairs house with different sets of sensors used in Home/Away/Sleep modes. In sleeps mode I rely on the sensors that are downstairs (total of 5). During Home mode, I use a larger mix of sensors, and during Away mode, I use just the upstairs sensors because that is way my cats tend to congregate.

1 Like

My house is a very long ranch mostly on a slab with a small basement at one end of the house with the Master and Spare bedrooms. The basement holds the heating system, hot water heater, etc. The Ecobee humidity sensor is close to the Master and Spare BRs.

I was considering adding one humidity sensor near the Kitchen/Dining Room and Office, and averaging humidity for the middle of the house Living Room.

A humidity sensor is inexpensive and I won't know if matters until I try it. I'll likely purchase a Sonoff sensor from Amazon. There are some very nice zigbee temperature/humidity sensors with displays available from China, but I'm not keen on using Alibaba and waiting ~month for shipping.

1 Like

After reading about some issues with the Sonoff humidity sensors, and despite my dislike for purchasing off of Aliexpress, three Zigbee Tuya's from Aliexpress are now making their slow journey from China. The device is supported by @kkossev's driver.

My first choice was Konke, but I could not find them anywhere.

just sent you a pull request that enables an event-based schedule and/or the existing periodic.

1 Like

Thanks, now merged.

1 Like

@Guffman , I finally have influxdb and grafana. Care to share json of your dashboard? Looks like the kind of visualization that I could use for my hvac.

Sure, take a look in here in Github, let me know if importing either of these works.

1 Like

Thank you! I was able to import the Downstairs one and see the panels. No panels appeared in the Operating State one.

Can you recommend an approach one might take to set up a translation of the text values for thermostat operating state (e.g. "cooling") into integer values, either in influxdb or in grafana?

I have a workaround in influxdb logger (It was only setting valueBinary for heating (1) and everything else to zero, but I was curious if there is a way to do this in the db or visualization side.

Here are a few screenshots of the data and the translation I implemented in Hubigraphs


The grafana screenshot shows my desired outcome.

I may be mistaken, I recall from when I first used the InfluxDb Logger app a while ago, that in addition to 'the valueBinary' field, it also wrote to a 'valueState' field. So suggest that you attempt to query that and see if it's there. For reference I pulled some code from one of the public thermostat drivers to show the mapping from the various thermostat state attributes (thermostatOperatingState, thermostatMode, thermostatFanMode) to integer:

@Field static Map THERMOSTAT_OPERATING_STATE=0x00:"idle",0x01:"heating",0x02:"cooling",0x03:"fan only",0x04:"pending heat",0x05:"pending cool",0x06:"vent economizer"]
@Field static Map THERMOSTAT_MODE=0x00:"off",0x01:"heat",0x02:"cool",0x03:"auto",0x04:"emergency heat"]
@Field static Map THERMOSTAT_FAN_MODE=0x00:"auto",0x01:"on",0x02:"auto",0x03:"on",0x04:"auto",0x05:"on",0x06:"circulate",0x07:"circulate"]

Again if memory serves me well the InfluxDb field 'valueState' would then be assigned these values in the thermostatOperatingState measurement, given the above mappings:

0 : idle
1 : heating
2 : cooling
3 : fan only
4 : pending heat
5 : pending cool
6 : vent economizer

I'm not using the InfluxDb Logger app anymore, so I can't verify this behavior. Perhaps someone can chime in who can.

Hope this helps.

OK I just looked at the most recent InfluxDb-Logger code in Github, there isn't any writing of a 'valueState' in there.

Yes, I saw that. I wanted a quick and dirty ( since I don't have much stamina and am not familiar with Go and Hubitat nuances), so I cane up with the additions below based on how I saw valueBinary being set:

String valueState = ''


valueState = ('heating' == evt.value) ? '100i' : valueState

valueState = ('pending heat' == evt.value) ? '85i' : valueState

valueState = ('vent economizer' == evt.value) ? '65i' : valueState

valueState = ('idle' == evt.value) ? '50i' : valueState

valueState = ('fan only' == evt.value) ? '35i' : valueState

valueState = ('pending cool' == evt.value) ? '15i' : valueState

valueState = ('cooling' == evt.value) ? '0i' : valueState

data += ",unit=${unit} value=${value},valueBinary=${valueBinary},valueState=${valueState}"


These of course reflect my preferences. So. I guess I am all set.

Download the Hubitat app