Jump to content

Debug or log for program execution in ISY


502ss

Recommended Posts

I have a couple programs that seem to execute inconsistently and I was wondering if there is a log somewhere that shows the execution steps of a program similar to the log for devices? Unfortunately some of these programs are using notifications etc. so I can't look to see if a device turned on or off because that isn't what the program does.

 

I checked the error log and there are no errors so I assume it is executing (it shows the last run time to be in line with when it should run) but the notification doesn't happen.

  • Like 1
Link to comment

Look for Wait/Repeat statements that are interrupt-able so statements after Wait/Repeat may not execute.  Post one of the Programs having trouble.

 

What email provider is being used?   The UDI facility is not recommended by UDI.  Does the Program issue the email some of the time?

Edited by LeeG
Link to comment

I have a couple programs that seem to execute inconsistently and I was wondering if there is a log somewhere that shows the execution steps of a program similar to the log for devices? Unfortunately some of these programs are using notifications etc. so I can't look to see if a device turned on or off because that isn't what the program does.

There's a lot that can go wrong with external notifications. 

 

Using the Network Module,  I wrote a set of LOCAL notifications and webserver files to act as a an on-box log of program execution, I put a notification at the top of certain programs that does Send Notification to 'WebPage' content 'WebPage Eventlog append', this appends a message to the end of a file on the ISY itself.

 

First, under Configuration->Networking->Web Server, I created a folder on the ISY named "EVENTS"

 

Then I made a custom notification with a subject of "@webpage:@append:events/log${var.1.9}.html" where the body is wrapped in HTML <DIV><PRE> tags, and contains the text I want to see in my "log".      The ${var.1.9} variable is a variable named Day_of_week, each night at midnight I have a program which updates this variable, and then calls a different notification which creates a new file with an HTML header (<BODY><TITLE>, etc), overwriting the old content from a week ago.

 

Because these are local notifications, they have been very reliable, and give me 6 days of lookback.     I also have another notification that wraps <strong><font color="red"> around certain events, so they really stand out in the logs.

 

If you want further info, I can try to post screenshots.  Only works with the Network Module enabled (or Portal).

Edited by KeviNH
Link to comment
  • 7 months later...

@KeviNH

I'm interested to see more details on how you setup the event log. Please post some screenshots, examples if you can. I'm not clear on your custom notification setup. 

 

Rant: I wish ISY would have something like this built-in. Say add consoleLog program to other programs I need to investigate and flip debug mode to start logging.

Link to comment
  • 4 months later...
  • 1 year later...

Here's a quick overview of the notifications I am using to create a list of web pages for each day of the week, and then add events to the appropriate day's logfile.

 

I have a variable for day-of-week, increments from 1-7.

 

This notification is used each day at 12:00:01 AM to recreate the "indexlog.htm" so it points to today's current logfile:

post-2758-0-26522500-1517080380_thumb.png

 

The midnight program also calls a notification to blank out the current day's logfile by writing a new header to a file where the filename includes the variable for the day of the week, like so:

post-2758-0-46836600-1517080690_thumb.png

 

And finally, here's the simplest "append to today's log" notification.  I have others which are more complex, or highlight particularly interesting events in bold, red, etc.

post-2758-0-44392900-1517080856_thumb.png

post-2758-0-26522500-1517080380_thumb.png

post-2758-0-46836600-1517080690_thumb.png

post-2758-0-44392900-1517080856_thumb.png

  • Like 1
Link to comment
Guest
This topic is now closed to further replies.

×
×
  • Create New...