[OBSOLETE] Smart Weather Station Tile Device

This seems like a cool way of doing it.
I currently have RBoy’s controller app refreshing my Weather Tile every 5 minutes.
Now (since I’m dense), can you explain what is better about your method?

I don’t have an opinion, one way or another yet, and I just want to figure out which way would make more sense in my case.

I don’t think that it’s better or worse than any other solution. I haven’t seen RBoy’s code, so not sure how it works. When I started with the platform, I wrote a few smart apps that used schedule() or runin(), but these apps invariably failed to run when the platform “forgot” about the scheduled jobs. This app uses events, and, like the other apps that I’ve rewritten to use events, seem to be rock solid. So I guess it would be accurate to say that I prefer subscribing to events vs relying on scheduling jobs on the current platform.

Aha…makes sense. So, if it is true (I haven’t checked enough on mine) that the ‘refresh every five minutes’ method is not actually working properly, then your Event driven method would definitely seem ‘better’.

See if I have this right…
In your method, there is nothing that tells it to refresh on any sort of time interval. It is only pegged to certain temp sensors, and only triggers a refresh when/if any of the selected sensors report a temp change.

If that’s true, how do you make sure that your temp sensors are reporting correctly? Have you basically tracked them enough to know that they do indeed report whenever there is a temp change?

If the temp sensors are reporting correctly, the Event driven method seems like it may be a more efficient way of doing this.

My weather tile is not critical to my setup. I have seven devices selected in the app, so between them I get events reasonably often. When I look in the device events for the weather tile, I see that refresh is called, on average, every 15-20 minutes or so. Sometimes less than 10 minutes, rarely longer than 20 minutes.

When I just started with the platform, I did check the temp updates, and I don’t think I’ve ever seen a temp setting skip on a device. I take that to mean that every temp change is communicated to the hub. Of course, you can augment the app to use any event - motion, contact, whatever.

The advantage of a schedule based system, when it works, is that the update interval is predictable. So if you need that predictability, then a schedule based solution is preferable. If “occasionally” or “regularly” is good enough, then the events will probably be more reliable and efficient. But like I said, I’ve not had good luck with schedule()…

1 Like

I can’t get to it right now, but I think I will probably make the switch over to this Event driven method when time permits.

event driven is definitely a good idea, infact my apps does a combination of event driven and timers - that the only reliable way to handle a unreliable ST platform and keep try an keep a semblance of a scheduled update. The code’s here:


[quote=“RBoy, post:100, topic:2710, full:true”]
event driven is definitely a good idea, infact my apps does a combination of event driven and timers…[/quote]

I don’t see any options related to Event-Driven triggers in your Weather Station Ctrl SmartApp.
Which sensors is it monitoring and what sorts of events is it triggered on?
I might be able to guess my way if I looked at the code, but I just haven’t yet with this concept in mind.

It’s use system generated events to avoid the users from messing around with it. Less of a headache for users :smile:

1 Like

Looks like the Smart Weather app isn’t updating again.

Same with RBoy’s controller app.
Supposedly, it uses events as well as schedule, but mine keep showing same temp for long periods when the temp has definitely changed by a lot.

I think it’s all related to ST scheduler not working.

I still haven’t tried the event-driven method, but I guess I will soon…

SmartTiles calls the Weather “refresh()” method ever full poll cycle (I think it defaults to 30 minutes).

I add my weather station to the pollster to poll every half hour as well… seems to work better.

Well, I reset my ST hub and it still doesn’t seem to be updating, so… yeah.

Make sure you’re using the code version 1.4.

It uses sunrise and sunset events to kick start timer.
Also reinitialize the SmartApp once (open and hit done), I noticed after the last platform update apps using sunrise and sunset need to resubscribe because the events were not being sent.

1 Like

Oops. Somehow, even though I’m pretty sure I took it right from the same place, I had 1.3
So, I’m going to upgrade it now. Thanks.

So, are sunrise and sunset the only events you’re using in your Event-Driven method of refreshing the weather tile app?

EDIT: OK, I updated it in the IDE.
When I opened the app and clicked Done, it first gave me an error (red pop-down), but then immediately gave me the green pop-down saying it’s been updated.
I did Done again, and second time, just the green good msg.
Now, it went by too fast to read. So, I have no idea what the red pop-down error was about, but it’s not happening now. So, I guess I’ll just assume I’m good to go.

Still interested in the whole event-driven thing though.

Too bad this never got in the released version!

Daniel, your “Manual Weather Refresh” app worked perfectly for me. I’m using a motion sensor to trigger updates to the weather tile…and using LUX values to control the Auto Dimmer app. Thanks for posting your code: Smart Weather station tile app


Dan I like you logic for refreshing the weather tile. It works perfectly with the SmartWeather tile device. I was looking to add it to a modified weather device that was made, but it is not selectable from the list of weather device.

[Release] Weather Station Tile 2.0

Is there something simple I’m missing to have it get found?

1 Like

Funny you should mention that :). I recently updated the app to (also) work with the BloomSky device type.

If you replace the input section{} with the code below, it will probably allow your device type to be selected:

section { input "devices", "capability.temperatureMeasurement", title: "When these devices sends events", multiple: true, required: true input "weather", "capability.relativeHumidityMeasurement", title: "Update this weather device:", multiple: true, reguired: true }

This will allow any device that has a relative humidity measurement capability to be selected, so you could potentially also select a humidity sensor. Let me know if you still have issues. I’ll add my code to github some time to make updates easier.

That was it. It worked perfectly. Thanks.

1 Like