Absolute humidities

Moderator: leecollings

Post Reply
rrozema
Posts: 470
Joined: Thursday 26 October 2017 13:37
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Delft
Contact:

Absolute humidities

Post by rrozema »

I have several 'TempHum'-devices in my home, devices that sense both temperature and (air) humidity. The humidity value in these sensors is the so-called Relative Humidity (RH): "the ratio of the partial pressure of water vapor to the equilibrium vapor pressure of water at a given temperature" as that wiki page states it. Or as I think of it: A percentage for how much water is in the air, where 0% is no water at all and 100% is where it "starts to rain". Not really, for actual rain you need more conditions apparently, but at least it is the maximum amount of water the air can hold.

I am controling my Heat Exchanger unit based on o.a. that relative humidity, and as many before me have noticed the 100% of the RH varies depending on the temperature, so it doesn't always work really well. To work around this I have a shifting setpoint for my system: depending on the outside air's RH the inside RH target value changes. By looking at the logged data I found that my system can make the inside air's RH at most roughly 20% lower than the outside air's RH, so if the difference is over 20% I simply shift the target value up, to avoid having the fans running all day long. Reading about the topic of RH I found formulas that would enable me to calculate the absolute humidity (AH) given a temperature plus a relative humidity. Out of curiosity I wrote this little script that calculates the absolute humidty (AH) in gram per cubic meter for each of my TempHum-devices. I have no application for it (yet?), it is just to show and log the AH-values for now. This is what I get:
absolute humidity sensors.JPG
absolute humidity sensors.JPG (71.73 KiB) Viewed 1775 times
The script is in my github: https://github.com/rrozema/Domoticz-scr ... dities.lua.

What I did to make this work:
  • each of my TempHum devices is named as "<Room name>: TempHum".
  • for each TempHum device that I wanted a AH value for I created a virtual sensor of type 'Custom Sensor':
    absolute humidity - virtual device.JPG
    absolute humidity - virtual device.JPG (22.76 KiB) Viewed 1775 times
    .
  • then I put the script in the scripts window in Domoticz and enabled it.
  • wait for the values to be updated by new incoming temperature or RH values.
User avatar
Antori91
Posts: 136
Joined: Sunday 12 February 2017 17:12
Target OS: NAS (Synology & others)
Domoticz version: 4.10717
Location: France
Contact:

Re: Absolute humidities

Post by Antori91 »

Interesting. Thank you for sharing.
Domoticz High Availability Cluster: Synology Dz V4.10693 (Main) - Raspberry Dz V4.10717 (Backup) - Scripts Node.js
Alarm server: Raspberry - motionEye - iot_ALARM-SVR Node.js
Sensors/Actuators: ESP8266-Arduino
https://github.com/Antori91/Home_Automation
Rofjekv
Posts: 3
Joined: Sunday 25 September 2022 8:18
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Absolute humidities

Post by Rofjekv »

Hello rrozema,

Thank you for shearing, this is very usefull. I tried to activate it through the Events menu but it not working. I can't find the issue after 2 hours of troubleshooting and testing. Could you be more specific about the scripts window in Domoticz please?
Maybe it's only a version upgrade in domoditc or a trigger setting ?

Thanks a lot :)
rrozema
Posts: 470
Joined: Thursday 26 October 2017 13:37
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Delft
Contact:

Re: Absolute humidities

Post by rrozema »

Just create a new script by clinking the +-sign in the tab bar. Pick any of the dzvents script types, doesn't matter which. Then paste my script contents over that what was generated for you. Then name and save the script.
Rofjekv
Posts: 3
Joined: Sunday 25 September 2022 8:18
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Absolute humidities

Post by Rofjekv »

Yes I did that many times, and I just retried, but i found out that the domoticz don't start the script on sensors events (new data).
I had to specify wich sensor name to make it work, but this mean I have to duplicate the script for each sensor.
solarboy
Posts: 300
Joined: Thursday 01 November 2018 19:47
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.6
Location: Portugal
Contact:

Re: Absolute humidities

Post by solarboy »

"Dew Point" is a very good substitute for absolute humidity.
Intel NUC with Ubuntu Server VM (Proxmox),mosquitto(docker),RFXtrx433E,zwavejsUI (docker),Zigbee2mqtt(docker),SMA Hub (docker),Harmony Hub plugin, Kodi plugin,Homebridge(docker)+Google Home,APC UPS,SMA Modbus,Mitsubishi MQTT, Broadlink,Dombus
Rofjekv
Posts: 3
Joined: Sunday 25 September 2022 8:18
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Absolute humidities

Post by Rofjekv »

Well not for psychrometric calculs... I want to evaluate the airflow of the mechanical ventilation system and I need to convert the humidity to absolute
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest