Why some SmartApps may not be publishable

(ActionTiles.com co-founder Terry @ActionTiles; GitHub: @cosmicpuppy) #28

I understand the issue, but wonder if this suggested method is a viable and practical solution or … not?

In my very limited understanding, the referenced “event push method” is viable, but must have some serious practicality issues? Does it require an intermediary server, or can AJAX (?) in the browser handle it, etc…, etc…?

(Geko) #29

Existing framework requires either background polling (e.g. using AJAX) or an external server to push status updates to. SmartTiles uses polling, AFAIK, while @florianz’s HAD (and few other projects) uses external server. Both methods are cumbersome and inefficient, but this is all SmartThings can offer today.

(Jody) #30

In the current incarnation SmartThings can push events to a singular location. With some hacking you could make it push events to multiple locations, but it would not be a true push to the browser. What needs to happen is what others have mentioned. SmartThings needs some sort of pub/sub api for developers.

Want to build a real time SmartApp that shows a graph which updates every time a new event happens? You need to use a third party service like GroveStreams, ThingSpeak, or ThingLayer. None of these solutions are optimal or take 30 seconds to get going. Especially if you are less than technically inclined.

We really need real-time pub/sub like mqtt, websockets, etc. This would open up a whole new world of SmartApps that would not only ease the flow of data to the end user, but in fact bring more data into SmartThings.

Another thing that would make SmartApp development more accessible would be to allow the use of sane javascript and html5 web components. This would allow a SmartApp to become a true real-time client to its own endpoint api.


Polling is less than optimal. We need more real time access to the SmartThings API’s.

(ActionTiles.com co-founder Terry @ActionTiles; GitHub: @cosmicpuppy) #31

Astute observation (among many underrated intrinsic SmartTiles features you touch upon!)…

The SmartThings mobile App doesn’t even have a session timeout / expiration option to the user, nor a way to revoke login credentials remotely… Correct me if I’m wrong!?

Frankly, I don’t think it would be wrong to bet that additional enhanced security features (such as credential expiration or even two-factor authentication!) could be full added to SmartTiles long before such feature requests would even receive “serious consideration” for implementation in the native ST mobile app. Such is the advantage of an agile open source alternative with significantly smaller user base to impact.

(j w) #32

I was wrong. I hadn’t delved into the security aspects of Smarttiles. I am going to use it now that I know I can just remove the access token! Thanks for clarification, and apologies for my being an idiot and not knowing what I was talking about :)!

The only further suggestion I might have, then, is to have an option to not create an access token.

(Brandon) #33

@florianz and his Home Automation Dashboard address the polling through an albeit, convoluted install/config process, especially for those not so technically inclined.

Recently though, @zpriddy has ported it to python instead of rails and now it can be run locally, within your own network, with a local IP. I guess to be fair, this could have been done in the original version as well, but possibly more involved.

(Geko) #34

Running the server locally kind of defeats the purpose of the cloud-based system. Also, it would require punching a hole in the firewall to receive updates from ST cloud, unless a hub command is used for that purpose, which would also be a kludge, imho.

(Brandon) #35

Everyone just has to be so negative in this thread, heh. You don’t have to run it locally, but that addresses security concerns people are having with external URLs, token or not. The original version had a completely “cloud” based install, which still works 100% fine. It also eliminates polling and has near instant updates. A couple people in the thread have it running on a Raspberry PI, which at least to me, doesn’t make it much different than any other smart device on your ST network. Meaning, small, lower power device, given a task. Anyway, aren’t we the same people that complained about everything being cloud anyway and demanded a V2 hub with local processing?

It does not require any open ports to function either.

The only downside is its complexity as it can be a little too difficult for the average Joe, but there is a lot of documentation in the thread and I’m not aware of anyone that actually failed the installation and gave up.

(Patrick Stuart [@pstuart]) #36

Of course all of these issues would be 100% solvable IF the hub was able to be queried locally for device status and local device changes.

I was really hoping for this to be a feature in Hub v2, but based on what I am hearing in the Hub v2 architecture, the hub may not have any real way to query the local hub without a cloud roundtrip and even send device commands locally all of these security issues go away.

