Looking for dewpoint
Moderator: leecollings
-
- Posts: 129
- Joined: Monday 25 November 2013 17:51
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2021.1
- Location: Mallorca
- Contact:
Looking for dewpoint
I'm not sure whether my temperature sensor provides a dewpoint.
How could I check this?
How could I check this?
Rfxcom
Raspi 4
Raspi 4
- waltervl
- Posts: 5893
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Looking for dewpoint
A dew point is only available when also humidity is known. So if you have a combined Temp/humidity sensor a dew point can be calculated and displayed.
Why is your question in dzVents subforum and not in temperature and weather?
Why is your question in dzVents subforum and not in temperature and weather?
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
-
- Posts: 129
- Joined: Monday 25 November 2013 17:51
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2021.1
- Location: Mallorca
- Contact:
Re: Looking for dewpoint
Sorry, you are right. But I was looking for using the dewpoint in a dzVents Script, that's the reason. Sorry again.
Rfxcom
Raspi 4
Raspi 4
-
- Posts: 470
- Joined: Thursday 26 October 2017 13:37
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Delft
- Contact:
Re: Looking for dewpoint
Both on a temphum and a temperture, humidity, barometer device the property dewPoint is available (https://www.domoticz.com/wiki/DzVents:_ ... _scripting, then search for dewpoint)
If you've got a separate temperature and relative humidity value, you can theoretically calculate the dewpoint.http://www.wettermail.de/wetter/feuchte.html (site in German) has some formulas. I went through them a long time ago to calculate the absolute humidity, but I totally forgot how I did it and I don't have the time to put this one into code too. You can try for yourself...
If you've got a separate temperature and relative humidity value, you can theoretically calculate the dewpoint.http://www.wettermail.de/wetter/feuchte.html (site in German) has some formulas. I went through them a long time ago to calculate the absolute humidity, but I totally forgot how I did it and I don't have the time to put this one into code too. You can try for yourself...
- FireWizard
- Posts: 1905
- Joined: Tuesday 25 December 2018 12:11
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Voorthuizen (NL)
- Contact:
Re: Looking for dewpoint
Hello @jkimmel,
As @rrozema already said, if you intend to use a combined temperature/humidity and/or barometer device, Domoticz will calculate the dew point itself.
However, if you have separated values and want to calculate the dew point yourself, in order to send it e.g to a "Custom sensor", called "Dew Point", you may find some useful information at: https://bmcnoldy.rsmas.miami.edu/Humidity.html
Especialy look to the "Spreadsheet-ready equations" and you will find the corrct formula.
I used it in a Node Red flow once, with the following Javascript code in a " Function" node.
Of course, you can use this formula in any script language, you prefer.
Regards
As @rrozema already said, if you intend to use a combined temperature/humidity and/or barometer device, Domoticz will calculate the dew point itself.
However, if you have separated values and want to calculate the dew point yourself, in order to send it e.g to a "Custom sensor", called "Dew Point", you may find some useful information at: https://bmcnoldy.rsmas.miami.edu/Humidity.html
Especialy look to the "Spreadsheet-ready equations" and you will find the corrct formula.
I used it in a Node Red flow once, with the following Javascript code in a " Function" node.
Code: Select all
function dewpoint(T,RH) {
var TD = 243.04 * (Math.log(RH/100)+((17.625*T)/(243.04+T)))/(17.625-Math.log(RH/100)-((17.625*T)/(243.04+T)));
return TD;
}
msg.payload = {"command":"udevice","idx":13584,"nvalue":0,"svalue":dewpoint(msg.payload.temperature,msg.payload.humidity).toString()};
return msg;
Regards
-
- Posts: 129
- Joined: Monday 25 November 2013 17:51
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2021.1
- Location: Mallorca
- Contact:
Re: Looking for dewpoint
My sensor delivers combined temp/humidity as well as two separate values for temp and humidity.rrozema wrote: ↑Sunday 12 September 2021 7:48 Both on a temphum and a temperture, humidity, barometer device the property dewPoint is available (https://www.domoticz.com/wiki/DzVents:_ ... _scripting, then search for dewpoint)
If you've got a separate temperature and relative humidity value, you can theoretically calculate the dewpoint.http://www.wettermail.de/wetter/feuchte.html (site in German) has some formulas. I went through them a long time ago to calculate the absolute humidity, but I totally forgot how I did it and I don't have the time to put this one into code too. You can try for yourself...
Domoticz is calculating the dewpoint, see here: So i defined
Code: Select all
local dewpoint = dz.devices(TEMPERATURE_SENSOR).dewPoint
Code: Select all
dz.log('Current dewpoint: ' .. dewpoint, dz.LOG_INFO)
Code: Select all
2021-09-13 11:57:00.569 Error: dzVents: Error: (3.1.7) ...z/scripts/dzVents/generated_scripts/Klima Wohnzimmer.lua:52: attempt to concatenate a nil value (local 'dewpoint')
Rfxcom
Raspi 4
Raspi 4
-
- Posts: 470
- Joined: Thursday 26 October 2017 13:37
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Delft
- Contact:
Re: Looking for dewpoint
Have you tried .dewPoint as per the documentation? Lua is case sensitive.
-
- Posts: 129
- Joined: Monday 25 November 2013 17:51
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2021.1
- Location: Mallorca
- Contact:
Re: Looking for dewpoint
As you can see above the local variable dewpoint is defined as
Code: Select all
local dewpoint = dz.devices(TEMPERATURE_SENSOR).dewPoint
Rfxcom
Raspi 4
Raspi 4
-
- Posts: 470
- Joined: Thursday 26 October 2017 13:37
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Delft
- Contact:
Re: Looking for dewpoint
Code: Select all
local TEMPERATURE_SENSOR = 'Woonkamer: TempHum'
return {
on = {
timer = {
'every minute'
}
},
logging = {
level = domoticz.LOG_INFO,
marker = 'test',
},
execute = function(domoticz, device)
local sensor_device = domoticz.devices(TEMPERATURE_SENSOR)
if nil == sensor_device then
domoticz.log('Device ' .. TEMPERATURE_SENSOR .. ' not found.', domoticz.LOG_ERROR)
else
local dewpoint = sensor_device.dewPoint
domoticz.log('"' .. sensor_device.name .. '" : ' .. sensor_device.deviceType .. ', dewpoint = ' .. tostring(dewpoint) .. '.', domoticz.LOG_ERROR)
sensor_device.dump()
end
end
}
For me the output is:
- Spoiler: show
- waltervl
- Posts: 5893
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Looking for dewpoint
Works for me too:rrozema wrote: ↑Monday 13 September 2021 20:30
Please try the above. It should not give the previous error. instead this either lists the dewpoint value or the message that your device was not found. Given of course you change the name in the top of the script to the name of your temphum sensor. Plus, it dumps all of your sensor's properties so you can check their value.
2021-09-13 21:08:00.517 Error: dzVents: Error: (3.1.7) test: "Buiten TempHumBaro" : Temp + Humidity + Baro, dewpoint = 11.939999580383.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Who is online
Users browsing this forum: Google [Bot] and 1 guest