Embedded vs External Scripts for newbies

Posted on
Fri Jan 08, 2016 11:12 am
simdude offline
Posts: 51
Joined: Apr 03, 2006

Embedded vs External Scripts for newbies

This is more of a comment for newbies (like myself when in comes to Indigo Python scripting). I wondered what would be better, using embedded scripts or external. Here's my thoughts so far.

    If your script will take longer than 10 seconds to execute, you MUST make it external. It won't work embedded as this is a limit.

    After deciding to do a complete clean setup and removing and adding all my devices, it was very helpful have external scripts. When you remove a device, the associated triggers and schedules will go away too. If your scripts are external, you still have to set up the trigger/schedule, but the more logic that is in the external script, the less work it will be.

    External scripts can be configuration managed with a git or other versioning tool. If you're going to be doing any scripting, I highly recommend always using something. Nothing is worse than adding a bunch of changes over a few days to find things go work great anymore. While time machine and other backups help too, a versioning tool gives you a lot more flexibility.

    I still have some short (< 7 line) scripts that are embedded. I usually keep copy in the Notes app in case I ever need to recreate.

Any other thoughts on when to use embedded vs external?

Posted on
Fri Jan 08, 2016 11:25 am
RogueProeliator offline
User avatar
Posts: 2501
Joined: Nov 13, 2012
Location: Baton Rouge, LA

Re: Embedded vs External Scripts for newbies

Any other thoughts on when to use embedded vs external?

@DaveL17 posted some differences/advantages/disadvantages just the other day... some of the same items you bring up and some additional thoughts:

http://forums.indigodomo.com/viewtopic.php?f=107&t=15359&p=108254

Posted on
Fri Jan 08, 2016 1:47 pm
simdude offline
Posts: 51
Joined: Apr 03, 2006

Re: Embedded vs External Scripts for newbies

I had missed this. Great stuff. Thank you for the link.

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 2 guests