Especially if SmartApps could be accessible locally since they can run locally. You could only allow local connections.

Anyway, I can dream… I only brought up this idea over a year ago. Would be nice to see if any progress or even answers exist as to if we will be able to query the hub locally or do we have to roundtrip a query to the cloud for a local device?

(Geko) #37

It’s not negativism, it’s realism. :slight_smile: There’s a lot of cool things you can do running local server. Heck, you don’t even need SmartThings hub and can connect your Zigbee and ZWave devices to RaspberryPi directly, but that’s not a task for an “average Joe”. SmartThings is supposed to be a plug-and-play, easy-to-use system that your grandma could set up, isn’t it?

One would think that SmartThings should embrace an app like SmartTiles that addresses a lot of shortcomings of their native mobile app, rather than brand it “unpublishable”.

(Brandon) #38

Yeah, I do agree with this. Hard to disagree really. The use of the word “unpublishable” was probably an unfortunate choice of wordsmithing and I’m sure it wasn’t meant to be taken so negatively.

(Bruce) #39

He actually said, as the title of this thread, may not be publishable, which is quite different than saying it’s unpublishable!

I agree, I have never thought ST was intended for ease of use, for everyday consumer to install easily, and certainly not for grandma! Heck, the reason I bought it was because it offers an open development platform. Maybe if all you wanted were a few outlets to control a few lamps, it could be at that level of novice entry use. But that’s not the intent.

(Ben Edwards) #40

Said all pessimists ever.

As others have pointed out, you can load the title with whatever feelings you want. I never said it was unpublishable and I wasn’t directing this whole conversation to @625alex or SmartTiles. I am actually quite surprised how defensive the thread has become. I thought I was pretty clear that SmartThings recognizes the shortcomings of our current developer offerings and wants them to get better — to provide better tools and services to developers so they can make elegant and efficient solutions.

Also, @geko I thought you switched to Wink or Staples or something. Don’t they have a community somewhere? :smiling_imp:

(Geko) #41

I’m sorry your words were misunderstood, but I’m not the only one who interpreted them this way. Good to know you’re listening to our concerns.

Also, @geko I thought you switched to Wink or Staples or something.

Do you read all my posts, seriously? Anyway, glad to have you as my fan. :smiling_imp:

I’ve ended up with both Wink and Staples set up as secondary controllers. None of the platforms is perfect and it never hurts to have a backup considering occasional ST flakiness.

(Zpriddy) #42

Like people said above,With my SmartThings pyDash it polls SmartThings for changes and doesn’t require you to open any ports :slight_smile:

(Geko) #43

That’s exactly why it’s bad for SmartThings. Let me quote @Ben again:

Polling is so 20-st century. Do you think Facebook would be able to support millions of users if they relied on polling for status updates?

(Zpriddy) #44

You are correct. I don’t agree with excessive polling… However many APIs today still depend on polling. One good example is the Nest API.

I do limit the polling that my dashboard does. (Less than 3 in a 10 second period) and I am planning on dropping that to about 1/3 of that in the next update. My polls don’t force the hub to poll each device, but just gets the current reported state of the devices.

However I feel like if you want something that you can easily host from your home and don’t want to open up inbound ports or don’t want to rely on a 3rd party… Polling is currently the best option.

(Mark S Groves-Zen Studios) #45

I really like Alex’s dashboard. I am more concerned with SmartThings platform security than Alex’s dashboard security. If you drop the ‘Token’ from the URL aren’t they both using the identical security model? Alex spent a lot of time producing a quality product that fills a huge UI gap that SmartThings is currently ignoring. It is also popular with the community. Where is the SmartThings support for community member Alex? I find the lack of ‘Desktop Clients’ and a ‘Device Status API’ frustrating. Without a status API developer have one hand tied behind their backs.

SmartThings is billed as ‘Open Source’ and ‘Community’ friendly. It has disappointed me on both counts. There is an incredible community driving SmartThings success. Patrick Stuart should receive monthly stipends!

