Classic Groovy IDE, new IDE, Rules API, WebCoRe?

It’s been a while since I wrote a couple simple groovy apps for my SmartThings setup.
I have a need for another app and I’m utterly confused as to the platforms / implementation and workflow these days…

  • Classic Groovy IDE - though still functional, it seems like it will be removed sooner or later. Documentation is also hard to navigate through, and groovy is just an odd language.
  • New IDE - starting a new app, I got to “hosting” at which point I need to supply either AWS Lambda or a public server access. Samsung / SmartThings don’t host these apps anymore? Not even sure what the language is.
  • Rules - …
  • WebCoRe - a 3rd party application that runs on the hub and allows developing custom apps?

At the end of the day I need to write a simple app that takes in 3-4 inputs (temperature sensors, states of devices such as TV, switches), does some logic and maths, and controls 2-3 outputs ( a dimmer switch, an on/off switch, etc…)

[quote=“Borisw37, post:1, topic:219965”]

  • Classic Groovy IDE - though still functional, it seems like it will be removed sooner or later. Documentation is also hard to navigate through, and groovy is just an odd language.[\quote]

I’m not sure why groovy would be considered odder than any other noncompiled programming language, but yes, it has been officially announced that the current IDE And the smartthings hosted cloud will be going away sometime this year.

  • New IDE - starting a new app, I got to “hosting” at which point I need to supply either AWS Lambda or a public server access. Samsung / SmartThings don’t host these apps anymore? Not even sure what the language is.

Eventually SmartThings will no longer provide public hosting in their cloud. You can use any language you want to and host it yourself and then you connect to smartthings through the public API, essentially through webhooks. This isn’t fully documented yet, but there’s enough to start writing some if you want. Think of it like connecting to the “maker” webhooks channel in Ifttt. You can write your own program in C, Java, python, even groovy if you want, but it has to run on your own server and then connect through the endpoints to SmartThings.

  • Rules - …

The new rules API is an official smartthings offering which will perhaps eventually run locally on the hub but right now runs in the smartthings cloud.

  • WebCoRe - a 3rd party application that runs on the hub and allows developing custom apps?

Not quite. Webcore is a community created rules engine, currently written in groovy and currently running in the smartthings cloud Just like any other smartapp. You write your own “pistons“, which is what webcore calls its rules. But they are running in the groovy cloud, not on the hub. I haven’t heard of any plans to have it run on the hub. I believe that eventually the intention is to replace it with the official rules API.

Webcore has been around for a couple of years and has its own forum and a very active community if you have any further questions. here’s the community FAQ (the topic title is a clickable link) which has links to other resources including their forum.

2 Likes

For now, if this is something you need for your own practical use, I would do this in Webcore. It’s the most developed and best documented of the current options and there are lots of people to help if you get stuck on anything. Just be aware that eventually you will have to rewrite it, probably in the new but as yet unfinished rules API.

Or you could go ahead and start writing it for the new architecture, using the rules API. :sunglasses:

1 Like

We haven’t been told what is replacing the IDE, so at this point I’d recommend using another platform rather than figuring out what is going on with ST.

1 Like

Rules do not require an external server to run. They either execute in the SmartThings Cloud or on the hub if you are running the current beta of the hub firmware. Scenes and rules built in the mobile app are now mostly migrated to the new Rule API. You can curl the rules into the platform or generate them with postman. We have several tutorials on how to work with the new Rule API

Rule Helper Tutorial
Local Execution of Rules

If your automation does not need to connect with any third party cloud, then rules will be the most likely candidate for building automations.

If you want something more complicated or need to send/recieve data from a third party service, then Endpoint SmartApps might be the answer for you.

These are the apps that you will need to either host in your own cloud or on a raspberry pi. Here are some tutorials for that.

Developer Newsletter February 2021
Simple SmartApp Tutorial (SmartApp SDK)

5 Likes

Excellent, thanks for the correction! :sunglasses:

1 Like

If I had a buck for every time surmising wasn’t helpful! :sunglasses: