SmartThings Community

[Release] Weather Station Tile 2.0


(Sean Donaghey) #447

I am having issues creating the SmartApp. I copied and pasted the github code in a new SmartApp and when I click create I get the following error:

No signature of method: script_app_metadata_a2a914e2_54b8_4291_b57e_b577eb83f4e8.metadata() is applicable for argument types: (script_app_metadata_a2a914e2_54b8_4291_b57e_b577eb83f4e8$_run_closure1) values: [script_app_metadata_a2a914e2_54b8_4291_b57e_b577eb83f4e8$_run_closure1@29fee9e7] Possible solutions: getMetadata(), getState(), setState(java.lang.Object), metaClass(groovy.lang.Closure)

Any idea why?


It’s not a SmartApp. It’s a Device Handler.

(Kosta) #449

I can’t be crazy, I must be doing something wrong even though I had this setup and working once before. My SmartThings Hub got magically reset and I had to redo everything. Anyway… this is what I have going on. I went in and configured everything as far as zip code and unit settings. Can anyone help? The bottom part where it says “Weather” and “You can’t currently add this” leads me to believe I am missing something.

(Mark H) #450

Have the same problem, have tried everything I have deleted and reloaded everything over and over again. I have even used other zip codes and station IDs. I was beginning to think I was the only one with this exact same problem! Hopefully someone out there can help us figure out what we are doing wrong!

(Kosta) #451

I’m glad I’m not the only one. It must be something simple we’re missing or this device handler is no longer working. I made sure to copy and paste from the first page and not the raw code as instructed.

(Mark H) #452

Yes! I went over the instructions very carefully even the copy and paste (which did not make sense to me). I just wonder what i could be doing wrong.

(Takis) #453

i believe that the zip code function doesnt work. Its getting the location from the hub location, I know that it works fine in the states, I am using it almost every day. What part of the world are you? Maybe someone else from the same part can let us know if it works for them

(Mark H) #454

I’m in San Antonio, TX I have tried various zip codes and station codes etc. I have even used those in the examples others have given. I have left it blank. I have never gotten anything but what sonnaps had displayed. After some research I could not find anyone who was having the exact same problem. So I just figured it was something I was doing. Then I noticed sonnaps’s comment and thought may be something has gone wrong with the code in the last few weeks. I have tried this on other android devices and tablets. I have deleted everything and reloaded (several times). But nothing seems to work! I thought about trying older versions of Weather Station Tile, but really don’t know how to find those. I am by no means an expert. I would love to get this working since it seems to be the most advanced of its kind. I was hoping I could put in a specific station ID to get more accurate data, San Antonio is a big city! Thanks for any suggestions you might have for us!

(Kosta) #455

I don’t know if it’s what I just did myself, or something changed on it’s own, but it’s working now!!

This is what I did. I read through the device handler code, even though I have no idea how to write the code, I can follow things pretty well if I put my mind to it. I looked everywhere to see how this device handler works and where it’s actually pulling it’s data from. I couldn’t find any reference to an outside source, but then I saw this line:

“input “weather”, “device.smartweatherStationTile”, title: “Weather…”, multiple: true, required: false”

It made me think this device handler is just pulling data from the built in SmartWeather Station Tile device and just giving you more info and making it look prettier. I went ahead and added a new device using the built in device handler, and poof! That worked, as so did the SmartWeather Station Tile 2.0 one I still had in there all of a sudden. It’s almost like the 2.0 version needed the original setup to start with. I’m afraid to delete the standard one, so it’ll just stay there for now till I feel adventurous.

(Mark H) #456

Thanks for the feedback! It would be great if I could get this working. @takissd has created the best weather device I have been able to find so far. So this is what I have tried: I deleted everything and started all over. I reloaded the takis : SmartWeather Station Tile 2.0 device handler (I tried the cut and paste and the repo methods) and I created two new devices using SmartWeather Station Tile 2.0 and SmartWeather Station Tile. Tried with zip codes and without. Still the same thing you were getting originally. I know nothing about the coding so I’m not really able to determine if I am missing something. Now I am thinking it may have something to do with the original set up needing to be loaded first and then V2.0. I’m just scratching my head wondering what I am doing wrong. Any additional feedback would be appreciated!

(Kosta) #457

If you look on your SmartThings App (the Classic one), on the main screen when you first open it up, swipe from the left to right to pull the side menu open. There at the top is your Hub location with a gear icon to the right. Click the gear.

In there, have you set your hub location on that map? Click the map when you are at home and let it find the location and click save.

Just a shot in the dark in case you never did that. After my hub reset and I had to redo everything, I forgot about that step myself. As @takissd said, both the 2.0 and original SmartWeather Station tiles are indeed just ignoring the zip code being set within the settings. I’m thinking that this might be another reason why it’s not working. Try that and wait a while. I don’t think things will populate right away. Wait an hour or so. If still nothing, delete both again and try one more time. Do the original tile first and then the 2.0. Let us know.

(Takis) #458

Yeah at this point i would just do what @sonnapsis recommending. I have by the way deleted the original app and it still works for me.

(Tony B.) #459

How do you specify the API key? Put it in the device ID?

(Mark H) #460

Thanks for your feedback! Yes, I have the location set up since I got the hub! Just for grins, I reloaded it with the same result. I don’t get it but I must be doing something wrong but getting tired of deleting and reloading the same thing over and over so I guess I will just move on. I am no expert in this stuff and I am sure there is something I am missing. Never had any problem loading others apps but I guess there is a first time for every time! Thanks again!

( - Make your home your butler!) #461

I believe the stock is used by ST internally

(Jeff Jolley) #462

I’m a bit late to the party here. I’ve used this SmartApp for a while now, and it works well, but I have one minor frustration with it. Why do we have to estimate lux? Why can’t we calculate the actual illuminance from the solarradiation reading from Weather Underground?

lux = solarradiation / 0.0079 gets you really close to the actual lux with sunlight.

(Takis) #463

Interesting point i was not aware of this… I could implement it at some point. i have noticed though that solar radiation doesnt change too much. I will have to observe.
Thanks for the tip

(Jeff Jolley) #464

It would open up a lot of possibility for me to have reliable, actual lux. I would be incredibly grateful.

As far as the solar radiation not changing much… mine has a range of 0 to about 800 (~101,000 lux) on a bright day and I would say that it changes throughout the day as expected, dipping appropriately when it gets cloudy, etc. I should add though, that I am using data from a very nearby PWS (Using PWS:KUTSALTL338 in the zip code field). I don’t know if that has anything to do with getting more reliable solar radiation readings, but I wouldn’t expect it to matter, since Weather Underground uses nearby PWS’s for nearly all of their data.

Oh, one last request- is it possible to be able to change the polling rate? I would like to be able to poll every 2 minutes so that I can use the wind speed to roll up my patio shades in case the wind picks up. I can see how that might be a little too often for most folks, so even if you could point me to the right spot in the code to change it for myself? I’m no good at coding, but I’m pretty good about editing what’s already there. :slight_smile:

(DanG) #465

The reliability (frequency) of the update comes from the weather station owner. All users using wunderground can choose how often they update. I run my own station and send updates every few seconds but other stations around update once per hour. It all depends on the person that owns the station. I would say that unless the station you connect too is using “rapid fire” updates you will find lags. It is also important to find a station that is reliable. 24/7 365. I have nearby stations that are up for a few days and down a few days.

Hope this information helps you out.

(Jeff Jolley) #466

I am referring to the SmartApp polling rate, or the rate at which SmartThings will update from Weather Underground. The station that I am collecting data does indeed rapid fire update, and has provided reliable data since it came online 6 months ago, so no reason to believe it won’t be usable. Plus it’s on top of my garage, so it’s pretty local.