Is there a report of current system state?

Posted on
Sun Apr 23, 2017 8:30 am
Japple55 offline
Posts: 224
Joined: Sep 26, 2015
Location: NE Tennessee

Is there a report of current system state?

Short of using screen-prints, is there a report/script that can show the current state of Indigo, specifically all enabled triggers and schedules, for a specific mode such as home/away/vacation, etc?

TIA,
Jim

Posted on
Mon Apr 24, 2017 9:13 am
jay (support) offline
Site Admin
User avatar
Posts: 18199
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Is there a report of current system state?

You can write a simple python script to show it:

Code: Select all
for t in indigo.triggers:
    indigo.server.log("{}: {}".format(t.name, t.enabled))


Which will print this to the Event Log window:

Code: Select all
   Interactive Shell               HS-WD100+ Double tap on: True
   Interactive Shell               Master brightness device trigger: False
   Interactive Shell               Trigger w/ delayed action group: False
   Interactive Shell               Trigger w/ delayed action group cancel: False


where the True/False represents if it's enabled (I ran this in the interactive shell which is why that's what it shows for the log type). Use indigo.schedules for schedules. Of course, you can get a lot more fancy by writing to a file, etc., but that gets you started.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Mon Apr 24, 2017 9:15 am
Japple55 offline
Posts: 224
Joined: Sep 26, 2015
Location: NE Tennessee

Re: Is there a report of current system state?

Perfect, thanks Jay!

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 2 guests