My concerns as a developer are:

  • WIll robust third party apps be a waste of time for developers? i.e. the Smart Tiles scenario.
  • A reliable security app will require constant sensor status updates. Not seconds, milliseconds that in turn will create a lot of traffic for the SmartThings servers. Will local processing reduce the traffic to the point where SmartThings can work efficiently with robust Smart Apps and device drivers?
  • If a developer creates an app that is similar to a low priority app on the SmartThings ‘To Do’ list, what happens with the developer’s app when it finally becomes a priority for SmartThings?
  • I have yet to figure out how SmartThings revenue model makes any sense. Can SmartThings survive supporting a $99 dollar hub with limited SmartThing devices or will they ultimately become the next Wink? That said, I am a huge fan of the SmartThings concept, and equally disappointed in the reality. I realize growing pains is a huge issue. The device cost has to come way down to drive mass consumption.
  • Will SmartThings continue to evolve to a closed system from the third party developer’s perspective?
  • Will the Things Shield documentation and driver support evolve to point where it is actually useful for something other than a switch? Support for a messaging interface that could be used to communicate alarm status, etc would be nice.
  • Artik support is apparently coming, but what about Raspberry PI support?
  • Will the developers meetings evolve to focus on developing third party compatible apps or is that strictly Patrick Stuarts burden to bear. I am beginning to feel like it is a documentation meeting. Kuddos to the doc team! They are doing a great job that is an important part of development.
  • It is disheartening that the V2 hub is not far enough along to discuss interfaces and capabilities at the developers meetings. Another sign of non reciprocal community support.
  • When will SmartThings realize they are severely limiting their growth? The vast majority of talented developers do not live in Palo Alto or want to move to Palo Alto. There are several other Tech hubs, like the Research Triangle for example, they could draw talent from that would ease the growing pains. It is also feasible to work remotely in this day and age.

End of rant.

(ActionTiles.com co-founder Terry @ActionTiles; GitHub: @cosmicpuppy) #46

So many great questions / points, Mark!

Probably ought to spin-off some Topics or PMs.

For example, the ThingShield just uses a standard serial interface (as far as I can tell) to the Arduino, so it should be quite easy to adapt to Pi. Just need to update the C++ library a bit. It is set up to handle arbitrary bidirectional text messages (not sure the length), with some limitations, instead of standard ZigBee HA clusters. It’s a good prototype platform, but I don’t think it is ideal for development, since you probably should develop for cross-platform compatibility.


(Ben Edwards) #47

You bring up a lot in this post. While reading through these forums would have gained you most of these answers, I will attempt to clarify some points here.

There are lots of things coming that will help this. Aside from local processing — which will help — we will be releasing documentation and APIs for developing richer experiences not just simple “configuration SmartApps”, but solutions with rich controls and much deeper integration possibilities.

This is a good question. In general, it isn’t in SmartThings’ plans to make SmartApps/Solutions but we could see something come from the community that is so great we would want to incorporate it into the default user experience. I don’t think this is a situation unique to us.

Luckily we aren’t being pushed to be profitable yet. We have time to figure out business models. I hope that an eventual mix of hardware revenue (yes, Moore’s Law has to start kicking in faster here), subscription revenue from premium service offerings like video DVR service and more, as well as SmartApp Marketplace revenue shares will serve to bring about profitability. We’ll see. We have a much longer runway than Wink.

We have not been going that way nor will we. #OpenPlatform #LoadedQuestion #BadAssumptions

The firmware on this device was written very quickly and should be improved. In the recent weeks we have discussed open sourcing it to see what the community would do with it. Arik, Raspberry Pi, Particle support are all desired but need to move higher up in prioritization.

You must have only tuned in recently. We have a lot of varied topics, from the new UX of the mobile apps, to a Q&A with our CTO, to how to write SmartApps and Device Type Handlers, to a focus on IDE improvements, and more. The last one just happened to be all about the documentation.

We’ve had lots of discussion on V2 Hub specs both on this site and in developer discussion calls. Are there IoT companies that are more open and transparent with their platforms?

Our primary engineering center is in Minneapolis, MN. We have research teams in Seattle, Colorado, and Michigan, support teams in Tucson. For a lot of reasons it makes sense to be in the Bay area but we are by no means singularly focused here.