Page 1 of 1

Is there a report of current system state?

PostPosted: Sun Apr 23, 2017 8:30 am
by Japple55
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

Re: Is there a report of current system state?

PostPosted: Mon Apr 24, 2017 9:13 am
by jay (support)
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.

Re: Is there a report of current system state?

PostPosted: Mon Apr 24, 2017 9:15 am
by Japple55
Perfect, thanks Jay!