[OBSOLETE] Smart Weather Station Tile Device

Don’t even open that door!

2 Likes

There is a built-in device type to start from. In the IDE when creating a device you just have to scroll down to the entry for SmartWeather Tile in the device type list.

Then you set the ZIP code or PWS:stationID (from weather underground) in the mobile app and hit the refresh tile. However, it will NOT refresh on its own…

It has been stated in other places that the SmartWeather Station Controller doesn’t work in v2 hub - I haven’t tried it so this is UNCONFIRMED by me. To make it refresh on its own you need to use a SmartApp called Pollster. This will periodically call and get new data. Search in the community here for the latest version and how to install it.

A slight wrinkle here is that Pollster doesn’t work with this device type, as is. You need to make a local version of the device type, using the original as a template, and then add the Polling capability. The IDE has a way to create a new device type from a template, however, the new device type has the same name but is located at the bottom of the device type list - need to make sure that you pick the new/local device type when creating a device.

Why someone would create a weather tile device type and not have it out of the box support polling is a good question… At least it is fairly easy to add and I appreciate that someone did 99.9999% of the work.

1 Like

Hi

I’m getting this exact error as well… Do you recall how you fixed this?

Disclosure: I had the V2 code successfully installed at one time & then deleted it… Now I want to add it back again, and it fails.

Thanks in advance
J

There are 2 different components - One is a SmartApp and one is a SmartDevice. Looks like you may have mixed it up.

Thanks @RBoy. You pointed me in the right direction. I had to add it as a New Device Handler first…

Thanks
J

1 Like

I wrote (or probably copied and modified) a very simple smart app that uses events to update the weather tile. I’ve tried to change all my smart apps to use events rather than schedules, due to the ongoing issues with scheduled events not running reliably.

I chose temperature as the capability to subscribe to, as most of my sensors have temperature capability. Every change will refresh the weather tile. So far it’s been much more reliable than just relying on the weather tile updates.

/** * Manual Weather Refresh * * Copyright 2015 Daniel Vorster * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at: * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License * for the specific language governing permissions and limitations under the License. * */ definition( name: "Weather Updater", namespace: "dpvorster", author: "Daniel Vorster", description: "Refreshes weather tile", category: "Convenience", iconUrl: "https://s3.amazonaws.com/smartapp-icons/Convenience/Cat-Convenience.png", iconX2Url: "https://s3.amazonaws.com/smartapp-icons/Convenience/Cat-Convenience@2x.png", iconX3Url: "https://s3.amazonaws.com/smartapp-icons/Convenience/Cat-Convenience@2x.png" )

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

def installed() {
log.debug “Installed with settings: ${settings}”
initialize()
}

def updated() {
log.debug “Updated with settings: ${settings}”
unsubscribe()
initialize()
}

def initialize() {
subscribe(devices, “temperature”, appHandler)
weather.refresh()
}

def appHandler(evt) {
weather.refresh()
}

3 Likes

Ahhh… I get it. Instead of using using either of the commonly mentioned ways (pollster and smart weather control) you just subscribe to several things that report temperature often and depend upon the weather changing… :). Neat idea that I hadn’t seen mentioned anywhere before.

Polling hasn’t been unreliable for me, that I’ve noticed, but this is pretty slick.

Good choice of “last name” - 999 -, by the way!

1 Like

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

Thanks.
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:

2 Likes

[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]

Cool!
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.