Absolute Humidity virtual device

I’ve created a simple plugin that calculates the dewpoint and absolute humidity for a temperature/humidity sensor. I’ve only tested this on the EverSpring ST814 since that’s all I have available - I’m assuming that other temperature/humidity devices expose the same services, but I haven’t checked this.

My intention is to use this information to turn on a ventilation system when the absolute humidity outside is lower than inside. The device doesn’t (currently!) support notifications, but it should still be possible to use the output in scenes. It also only supports metric (deg C for dewpoint and g/m3 for humidity)

Anyway, here it is if it’s of use to anyone else…

Chris

Upload the files using the “MiOS Developers” button. Click on Luup Files and upload the 5 files for the plugin.

Create a new device with the following parameters -:
DeviceType: urn:cd-jackson-com:serviceId:AbsHumidity1
Description: Your sensor name
UpnpDevName: D_AbsHumidity1.xml
UpnpImplFilename: I_AbsHumidity1.xml

Click “Create Device”. Restart Luup.

You should now have a device. Click on the devices options, go to the Advanced tab.
You should see a variable “sensorParent” - change this to the parent Temperature/Humidity device.

Chris

I cam Pm you but I will like to be able to talk to you about you work with the system, How I can contact you. PLease let me know if is possible.

Can you PM? I think this isn’t available until you’ve posted 25 responses (which in my mind is a silly restriction).
Otherwise, you can email me at chris at cd-jackson dot com (substituting the @=at and dot=.).

Update of the relative humidity sensor to fix a problem with data update.

Hi Chris,

Would you mind if I move this thread to the Plugins section?

Sure - that’s fine by me.

My Google weather is set to F and when installing this plugin it seems to show my dewpoint correctly in F - is that not true? (i’m asking because it doesn’t seem to working in scenes properly)

M

My Google weather is set to F and when installing this plugin it seems to show my dewpoint correctly in F - is that not true? (i’m asking because it doesn’t seem to working in scenes properly)[/quote]

No - I don’t think just changing the Google weather plugin to F will work. It’s been a while since I looked at this plugin, but I expect the formulae is different for imperial and metric.

Once I get done with getting dataMine released (in the coming days) I’ll try and remind myself of how this works and possibly move it to UI5 (are you using UI5?).

Chris

Yes, UI 5

Have you been able to look at this yet?

I would also love an adaptation to a newer UI. Also planning to have attic ventilation run during optimal circumstances.

Hi,

Can someone help, I’m having trouble getting the plugin to update automatically.

If I reload Lua the values update.

I’m on a Vera 2 with firmware 1.5.622 and have used the “Update of the relative humidity sensor to fix a problem with data update” files.

Thanks in advance for any help and on a great plugin (if I can get it to auto update).

[quote=“Bradleisure, post:12, topic:169184”]Can someone help, I’m having trouble getting the plugin to update automatically.

If I reload Lua the values update.[/quote]

I got sort of the same problem, the variable values only updates two or three times a day. Any ideas on how to resolve this would be appreciated.

mvh//J

[quote=“Bradleisure, post:12, topic:169184”]Hi,

Can someone help, I’m having trouble getting the plugin to update automatically.

If I reload Lua the values update.[/quote]

This is how I solved this problem:

In the file “L_AbsHumidity1.lua”, function “watchVariable”:

Comment out the luup.call_delay line, and reinstate the Calculate line below.

[tt]
function watchVariable(lul_device, lul_service, lul_variable, lul_value_old, lul_value_new)
luup.log("AbsHumidity IN: “…lul_service…” “…lul_value_new…” “…RelHumidity…” "…Temperature)
if(lul_service == HUMIDITY_SERVICE) then
RelHumidity = lul_value_new
end
if(lul_service == TEMPERATURE_SERVICE) then
Temperature = lul_value_new
end

luup.log("AbsHumidity OUT: "..RelHumidity.." "..Temperature)

– luup.call_delay(“Calculate”, 5, “”)

Calculate()

end
[/tt]

Save and upload the file to the Vera.