I am still little confused. Where do you add this params? DTH or code in SmartApp?
Weather Underground Web Smartapp: the "poor guy" weather station with event based switches automation [Deprecated. See Weather Company version below]
Both or DTH only, it’s up to you:
The smartapp statement is used to name the DTH so that it will appear as “Weather in xxxx”
The default behavior is to use your hub location and I can only find the location by calling it.
In the DTH, it is really used to query the weather conditions.
Hope it helps and please remember that the DTH queries every 10min and using so, I never had a problem of refresh. Querying too often might cause an excess to the limit ST contracted with WU.
Thanks for your prompt reply. I tried to add to either DTH or App code, I still have error. Please see below. In DTH, which line number should I add to?
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
script_dth_metadata_4610f828_c3a1_4355_a67c_ecdb4d5aee08: 17: Invalid variable name. Invalid character at position: 11 of value: ” in name: KCAPASAD23”
. At [17:49] @ line 17, column 49.
I don’t have your code but I suppose that you are not using the right double quotes around the second string or forgot to close the string by one double quote.
For some reasons, copying pasting from this forum leads to incorrect double quotes. you have to ensure you are using " and not the up/down ones.
Question all. Pretty new to this…I’ve added the smartapp and device handler to my IDE and it the app shows in Smartthings, but how do I tell it what city/State to show weather data for?
As said earlier on above posts, it uses the location of your hub by default. You should see the name in the header of the device and in the device list.
check above posts to see how to specify a specific location by having both the 2 calls (in the dth and in the smartapp).
my tweeked version, can set it in settings
That’s funny… My first version was simply the DTH with a setting to set the city but then I thought: let’s make it more convenient to install and use the smartapp to set it up, that will avoid support requests later due to typos in the query string. Well…well… well…
Between users having many stations around and want to set up the most accurate one and others using another city station (?), seems the setting is making more and more sense. I might put it back later next year. I saw a github user also asking for some light tuning based on the weather. That will be part of the next updates.
Hello, I set up this device handler a few weeks ago–tied to my personal weather station to uploads to W-- and it worked great until several days ago, when it stopped updating the temperature (which is the only weather variable I’m interested in). The temp has remained “stuck” at 12F. My weather station is operating normally. The Events List on the IDE website is showing updates about every 30 minutes, as is the Recently tab on the ST app.
Any idea what the problem might be?
Weather Underground discontinued all of their free api keys as of Dec 31st 2018. People who were supplying data to WU from a personal weather station and using a free api key were supposed to be exempt, but it seems like they’re being offered access to a different api instead. SmartThings is in the process of moving all of their weather to an api from The Weather Channel. Here’s one of the current discussions about this:
Hey thanks for pointing me in the right direction Jason- Colin
Thanks for sharing, I’ll try to port the development by end of the week.
All, I just published on a new GitHub repository the adaptation to The Weather Company API.
Please have a try at: https://github.com/philippeportesppo/TheWeatherCompany_SmartThings
Thanks for doing this! I’m getting an accurate, regularly-updated temp now. My only quibble is that the temp doesn’t show on the ST app device view like it did before (see pic). Maybe I missed a setting or something to show this? If this can’t be done not a big issue, my main concern is having the data reliably updated. Thanks again-
I don’t think I offered the temperature before on the main view because I already display the weather icon.
If you want to switch to the temperature, then you just have to replace:
in the tile section.
But then you won’t have the icon anymore.
That’s interesting; I could swear before that I was seeing the temperature displayed there just like it is showing with the “Accuweather” readings.
One final thing I could use some help/advice on. I’m still not clear on how to modify the code so that it pulls data from my PWS–it looks like it is pulling data from another WU station based on my location/zip code. I see your earlier reply to Rog889 (post 76), but I’m still unclear where specifically this change is made? Thank you-
I don’t think this is possible anymore. This app/dth is now pulling data from The Weather Channel API rather than Weather Underground, because WU is cancelling their free API keys.
[updated about The Weather Company and PWS]
Seems The Weather Company offers on Weather Company Data Packages - Overview | IBM a package called " [Enhanced Current Conditions]" (The Weather Company, an IBM Business | Accurate Weather Technology & Data)
And this one allows to access PWS. I am not sure what is the package that ST is offering us. I’ll check a bit more.
On your device list, you can see the AccuWeather only display temperature with a blank icon. This is not possible to have both a dynamic icon on the left and a dynamic value on the right. It’s either fixed icon on the left (like most of devices) and dynamic state on the right (temperature, switch, etc…) or dynamic icon on the left (weather icon) but no dynamic text.
Something is not clear to me: I see you have “KNE ?” as a device title. That’s strange if you are using my smartapp+dth as it should show “city, state”. Have you modified anything to get this?
Ive updated the DH to use new api and have the option to do actions (on/off) but not recive a push message every time
Thanks Mark that good improvement, however I moved away from this DTH/Smartapp as it was named after the WU. I released [Release] The Weather Company SmartApp: the “poor guy” weather station with event based switches automation
This one also implements the TWC interface.