{"id":6212,"date":"2011-07-03T07:52:30","date_gmt":"2011-07-03T11:52:30","guid":{"rendered":"http:\/\/www.schollnick.net\/wordpress\/?page_id=6212"},"modified":"2012-06-20T09:22:52","modified_gmt":"2012-06-20T13:22:52","slug":"how-do-i-program-indigos-home-automation","status":"publish","type":"page","link":"http:\/\/www.schollnick.net\/wordpress\/home-automation\/how-do-i-program-indigos-home-automation\/","title":{"rendered":"How do I program Indigo&#8217;s Home Automation?"},"content":{"rendered":"<div>\n<p>First, let&#8217;s define Programming&#8230;<\/p>\n<blockquote><p><strong>Programming is telling a computer how to do certain things by giving it instructions<\/strong>.<\/p><\/blockquote>\n<p>In Indigo, you define devices, such as:<\/p>\n<ul>\n<li>Door Alarm<\/li>\n<li>Thermostat<\/li>\n<li>Light 1 in the Rec Room<\/li>\n<li>Garage Door Opener<\/li>\n<li>etc<\/li>\n<\/ul>\n<div>For basic operations, Indigo has its own Programming scheme, that uses Triggers. \u00c2\u00a0A trigger is a status change on a device. \u00c2\u00a0Here is the list of triggers that Indigo, has built-in. \u00c2\u00a0This is not a complete list of Indigo&#8217;s triggers, since 3rd party programmers can add their own triggers&#8230; \u00c2\u00a0But it gives you a basic understanding of what triggers are available:<\/div>\n<div>\n<table>\n<tbody>\n<tr>\n<th>Value<\/th>\n<th>Description<\/th>\n<\/tr>\n<tr>\n<td><em><code>ActiveZone<\/code><\/em><\/td>\n<td>monitor the sprinkler\u00e2\u20ac\u2122s activeZone to become =, !=, or any change<\/td>\n<\/tr>\n<tr>\n<td><em><code>AnalogInput<\/code><\/em><\/td>\n<td>monitor (one of) the analog input(s) available on the device for =, !=, &lt;, &gt;, or any change &#8211; stateSelectorIndex is required to be in the range of available inputs<\/td>\n<\/tr>\n<tr>\n<td><em><code>AnalogInputsAll<\/code><\/em><\/td>\n<td>monitors all of the analog inputs available on the device for any change<\/td>\n<\/tr>\n<tr>\n<td><em><code>BinaryInput<\/code><\/em><\/td>\n<td>monitor (one of) the binary input(s) to become true, false, or any change &#8211; stateSelectorIndex is required to be in the range of available inputs<\/td>\n<\/tr>\n<tr>\n<td><em><code>BinaryInputsAll<\/code><\/em><\/td>\n<td>monitors all of the binary inputs available on the device for any change<\/td>\n<\/tr>\n<tr>\n<td><em><code>BinaryOutput<\/code><\/em><\/td>\n<td>monitor (one of) the binary output(s) to become true, false, or any change &#8211; stateSelectorIndex is required to be in the range of available outputs<\/td>\n<\/tr>\n<tr>\n<td><em><code>BinaryOutputsAll<\/code><\/em><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td><code><em>BrightnessLevel<\/em><\/code><\/td>\n<td>monitor the brightness level of a device for =, !=, &lt;, &gt;, and any change<\/td>\n<\/tr>\n<tr>\n<td><em><code>HumidityInput<\/code><\/em><\/td>\n<td>monitor (one of) the humdity sensor(s) available on the device for =, !=, &lt;, &gt;, and any change &#8211; stateSelectorIndex is required to be in the range of available inputs<\/td>\n<\/tr>\n<tr>\n<td><em><code>HumidityInputsAll<\/code><\/em><\/td>\n<td>monitors all of the humidity sensors available on the device for any change<\/td>\n<\/tr>\n<tr>\n<td><em><code>HvacCoolerIsOn<\/code><\/em><\/td>\n<td>monitor the thermostat for any time the air conditioning turns on, off, or has any change (coolIsOn is the current compressor state)<\/td>\n<\/tr>\n<tr>\n<td><em><code>HvacFanIsOn<\/code><\/em><\/td>\n<td>monitor the thermostat for any time the fan turns on, off, or has any change (fanIsOn is the current fan state)<\/td>\n<\/tr>\n<tr>\n<td><em><code>HvacFanMode<\/code><\/em><\/td>\n<td>monitor the fanMode of the thermostat for any change<\/td>\n<\/tr>\n<tr>\n<td><em><code>HvacFanModeIsAlwaysOn<\/code><\/em><\/td>\n<td>monitor the fanMode of the thermostat for a change to\/from kFanMode.AlwaysOn<\/td>\n<\/tr>\n<tr>\n<td><em><code>HvacFanModeIsAuto<\/code><\/em><\/td>\n<td>monitor the fanMode of the thermostat for a change to\/from kFanMode.AutoOn<\/td>\n<\/tr>\n<tr>\n<td><em><code>HvacHeaterIsOn<\/code><\/em><\/td>\n<td>monitor the thermostat for any time the heater turns on, off, or has any change (heatIsOn is the current heater state)<\/td>\n<\/tr>\n<tr>\n<td><em><code>HvacOperationMode<\/code><\/em><\/td>\n<td>monitor the hvacMode of the thermostat for any change<\/td>\n<\/tr>\n<tr>\n<td><em><code>HvacOperationModeIsAuto<\/code><\/em><\/td>\n<td>monitor the hvacMode of the thermostat for a change to\/from kHvacMode.HeatCoolOn<\/td>\n<\/tr>\n<tr>\n<td><em><code>HvacOperationModeIsCool<\/code><\/em><\/td>\n<td>monitor the hvacMode of the thermostat for a change to\/from kHvacMode.CoolOn<\/td>\n<\/tr>\n<tr>\n<td><em><code>HvacOperationModeIsHeat<\/code><\/em><\/td>\n<td>monitor the hvacMode of the thermostat for a change to\/from kHvacMode.HeatOn<\/td>\n<\/tr>\n<tr>\n<td><em><code>HvacOperationModeIsOff<\/code><\/em><\/td>\n<td>monitor the hvacMode of the thermostat for a change to\/from kHvacMode.Off<\/td>\n<\/tr>\n<tr>\n<td><em><code>HvacOperationModeIsProgramAuto<\/code><\/em><\/td>\n<td>monitor the hvacMode of the thermostat for a change to\/from kHvacMode.ProgramAuto<\/td>\n<\/tr>\n<tr>\n<td><em><code>HvacOperationModeIsProgramCool<\/code><\/em><\/td>\n<td>monitor the hvacMode of the thermostat for a change to\/from kHvacMode.ProgramCool<\/td>\n<\/tr>\n<tr>\n<td><em><code>HvacOperationModeIsProgramHeat<\/code><\/em><\/td>\n<td>monitor the hvacMode of the thermostat for a change to\/from kHvacMode.ProgramHeat<\/td>\n<\/tr>\n<tr>\n<td><em><code>KeypadButtonLed<\/code><\/em><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td><em><code>OnOffState<\/code><\/em><\/td>\n<td>monitor the device for a change to\/from on\/off<\/td>\n<\/tr>\n<tr>\n<td><em><code>SensorInput<\/code><\/em><\/td>\n<td>monitor (one of) the sensor input(s) available on the device for =, !=, &lt;, &gt;, or any change &#8211; stateSelectorIndex is required to be in the range of available inputs<\/td>\n<\/tr>\n<tr>\n<td><em><code>SensorInputsAll<\/code><\/em><\/td>\n<td>monitors all of the sensor inputs available on the device for any change<\/td>\n<\/tr>\n<tr>\n<td><em><code>SetpointCool<\/code><\/em><\/td>\n<td>monitor the cool setpoint of the thermostat for =, !=, &lt;, &gt;, or any change<\/td>\n<\/tr>\n<tr>\n<td><em><code>SetpointHeat<\/code><\/em><\/td>\n<td>monitor the heat setpoint of the thermostat for =, !=, &lt;, &gt;, or any change<\/td>\n<\/tr>\n<tr>\n<td><em><code>TemperatureInput<\/code><\/em><\/td>\n<td>monitor (one of) the temperature sensor(s) available on the device for =, !=, &lt;, &gt;, and any change &#8211; stateSelectorIndex is required to be in the range of available inputs<\/td>\n<\/tr>\n<tr>\n<td><em><code>TemperatureInputsAll<\/code><\/em><\/td>\n<td>monitors all of the temperature sensors available on the device for any change<\/td>\n<\/tr>\n<tr>\n<td><em><code>Zone<\/code><\/em><\/td>\n<td>monitor (one of) the binary output(s) to become true, false, or any change &#8211; stateSelectorIndex is required to be in the range of available outputs<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>For example, a basic trigger, could do:<\/p>\n<ul>\n<li>If \u00c2\u00a0 Device (<strong>Thermostat<\/strong>)&#8217;s <em>Zone 1 Temperature<\/em> <strong>Becomes Greater than<\/strong> 75 then\n<ul>\n<li>Control Thermostat, Set Mode to Cool On<\/li>\n<li>Control Thermostat, Set Cool Setpoint to 74 Degrees<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<div>The basic built-in Trigger system <strong>is<\/strong> a programming language. \u00c2\u00a0The trigger system is quite impressive , and allows fantastic control over Indigo.<\/div>\n<div><\/div>\n<div>But what if you want to do more&#8230;? \u00c2\u00a0More complex triggers and\/or develop plugins for Indigo? \u00c2\u00a0Indigo is designed\u00c2\u00a0for all levels of Home Automation users, the Beginner, Intermediate, and Expert \/ Power User. \u00c2\u00a0Indigo supports two more programming languages, \u00c2\u00a0Applescript and Python.<\/div>\n<div><\/div>\n<div>The Python Programming language is highly recommended, over Applescript&#8230; \u00c2\u00a0But Applescript does offer some better ease of integrating with your Macintosh &amp; Macintosh applications.<\/div>\n<div><\/div>\n<div>Here&#8217;s a secret, Indigo&#8217;s triggers even allow you to run embedded Applescript and Python scripts. \u00c2\u00a0So in many cases, you don&#8217;t need to develop a plugin. \u00c2\u00a0Just trigger a Python or Applescript, from a trigger action..<\/div>\n<div><\/div>\n<div>But learn Python before you sit down and try to write a Python script for the first time.<\/p>\n<p>This is the Python v2.54 tutorial, which I highly recommend&#8230; I wouldn&#8217;t start with later versions, simply because v2.5x is the version Indigo currently uses.<\/p>\n<p><a href=\"http:\/\/docs.python.org\/release\/2.5.4\/tut\/tut.html\">http:\/\/docs.python.org\/release\/2.5.4\/tut\/tut.html<\/a><\/p>\n<p>Get comfortable with Python, and then read the Indigo 5 Scripting Tutorial&#8230;<\/p>\n<p><a href=\"http:\/\/www.perceptiveautomation.com\/wiki\/doku.php?id=indigo_5_documentation:plugin_scripting_tutorial\">http:\/\/www.perceptiveautomation.com\/wik &#8230; g_tutorial<\/a><\/p>\n<p>That covers basic Python coding in the Interactive Script Window.<\/p>\n<p>If you decide that you want to progress into developing your own plugins, the Indigo Plugin Developer&#8217;s Guide covers everything you have asked about&#8230; What are the XML files, and the structure of a plugin, etc&#8230;<\/p>\n<p><a href=\"http:\/\/www.perceptiveautomation.com\/wiki\/doku.php?id=indigo_5_documentation:plugin_guide\">http:\/\/www.perceptiveautomation.com\/wik &#8230; ugin_guide<\/a><\/div>\n<div><\/div>\n<div><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>First, let&#8217;s define Programming&#8230; Programming is telling a computer how to do certain things by giving it instructions. In Indigo, you define devices, such as: Door Alarm Thermostat Light 1 in the Rec Room Garage Door Opener etc For basic operations, Indigo has its own Programming scheme, that uses Triggers. \u00c2\u00a0A trigger is a status <a class=\"read-more\" href=\"http:\/\/www.schollnick.net\/wordpress\/home-automation\/how-do-i-program-indigos-home-automation\/\">[&hellip;]<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":35,"menu_order":2,"comment_status":"open","ping_status":"open","template":"","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0},"_links":{"self":[{"href":"http:\/\/www.schollnick.net\/wordpress\/wp-json\/wp\/v2\/pages\/6212"}],"collection":[{"href":"http:\/\/www.schollnick.net\/wordpress\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/www.schollnick.net\/wordpress\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/www.schollnick.net\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.schollnick.net\/wordpress\/wp-json\/wp\/v2\/comments?post=6212"}],"version-history":[{"count":0,"href":"http:\/\/www.schollnick.net\/wordpress\/wp-json\/wp\/v2\/pages\/6212\/revisions"}],"up":[{"embeddable":true,"href":"http:\/\/www.schollnick.net\/wordpress\/wp-json\/wp\/v2\/pages\/35"}],"wp:attachment":[{"href":"http:\/\/www.schollnick.net\/wordpress\/wp-json\/wp\/v2\/media?parent=6212"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}<!-- WP Super Cache is installed but broken. The constant WPCACHEHOME must be set in the file wp-config.php and point at the WP Super Cache plugin directory. -->