SmartThings Community

Writing code


(Diane) #1

Ok, I’ll admit I know ABSOLUTLY nothing about writing code but I am finding if I want to do anything other than extreme basic stuff, I’m going to have to learn.
I have a SmartThing starter kit with more Things coming, Alexa, Harmony with remote coming, and IFTTT.
I found the language ‘groovy’ here and wondering if this is the easiest/best way to learn/operate code?
I very much appreciate any assistance in learning program that you could give as I think I do need to learn to really utilize all this $ spent.
I’m running on iPad and iPhones, but do have a Windows desktop on the network.
Ty, Diane

Sorry, but now I am seeing Apache in SmartThings and wondering if this will do what I want? (which is about everything) :slight_smile:


(Jason) #2

Not true, You will need to familiarize yourself with the IDE, but by no means do you need to learn to code.

After perusing these topics Install Rule Machine:

If you want to take it into coding see SmartThings Developer Docs


(Diane) #3

Cool. A place to start. Ty


(Brice; SmartRulesApp.com) #4

Another option is our iOS app, SmartRules, which provides a very simple way to setup rules for your smart things.


(Kevin Tierney) #5

For learning to code, one of the easiest ways to start is take a look at various examples here on the forums and on the GitHub site, look how they differ, try changing it slightly and see what happens. Over time, you’ll get more comfortable with it.

The docs at http://docs.smartthings.com are decent and has only been getting better.

Also check out @pstuart’s live code friday show. @ http://livecodefridays.com . He goes through coding various things and has started a coding concepts part of the show. All of his old shows are also available on the youtube channel


(Diane) #6

Thank you all for your answers.
I am starting with Git hub and IDE and what they are/how to access and use.
From there I’m thinking I will try to load the Rules Machine as this seems a more straight forward method for complex formulas that I could wrap my mind around. (A bit like basic algerbra)
Also, been watching the past Friday podcasts, tho still a bit overwhelmed with his easy of tech talk that is beyond me at the moment. Will work on.
Wish my Father was still here as he built his first computer in the 60’s the size of a dining room table and as heavy as a car. (Had to move it several times) He was a Mensa genius and I would have loved to have had his help now. Life.
Well, I’m sure you will not have seen the last of me here so hello to all and thank you all in advance for answering all the elementary q’s you’ll probably be seeing from me.
Ty, Diane


(Diane) #7

Ok, I’m not too bright with this apparently.
I am assuming ide means the smartthings app. I installed bravenel as a repository integration to gethub and saved.
*Now it says in instructions to go to settings, see two apps, copy and publish.
I lost it at *. I am not seeing any apps anywhere on ST. I see the code if I go to gethub but not sure how to get it into my ST.


(Jason) #8

In the IDE on the my smartapps tab do you show these two apps installed: bravenel : Rule & bravenel : Rule Machine or not?


(Diane) #9

I can go into ST apps ‘update from Repo’ and see bravenel added but I don’t see the apps listed below that.


(Jason) #10

Are they listed on the Left side or the very right side?


(Diane) #11

Sorry had to update my post to say I Don’t see the apps.


(Jason) #12

Under Update from repo it should say: “Rule-Trigger (Master)” Do you see that? or Bravenel?


(Diane) #13

I see:
SmartThingsPublic (master)
Rule-Trigger (master)


(Jason) #14

And when you click on rule trigger master is there anything in the left column, or is there more than 2 things in the right column


(Diane) #15

Bottom left under New ( only in gethub)
smartapps/bravenel/RuleMachine.png
/bravenel/RuleMachine@2x.png
smartapps/bravenel/rule-machine.src/rule-machine.groovy
smartapps/bravenel/rule.src/rule.groovy

I checked all 4 boxes publish, execute and get error message -

Error
500: Internal Server Error
URI
/ide/app/doRepoUpdates
Reference Id
251e4b10-e72f-4617-935a-3f10cb7d9ec8
Date
Thu Mar 03 15:09:20 UTC 2016


(Jason) #16

The error is because you checked the .png files(those are pictures)

Did you check the Publish for me box before selecting done?

I go through this in a step by step pictorial faq here:


(Diane) #17

Genius. Checked only ones without png (don’t see done) and now getting the two programs showing published. Yea.
Namespace / Name GitHub Repository Status Category OAuth Locations
bravenel : Rule bravenel/Rule-Trigger (master) Published Convenience
bravenel : Rule Machine bravenel/Rule-Trigger (master) Published My Apps Showing 1 to 2 of 2 entries

Anything else to do?


(Diane) #18

See now I need to update and ready. Thank you so much Jason.


(Jason) #19

If you haven’t done it already you should be able to go to the mobile app now and add new smartapp.

In the my apps section you should now see rule machine.


(Diane) #20

Actually no. I see:
From Form
From Code
From Template