SmartTiles Dashboard v5.5: Added UK šŸ‡¬šŸ‡§, 5 Ɨ Dashboards, and more! Nov 6, 2015

@Stroh:
If you send me a clean copy of the code (or just editor your post above to be surrounded by 3-backquotes or use the </> formatting option), then I’ll perhaps submit a pull request to SmartThings to merge this in as official. But I have no idea what their likelihood of accepting it is.

I was thinking the same. I think the lack of obvious capabilities is an oversight, so they should have no reasons to reject the pull request.

1 Like

Last night I was seeing wildly different weather reports for the same temp metric from two of my installs.

One of my control panels running SmartTiles was displaying one Temp on the SmartWeather Tile, but another was displaying something 4, 5 or 6 degrees different, depending on when I decided to go check them both.

It’s not just a matter of not being refreshed, because I walked back and forth between them down the hall and refreshed them each within 10 seconds of each other, multiple times over a few minutes, and the gap remained that different.

It’s not always that way…like, right now they are showing pretty much the same temp again, but they are still off on one particular point…one says sunny and the other says starry (both indicators for ā€˜Clear Sky’, but one for the daytime indicator for clear and the other for the night time indicator for clear).

Both are brand new, cheap, 7" RCA Android tablets (got 2 for under 60 bucks total on Brown Thursday).

In my case, it’s not a huge problem since I’m mainly putting the SmartWeather Tile in them as a general indicator of what it’s sort of like outside, and don’t require extremnely high accuracy in this context. Still interested in understanding what may be causing it though.

Has anybody else seen anything like this?

Any idea how or why this could be happening when they are both getting their weather data from exactly the same place (my one and only SmartWeather Tile in SmartThings)?

This is interesting! Are the two dashboards operating from the same app instance? If not, it would be curious to compare it to the weather as presented in ST mobile app. Was it a temporary glitch or is it still the case?

1 Like

Same instance = yes…that is, if you mean from the same parent SmartTiles install. I only have one SmartTiles instance, and these dashboards are using two different ā€˜children’ of my available 5 within that.

I did not check it against anything else other than each other when I saw the huge difference last night, but I will next time I see it happen.

The huge difference of 5 or 6 degrees last night was the biggest gap I have noticed, but it has been off by a degree or two many times.

So you are running two different instances of SmartTiles using the same Weather device.

Can you confirm whether the difference in displayed values remains even if you tap on the Refresh tile?

1 Like

In SmartTiles V5; each ā€œchildā€ is a separate SmartTiles Instance; each fetches data independently of all other children, even if they have the same parent.

If you only have one SmartThings Weather Device (or if the varying Weather Tiles are all using the same Weather Device as their source), then there is ā€œgoodā€ explanation for the behavior you are observing if you have refreshed both Dashboards approximately the same time; *except SmartThings does not guarantee consistency of data. They call it ā€œeventual consistencyā€.

i.e., It would be like one dashboard reporting a light on while another reporting it off, even if both dashboards are fully refreshed at the same time. SmartThings. Well, since SmartThings distributes data across many servers in their Cloud, this is entirely possible and considered ā€œin-specā€.

1 Like

OK, ya I guess I need to think of them as separate instances…I just forget that part. :slight_smile:
Yes, I pressed refresh.

Thanks for the clarification and reminder on the children actually being ā€˜instances’. :slight_smile:

Your explanation makes total sense. It reminds me of ā€˜domain controllers’ in a Windows Active Directory environment (sort of); in that client machines in the same physical room and on the same network switch can be getting slightly different data from the domain, depending on which DC they are connected to, if somebody somewhere made a change relatively recently, and that change data hasn’t propagated across the entire domain yet.

So…not a ā€˜real’ problem; rather, just something to be aware of (that is, this aspect of ā€œeventual consistencyā€) that we need to accommodate in our logic flow, and I can deal with that.

Once again, thanks a lot for everything you guys are doing here. :slight_smile:

2 Likes

I edited the post above. Keep in mind this isn’t my code. I found it here in the community and it worked well for me so I shared it. I don’t know who the original author is to give proper credit. I suspect it is @garyd9 from the search I performed earlier but he hasn’t come forward yet.

I wondered how to format it when I was pasting it in the original message. I’m assuming that the forums run on an established platform and not one created by SmartThings so getting them to add an ā€œInsert codeā€ tool in the editing bar above the message creation window wouldn’t be possible or can it @Ben?

