SANdood / Ecobee-Suite

Ecobee Suite is for integrating Ecobee thermostats & sensors with the Hubitat home automation platform
109 stars 153 forks source link

Factor in dewpoint for Wunderground temperatures #6

Closed richardpeng closed 5 years ago

richardpeng commented 6 years ago

This is very incomplete because I don't entirely understand whether the SmartThings Temperature Sensor or the Thermostat's Weather Temperature can provide dew point. However, this should work for Wunderground.

SANdood commented 6 years ago

You can calculate the dew point from the current temperature and relative humidity % using: tF = tempFahrenheit rh = relativeHumidity tC = (tF-32)/1.8 dpF = ((243.04*(Math.log(rh/100)+((17.625*tC)/(243.04+tC)))/(17.625-Math.log(rh/100)-((17.625*tC)/(243.04+tC))))*1.8)+32

SANdood commented 6 years ago

I have taken a different approach to your suggested edits: 1) I handle all supported data sources, even those that don't provide 'dewpoint' 2) I only override the belowMode 'off' if the dewpoint is higher than specified, otherwise, runs as normal 3) At your suggestion, I added an above-dewpoint to enable the aboveMode

Additionally, I have (separately) updated Ecobee Suite Thermostat do provide the dewpoint that comes from Ecobee, and I have added a couple more alternative data sources (including my own new Meteobridge Weather Station).

If you'd like to test and give feedback, just use the attached with the WeatherUnderground data source (the rest won't work without the other updated files):

ecobee-suite-smart-mode-1.5.04.txt

richardpeng commented 6 years ago

I just installed 1.5.04 and was able to initialize it. The only thing that caught me off guard was the PWS prefix requirement of pws:. Once I added that I was able to initialize the app.


94d48981-968d-437b-85e5-73f735207225  12:19:36 PM: info Summer Windows Temperature is: 78.6°
94d48981-968d-437b-85e5-73f735207225  12:19:36 PM: info Summer Windows Dewpoint is: 63°
94d48981-968d-437b-85e5-73f735207225  12:19:35 PM: info Summer Windows Ecobee Suite Smart Mode Helper, version 1.5.04 Initializing...
94d48981-968d-437b-85e5-73f735207225  12:19:35 PM: trace Summer Windows updated() with settings: [dewBelowTemp:72, pwsFreq:1, aboveMode:cool, notify:true, locFreq:1, nearestPWS:false, dewBelowOverride:true, zipCode:48105, aboveCool:false, pushNotify:true, aboveDewpoint:70, belowTemp:76, insideAuto:false, stationID:pws:KMIANNAR38, belowHeat:false, thermostats:[My ecobee], belowMode:off, tempSource:wunder, aboveTemp:82, tempDisable:false]```
SANdood commented 6 years ago

Yes - thanks for pointing that out. I will clean it up before I release it.

Let me know if this meets your needs.

Thanks! Barry

Sent from my iPhone

On Jul 23, 2018, at 12:21 PM, Richard Peng notifications@github.com wrote:

I just installed 1.5.04 and was able to initialize it. The only thing that caught me off guard was the PWS prefix requirement of pws:. Once I added that I was able to initialize the app.

94d48981-968d-437b-85e5-73f735207225 12:19:36 PM: info Summer Windows Initialization complete...current temperature is 78.575° 94d48981-968d-437b-85e5-73f735207225 12:19:36 PM: info Summer Windows Temperature is: 78.6° 94d48981-968d-437b-85e5-73f735207225 12:19:36 PM: info Summer Windows Dewpoint is: 63° 94d48981-968d-437b-85e5-73f735207225 12:19:35 PM: info Summer Windows Ecobee Suite Smart Mode Helper, version 1.5.04 Initializing... 94d48981-968d-437b-85e5-73f735207225 12:19:35 PM: trace Summer Windows updated() with settings: [dewBelowTemp:72, pwsFreq:1, aboveMode:cool, notify:true, locFreq:1, nearestPWS:false, dewBelowOverride:true, zipCode:48105, aboveCool:false, pushNotify:true, aboveDewpoint:70, belowTemp:76, insideAuto:false, stationID:pws:KMIANNAR38, belowHeat:false, thermostats:[My ecobee], belowMode:off, tempSource:wunder, aboveTemp:82, tempDisable:false]

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

richardpeng commented 6 years ago

@SANdood This looks great and meets my needs. Thanks so much, Barry!

SANdood commented 5 years ago

Implemented.