A true community code repository

(Andrew Mager) #1

Dear SmartThings community,

As @Jim and I completely revamp our developer portal, we need a good place to store code examples. I thought, “why not make a public repository on Github that everyone could contribute to?”

Here it is: https://github.com/SmartThingsCommunity/Code

As we iron out the folder structure and start building this out, feel free to send pull requests with your best code examples.

Please be very descriptive with the filenames so that examples are easier to find.

Looking forward to coding with you.

Genesis of a way to create and publish "Community Generated FAQs"
(ActionTiles.com co-founder Terry @ActionTiles; GitHub: @cosmicpuppy) #2

Great and important step, Mager!

I have a clarification question though:

Is this repository only for “examples” or is it also meant to store “published Community SmartApps and SmartDevice Types” – NB: by “published”, I am including both “certified” and “non-certified” stuff; but stuff that has a bit of an ongoing life and implied bit of support commitment.

The latter seems redundant to folks that already have shared GitHub repositories for their individual official-like fully-fleshed out apps and devices; and I don’t know enough about GitHub forking and such to know how to avoid this redundancy.

Whereas “examples” could be just snippets, and could also be fully functional code, but these wouldn’t be maintained over time like fully-fleshed stuff.

I’m not sure if I’m describing the difference very clearly.

And, on top of it all, code examples could also fall into the category of FAQs (maybe?), which I coincidentally just opened up a Topic on for discussion and ideas…

… CP / Terry.

(Ron) #3

Sweet ! Big step in the right direction ! Thanks @mager and @Jim

Next step integrate it with the IDE. I keep my smart things modifications in git but have to cut/paste between ide to git. I prefer to work on my code in eclipse so I modify in eclipse, copy from eclipse to ide and publish. When I am done I commit to git so I have history and access from other machines.

(Andrew Mager) #4

@tgauchat This will be more for examples and snippets.

In addition to this, I want to have a place for community SmartApps on Github too. This will help developers and users discover use cases.

Stay tuned for that, and I welcome your feedback.

(Andrew Mager) #5

@Ron Official Github integration is prioritized :slight_smile: Stay tuned.

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

Thanks for the clarification, Mager; and the related initiatives!

Please do let me know what you think about the Community FAQ’s “Category” or a Community FAQ Platform (per the linked Topic). You can PM me if you wish, or discuss thoughts about FAQs there.

Staying tuned! :wink:

(Ron) #7

Wouldn’t it be easy for ST to let people publish their devices and apps to something like “Community Supplied - At Your Own Risk” or something like that. Right now I can publish only to myself or request ST to publish, which from @garyd9 experience seems to not happen in a timely manner. Correct me Gary if ST is in communication with you about your GD00Z device type.

Wouldn’t it be cool if ST simply allowed us to publish publicly to a category that makes it clear it is NOT from ST and not confirmed to be functional. If we could then request the source behind the device or app then we could use these as templates for improvements.

Ideally add a rating system and people could vote on the better versions.

The first part I think is extremely easy and would take little effort on ST’s part. The second part is obviously a significant enhancement.

(Gary D) #8

There’s a known “very long backlog” on user submitted device types and smartapps. There are probably thousands of things in front of me in the queue…

It’s brought up every couple of weeks at the dev conference call. My code has only been in the submitted state since “30 Jan 2015 2:42 PM UTC”

However, your idea isn’t a bad one. There are many smartApps and device types that people don’t want to submit to ST for a variety of reasons, but still want to share them openly.

(For example, I have a device type for a Schlage touchscreen lock that I haven’t submitted simply because it’s designed only for a single device, but an entire class of devices.)

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

Using the Apple iPhone App Store and Google Play Store as industry analogs, I doubt SmartThings would do what you suggest.

A SmartApp or SmartDevice Type can seriously impact the platform, especially if widely used. Furthermore, SmartThings does not want to overload their support teams with stuff that could have been filtered out during the certification process.

(Ron) #10

I understand your point but how is this different from this community which shares devices and app via text that must be cut and pasted. Same stability issues. More likely to cause issues due to cut/paste issues etc. As far as support is concerned that was the point of “At your own risk”, then can make it clear that they don’t support community shared devices and apps. just like I am sure they do now with stuff posted here. I actually agree that ST will not take my suggestion and that they will use points similar to yours if needed to but I like to be optimistic at times :smile:

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

Huge difference in scale.

I firmly believe that the fraction of Customers who are willing and able to use the IDE to paste and self-publish is miniscule compared to those who can install using a single step in the mobile apps.

The latter also gives more of an impression of ST’s blessing, even with support / “own risk” disclaimer.

ST could decide the benefits outweigh the risk, but based on my limited knowledge of STs operations and strategy, I would personally advise against it.

It is much better for them to ramp up their certification process, and they are doing exactly that right now.

(Alex) #12

Yeah, we have Pollster for that!

(Andrew Mager) #13

I’m favor of having a system like this:

Certified SmartApps - These are the apps that are submitted, reviewed, QA-tested, and approved. As a company, we are working on a better way to surface these apps. For example, there needs to be a place on the web (and in the mobile app) where you can discover SmartApps. I want to Google, “laundry smart home” and be taken to the Laundry Monitor app on a website, with reviews, upvotes, and instructions on how install it. I also want links to Github on there so I can customize the SmartApp for my usage.

Community SmartApps - This would be an open repository that anyone could submit pull requests to. As a company, we would help organize these SmartApps into categories. We would also host code snippets and examples for our dev portal. Rather than everyone else managing their own repository of SmartApps on Github, we should host it.

The latter idea needs to be approved by us internally, and I’ll push for it.

(Andrew Mager) #14

We are building a true device and device-type certification program with @tyler.

(Jody) #15

How hard would it be to create an API that allows the code to be copied from the smartthings official apps to a user’s installed apps. This would create single click installs. Removing all friction required to install a smartapp is going to make the user experience much better, and instructions on how to install something sounds like a lot of friction to me. A user should be able to install a smart app with one click from the web or from their phone.

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

Certified SmartApps already appear automatically in the list of all SmartApps in the Mobile Interface. It would be handy to cross link to/from an URL with more information and the published sourced code (if Open Source).

But if you are referring to making it possible for any User to one-click install Community SmartApps (i.e., uncertified SmartApps), I personally think this is inadvisable, as discussed here and in followup responses:

(Jody) #17

Nope. I meant only certified or official apps could use the one click install. Installing community apps should be as easy as side loading apps on android though. Take a look at how most platforms handle plugins. A great example is WordPress. You have an official add on installer and then you have the ability to load your own add on. Our smart apps should be packed into a zip file with all relevant files and easy to install via a web interface. An everyday user should not have to even open the IDE to install an app.

(Andrew Mager) #18


The user could also manage their SmartApps from there.

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

My fear is that the easier the process, the more likely it is that unofficial / uncertified SmartApps/Devs will be used by folks that are unaware of the risks and special tech support restrictions associated with those.

But ignorance and complexity is certainly not a solution to a security or stability problem. A “sideload” installation process with a clear disclaimer agreement is much more typical, I concur.

(Jody) #20

Exactly. This could be something like ‘apps.smartthings.com’ with a “my apps section”. This would also expose certified apps to the search engines in the form of nested urls. For example:


Once ActionDashboard is certified I should be able to find it and install it simply by logging in.

That is correct. You only hurt the end users by adding layers of complexity. Just search around the boards and you will find a category of people who are completely turned off by the idea of having to move code around, even if it is just copying and pasting. Uploading a zip file is something everyone is used to doing.