Indigo SQL “Hacking”

Indigo Version 4 Professional has the option to log all your data to an SQL table… But I haven’t seen any significant documentation on this, at this point.

The default sql database filename is sqlite_db, and is located at /library/Application Support/Perceptive Automation/Indigo 4/IndigoSqlClient.

Please note, this is not based on any documentation…  Please feel free to offer suggestions and improvements….

The tables contained within the database are:

  • device_history_basic
  • device_history_multi_io
  • variable_history
  • device_history_hvac
  • device_history_sprinkler

And the structures are as follows:

Table Name:  device_history_basic

  1. id    – INTEGER PRIMARY KEY
  2. ts    – TIMESTAMP DEFAULT CURRENT_TIMESTAMP
  3. dev_name  – VARCHAR(255) NOT NULL
  4. dev_state   – BOOL
  5. dev_value  – SMALLINT
Table Name:  device_history_hvac
  1. id INTEGER PRIMARY KEY,
  2. ts TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
  3. dev_name VARCHAR(255) NOT NULL,
  4. temperature SMALLINT,
  5. humidity SMALLINT,
  6. setpoint_cool SMALLINT,
  7. setpoint_heat SMALLINT,
  8. current_mode VARCHAR(255) NOT NULL,
  9. fan_mode VARCHAR(255) NOT NULL