Temp/Humidity sensor updates Weather Underground personal weather station

weatherunderground
weather
smartapp_weather

(Andrew Mager) #1

I remember being in college a few years ago and getting so excited about Weather Underground.

A community of weather watchers, with weather stations, updating this database for everyone to use. After joining SmartThings, I noticed that we had tie-ins to their API, with the “getWeatherFeature” method.

But we didn’t add back to their community, we just took data from them. This weekend, I wrote a simple SmartApp that takes data from the SmartSense Temp/Humidity sensor and updates a Weather Underground personal weather station ID every ten minutes.

It’s less than 100 lines of code, and is a great example of a SmartApp that makes HTTP requests on a given schedule.

I’m going to work to make this SmartApp official too.

For now, peep the code on Github:

This is also a reminder that you should send pull requests to that repo and we’ll accept them :slight_smile:


Any ideas how to automate my deicer switch
(Kristopher Kubicki) #2

Nice. That is awesome :slight_smile:


(Keith Croshaw) #3

Just spray it with that Rustoleum waterproofing spray and leave it outside I guess.


(Dav Glass) #4

Awesome! Nice work! Love the idea!


(Andrew Mager) #5

I used super sticky 3M “permanent tape” to attach it to my window…

And here is the PWS: http://www.wunderground.com/personal-weather-station/dashboard?ID=KCASANFR467


(Keith Croshaw) #6

Cool, did you spray it yet? Or I guess you can just use your unlimited supply whenever it rains :wink:


(Andrew Mager) #7

I need some Rustoleum :slight_smile:


(Andrew Mager) #8

Now with a dew point calculation:


(David) #9

Good thinking @mager. I am having issues with my own personal weather station right now. This is something to get me gonig till I get my stuff up and running again! Just need to get me a Temp/Humidity sensor


(Keith Croshaw) #10

Dew point is often overlooked, but it can be a big part of how it feels outside. Especially in the swamplands of Jersey in the summer. (Why did we build on a swamp?)


(Tim Slagle) #11

Man!!! i totally did not see this today! I just spent 15 minutes adding dew point on my own!!! lol

I was excited to push a commit to you guys.


(Andrew Mager) #12

Great minds think alike :slight_smile:


(Joe) #13

Works great, I used the Aeon multi sensor Gen 5. KMDGLENB17 is up and running in 15 minutes thanks to your code.


(Andrew Mager) #14

http://www.wunderground.com/personal-weather-station/dashboard?ID=KMDGLENB17#history/tdata/s20150424/e20150424/mdaily

Awesome, it feels like San Francisco there :slight_smile:


(Keith Croshaw) #15

Temperatures in your area there seem to be all over the place. I don’t know what to trust. Some say 50’s yours says 75. If you offset your sensor in ST will it forward to WU?

PS we need offsets for all analog values pleaaaase, my device type coding stinks. :stuck_out_tongue_winking_eye:


(Andrew Mager) #16

I could add an offset, which I should.

It does feel like 75 outside my apartment right now (no wind and sunny). Also, my sensor might be off because it’s attached to my window.


(Edgar) #17

Hello,

The app is suberb, but it does now work correctly with metric temperatures.

Like mine;

http://www.wunderground.com/personal-weather-station/dashboard?ID=ICOMUNID172

The temp reported with the device is metric and convert it like it was fahrenhit.

Can you check that?

Thanks,

Edgar


(JJ) #18

Hi @mager , thanks for the contribution! I’m also having trouble reporting the data in Celsius, if I try using the code as it is, it shows incorrect Celsius data, I suppose just like edgard is that it converts to Farenheit the original Celsius temperature.
If example, sensor data is 5C and it get shown in WU as -15C.

I have tried changing the code in line 68 from tempf to tempc but it doesn’t seem to have solved. In fact it now reports -5528 *C so it’s even worst :slight_smile:
I’m trying to find in the API documentation the logic to change the parameters but can’t fix it.
Am I missing something here? Could you please suggest a possible workaround?
Thanks in advance!


(Andrew Mager) #19

Hey guys,

I didn’t take Celsius into account when building this SmartApp.

I could add a checkbox called “convert to C” in the app options. Would that fix your problems?

Thanks!


(JJ) #20

That would definitively work! Thanks Andrew!