First, let’s define Programming…
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
Value | Description |
---|---|
ActiveZone |
monitor the sprinkler’s activeZone to become =, !=, or any change |
AnalogInput |
monitor (one of) the analog input(s) available on the device for =, !=, <, >, or any change – stateSelectorIndex is required to be in the range of available inputs |
AnalogInputsAll |
monitors all of the analog inputs available on the device for any change |
BinaryInput |
monitor (one of) the binary input(s) to become true, false, or any change – stateSelectorIndex is required to be in the range of available inputs |
BinaryInputsAll |
monitors all of the binary inputs available on the device for any change |
BinaryOutput |
monitor (one of) the binary output(s) to become true, false, or any change – stateSelectorIndex is required to be in the range of available outputs |
BinaryOutputsAll |
|
BrightnessLevel |
monitor the brightness level of a device for =, !=, <, >, and any change |
HumidityInput |
monitor (one of) the humdity sensor(s) available on the device for =, !=, <, >, and any change – stateSelectorIndex is required to be in the range of available inputs |
HumidityInputsAll |
monitors all of the humidity sensors available on the device for any change |
HvacCoolerIsOn |
monitor the thermostat for any time the air conditioning turns on, off, or has any change (coolIsOn is the current compressor state) |
HvacFanIsOn |
monitor the thermostat for any time the fan turns on, off, or has any change (fanIsOn is the current fan state) |
HvacFanMode |
monitor the fanMode of the thermostat for any change |
HvacFanModeIsAlwaysOn |
monitor the fanMode of the thermostat for a change to/from kFanMode.AlwaysOn |
HvacFanModeIsAuto |
monitor the fanMode of the thermostat for a change to/from kFanMode.AutoOn |
HvacHeaterIsOn |
monitor the thermostat for any time the heater turns on, off, or has any change (heatIsOn is the current heater state) |
HvacOperationMode |
monitor the hvacMode of the thermostat for any change |
HvacOperationModeIsAuto |
monitor the hvacMode of the thermostat for a change to/from kHvacMode.HeatCoolOn |
HvacOperationModeIsCool |
monitor the hvacMode of the thermostat for a change to/from kHvacMode.CoolOn |
HvacOperationModeIsHeat |
monitor the hvacMode of the thermostat for a change to/from kHvacMode.HeatOn |
HvacOperationModeIsOff |
monitor the hvacMode of the thermostat for a change to/from kHvacMode.Off |
HvacOperationModeIsProgramAuto |
monitor the hvacMode of the thermostat for a change to/from kHvacMode.ProgramAuto |
HvacOperationModeIsProgramCool |
monitor the hvacMode of the thermostat for a change to/from kHvacMode.ProgramCool |
HvacOperationModeIsProgramHeat |
monitor the hvacMode of the thermostat for a change to/from kHvacMode.ProgramHeat |
KeypadButtonLed |
|
OnOffState |
monitor the device for a change to/from on/off |
SensorInput |
monitor (one of) the sensor input(s) available on the device for =, !=, <, >, or any change – stateSelectorIndex is required to be in the range of available inputs |
SensorInputsAll |
monitors all of the sensor inputs available on the device for any change |
SetpointCool |
monitor the cool setpoint of the thermostat for =, !=, <, >, or any change |
SetpointHeat |
monitor the heat setpoint of the thermostat for =, !=, <, >, or any change |
TemperatureInput |
monitor (one of) the temperature sensor(s) available on the device for =, !=, <, >, and any change – stateSelectorIndex is required to be in the range of available inputs |
TemperatureInputsAll |
monitors all of the temperature sensors available on the device for any change |
Zone |
monitor (one of) the binary output(s) to become true, false, or any change – stateSelectorIndex is required to be in the range of available outputs |
For example, a basic trigger, could do:
- If  Device (Thermostat)’s Zone 1 Temperature Becomes Greater than 75 then
- Control Thermostat, Set Mode to Cool On
- Control Thermostat, Set Cool Setpoint to 74 Degrees
This is the Python v2.54 tutorial, which I highly recommend… I wouldn’t start with later versions, simply because v2.5x is the version Indigo currently uses.
http://docs.python.org/release/2.5.4/tut/tut.html
Get comfortable with Python, and then read the Indigo 5 Scripting Tutorial…
http://www.perceptiveautomation.com/wik … g_tutorial
That covers basic Python coding in the Interactive Script Window.
If you decide that you want to progress into developing your own plugins, the Indigo Plugin Developer’s Guide covers everything you have asked about… What are the XML files, and the structure of a plugin, etc…