[quote=ā€œsgnihttrams, post:172, topic:28347, full:trueā€]
…this aspect of ā€œeventual consistencyā€ā€¦[/quote]

To be fair, even with showing different temps between them from time to time, I still get better/more timely data from SmartTiles dashboards than I do from WeatherBug (which I have set to update in the background every 15 minutes) right on my primary Android phone in my pocket (it sometimes shows temp data that is half hour to an hour old, and is useless until I refresh the app).

I often find myself walking over to one of my SmartTiles dashboards to check the weather before going outside instead of even reaching for my phone on my belt clip. :slight_smile:

So, ya…I guess this kind of ā€˜eventual consistency’ is just fine. lol

SmartTiles as a general REST API endpoint?

I have been using the example REST API endpoint for a while to control switch devices in my environment. The example code only supports switches, but I’ve found that SmartTiles does a pretty good job of handling dimmers. However, for devices like switches (and locks, and any other binary devices), the REST commands used by the dashboard in SmartTiles are always set to toggle. Is there any way to tell SmartTiles via a REST command to turn on or off in some discrete manner?

I just checked the code, SmartTiles triggers weather update 20 seconds after initial dashboard load or refresh. This is done in order to prevent the weather service from delaying the rendering of a dashboard, in case Weather Underground (service that fuels ST Weather Tile) is slow. Under normal circumstances, the weather device relies on ST platform to be polled.

As Terry described above, there might be a delay propagating data between servers that run your dashboards. It’s unfortunate you are witnessing this and I hope it’s temporary.

No, sorry.

2 Likes

The Forum runs using the open source Discourse platform and can be tweaked and have plug-ins.

But code pasting is handled just fine…

  • either use three back quotes or highlight and click the </> button in the Editor format bar (this Forum uses the Markdown syntax).

or

  • paste a link to GitHub or Gist which will insert a defined snip with a link to the code as well.

SmartTiles someday might offer a limited set of REST-API Endpoints…

In the meantime, it’s fairly easy to modify the example you are starting with… Send me a Private Message.

You can also look at ThingLayer.

@625alex Oh, well, ya, I’m not wondering about that anymore. Like I said, his explanation made total sense.
The reason for my last post was that I just wanted to come back and let you know that I actually think it’s better/more frequently updated data than the purpose-built weather app that I use on my primary phone.

So, no need to be sorry (if anything, I owe you, once more). My logic = If SmartTiles via the ST SmartWeather Tile is already better than what’s on my Android phone, then it’s settled (for my purposes). :slight_smile: …and like I said, not only is it ā€˜OK’, since it’s actually better than my primary phone, it has become my go-to device for checking the weather before heading outside. lol

2 Likes

That looks like a (old) revision of the zwave garage door opener I did. It was a quickie change to add the capabilities needed for actual functionality. I also submitted that code back to smartthings (which was why I never bothered changing the author or namespace… it seemed obvious to me that they’d quickly accept it.)

However, after it sat for nearly a year completely ignored by ST, they managed to somehow ā€œloseā€ the submission and now I don’t even care. If ST doesn’t care about half-baked device types, and cripples user developed device types, why should I bang my head against the wall?

It’s Apache licensed, so anyone can do pretty much whatever they want with it…

They were fairly quick to accept my pull request directly to GitHub. We will try with this device.

1 Like

Just as an FYI, in regards to the garage door opener (and please keep mind that I haven’t read this thread so don’t know what it’s being used for)… Sometime around the hubV2 release, they added a completely undocumented ā€œGarage Door Controlā€ capability. (@Jim) Being that it wasn’t (and still isn’t) documented, there’s no way to know how it should work or which attributes/commands it requires/supports. What I CAN say is that by adding that capability to the older device type (which also includes the switch/momentary capabilities), it allows more complete functionality in some of the newer ST smartapps.

(Verified that it’s still not documented here: http://docs.smartthings.com/en/latest/capabilities-reference.html)

We’re looking into this at the moment. It supports the exact same commands and attributes as the door control capability.

3 Likes

I noticed Garage Door capability recently and was about to scrape it for attributes. At the very least this device should have the Switch and Momentary Switch capabilities. Door Control capability implies some sensor to indicate door state, so don’t think it’s really applicable to this device.