Trying to get indigo setup to do some commands when the outside temperature is colder than inside (shut off ac, start fan).
Looks like I can easily trigger with a weather snoop temperature changes above some set constant
Looks like I can also trigger based off the inside temperature relative to some content
Not sure how to trigger from one (nest plugin) to the other (weather snoop plugin)
I assume I could just do this with an Applescript. Is there an easy way to dig through all the available property names? I'm a beginner to AppleScript language (but have done a lot of programming).
compare temps
Re: compare temps
For custom plugin devices, you can see a list of all of the custom states directly below the device details window. Select the plugin device, and then right-click on the custom state and select the information you want. There's not a "Copy AppleScript Reference" option, but you should be able to infer pretty easily from the information that's there.
I'd strongly encourage you to use Python over AppleScript--especially if you are still learning--It's not that much harder to pick up, and it's a much better option IMO.
Dave
I'd strongly encourage you to use Python over AppleScript--especially if you are still learning--It's not that much harder to pick up, and it's a much better option IMO.
Dave
- Attachments
-
- Screen Shot 2015-07-05 at 5.23.25 AM.png (31.44 KiB) Viewed 4288 times
I came here to drink milk and kick ass....and I've just finished my milk.
My Plugins and Scripts
My Plugins and Scripts
- jay (support)
- Site Admin
- Posts: 19232
- Joined: Wed Mar 19, 2008 11:52 am
- Location: Austin, Texas
- Contact:
Re: compare temps
In fact, you have to use Python. Custom devices (and their states) aren't available in AppleScript.
Re: compare temps
Thanks! That makes me feel better about myself after failing to get it to work with AppleScript for 3 hours last night!!In fact, you have to use Python. Custom devices (and their states) aren't available in AppleScript.
Python looked a lot more familiar to me. I have done a lot of JavaScript work. I actually wrote it in Python first, but later learned I can't just dump my python work into script box for a conditional trigger, correct?I'd strongly encourage you to use Python over AppleScript--especially if you are still learning--It's not that much harder to pick up, and it's a much better option IMO.
I'll go do some more reading on Python/Indigo 101.
Re: compare temps
If I'm understanding your question correctly, sure you can. Set up your trigger and conditions, then:Python looked a lot more familiar to me. I have done a lot of JavaScript work. I actually wrote it in Python first, but later learned I can't just dump my python work into script box for a conditional trigger, correct?
- Actions tab
Server Actions
Script and File Actions
Execute Script (embedded script or from a file.)
I came here to drink milk and kick ass....and I've just finished my milk.
My Plugins and Scripts
My Plugins and Scripts
Re: compare temps
Ahh, so I ignore the conditions tab, execute the action and then just do conditions in the python script. I should have thought of that!
Thanks for all your help. This will open a world of possibilities!
Thanks for all your help. This will open a world of possibilities!
Re: compare temps
You can still use Indigo conditions if you'd like, but scripting them will obviously work too.cdeggz wrote:Ahh, so I ignore the conditions tab, execute the action and then just do conditions in the python script. I should have thought of that!
Thanks for all your help. This will open a world of possibilities!
I use scripting conditions with my climate control automation. I have conditions within the script to check for weekday/weekend, home/away, etc. to determine set points.
I came here to drink milk and kick ass....and I've just finished my milk.
My Plugins and Scripts
My Plugins and Scripts
- jay (support)
- Site Admin
- Posts: 19232
- Joined: Wed Mar 19, 2008 11:52 am
- Location: Austin, Texas
- Contact:
Re: compare temps
Correct - the embedded script box on the Conditions tab is only for AppleScript. As someone else suggested, just write your script in an Execute Script action and manually execute the appropriate actions (most easily through Action Groups) if your conditional logic warrants it.cdeggz wrote:I actually wrote it in Python first, but later learned I can't just dump my python work into script box for a conditional trigger, correct?