Guffman Dewpoint Calculator Virtual App - sending to Homekit - using for deciding about windows vs. AC

@Guffman tagging you for vis...

I'm using your virtual app to calculate dewpoint. My goal with this is to (for now) make a good decision on if I should open the windows and let fresh air in, or if I should be using my A/C. Summers for me get really humid at night which is when I often want to take advantage of "free cooling" by opening windows and/or turning on window fans to suck in the cool air overnight. The problem is, when it's super humid outside my humidity indoor can spike quite high (80% even). I also have a "whole house fan" which is fantastic at refreshing air in the home very quickly.

So my plan was to simple display indoor and outdoor dewpoint and use that to base my decision making. One day I may figure out better automation for it.

Anyway, I really dislike the hubitat dashboard and I don't have the coding expertise to make anything that looks good and works for me so far. Therefore, I'm really "all in" on apple homekit. I was hoping to be able to send dewpoint from your virtual app to homekit, but when I do it just shows "0" - it's like it's can't read the actual value coming from the app to the virtual device when it's exposed to homekit.

Do you or anyone else have any suggestions for how to get that functional? THANKS!

I have to LOL - it started working after an hour =).

Crisis averted, but I'll leave this up in case anyone else has the issue - just wait!

Any other tips/advice welcome from a dewpoint expert!

Glad it got unstuck.

I also use the IOS Home app (as does the rest of the household) for all user interaction with the Hubitat home automation apps, sensors and controls.

For future reference, when mapping Hubitat virtual devices through to HomeKit, you can test the device-to-HomeKit path by manually entering a value (or state) in the Hubitat device detail web page. HomeKit should pick up the change immediately and update all the Home app indicators accordingly.

As to the indoor humidity control question, I live in the gulf south so most of the year the outside humidity is too high to consider exchanging outdoor air for indoor air as a means to drop the indoor temperature. Also the home contents are really good at absorbing moisture, condensing on colder surfaces, etc. so avoiding mold/mildew conditions is really important. For me, it's all about controlling the A/Cs and separate dehumidifiers to get the indoor dewpoint where I want (and maintaining good filtration too).

Gotcha. How do you get fresh outside air in general in your home - do you ever even crack the windows?

I have Hubitat control (Z-Wave switches) of the ventilation fans in two of the bathrooms. I keep track of run time, and if people are home, and the fans haven't pushed "enough" air out of the house via normal activation by the occupants, I run them for a bit.

Not the best way to introduce fresh air, but aside from adding a fresh air intake directly into my air handler, that's the only means I have. I'm thinking about adding a variable speed controller to the kitchen range hood and playing around with that.

There is a proper way HVAC-engineering-wise to efficiently introduce outside fresh air. I think that @aaiyar might have some sage advice on that topic, so tagging him here.

Sounds good.

I’m now realizing the virtual sensors aren’t updating the values ever. Any tips while I have you? Ha!

To be clear, the Hubitat virtual temperature device temperature current state doesn't agree with the Home app device, when viewed through the Home app on an Apple iPhone/iPad?

Nope even the device in Hubitat appears to be stuck and not updating every 5 min as listed in the dropdown. I have 3 sensors and none of them have changed it turns out since creation. I tried remaking and same result.

Adding an error from logs. But that’s only on one device. The other 2 don’t show errors but still haven’t updated since they were installed 4 hours ago.

app:242024-05-02 09:31:09.931 PMerrorgroovy.lang.MissingMethodException: No signature of method: java.lang.String.div() is applicable for argument types: (java.lang.Integer) values: [100]
Possible solutions: drop(int), is(java.lang.Object), wait(), trim(), size(), size() on line 182 (method updated)

Ok I will investigate. Can you take a screenshot of the app configuration web page and post here?

App page for one example below! I’ll post device page on the next reply.


Device page for same sensor.





OK thanks. I looked at the version in Github, it's not the version I'm currently running in my hubs. I think there were some community pull requests a couple of years ago I may have merged (but not fully-tested?).

Try this one. It's what I've been using for a while, so added it to Github as a new app.

Suggest adding this as a new Hubitat application and starting configuration from scratch. Apologies for the inconvenience.

Also I noticed from the screenshots that the virtual temperature device was not added to the Hubitat HomeKit app (HomeKit Enabled radio button not set), You will want to do that to then add/view the device in the IOS Home app.

OK I deleted all apps, child devices, and the app code. Then I used your link - and still seeing some issues with 2 out of 3 doing the same thing. One of them seems to be working fine though...

For the 2 devices not working right, it's showing 72 as the value, and not updating. It looks like it correctly calculated it and a few miliseconds later changed its mind with the error =).

app:272024-05-03 04:49:42.645 PMerrorgroovy.lang.GroovyRuntimeException: Ambiguous method overloading for method java.lang.Double#multiply.
Cannot resolve which method to invoke for [null] due to overlapping prototypes between:
[class java.lang.Character]
[class java.lang.Number] on line 125 (method installed)
app:272024-05-03 04:49:42.630 PMdebugDewpoint - Primary Bedroom In calcDewpoint, prevDewpoint=null, currentTemp=74.8, currentHumid=51.0, result=55.467451314638126, newDewpoint=55.5
app:272024-05-03 04:49:42.619 PMdebugDewpoint - Primary Bedroom tempOffset = 0.0, humidOffset = 0.0

Update - I went into the 2 "not working" apps, and clicked done on them, trying to refresh it basically. Now it calculated and no error showing. I'll monitor for a day and see if it stays working!

Thanks, it seems there is some kind of initialization bug, likely due to data typing (or lack thereof) in the code. Please let me know how things progress.

If it is still creating errors in the log, try setting the virtual device temperature to a decimal value (like 60.0) and see if that resolves the error when the calculation executes.

I'm not a groovy guru, and have made some data typing errors before in some of my apps. Please forgive me.

You are forgiven! So far so good over here, so I think you're right, it's just on initialization it appears. Thanks for the help!