Insteon No Acknowledgment Error Catch Solution

Posted on
Mon Dec 07, 2020 11:01 am
whmoorejr offline
User avatar
Posts: 762
Joined: Jan 15, 2013
Location: Houston, TX

Insteon No Acknowledgment Error Catch Solution

After doing all the troubleshooting for insteon reliability, I still have intermittent issues. In my house, there is an endless supply of non HA devices that could be causing interference, so I needed something to keep on top of stuff when I'm gone or asleep. This is to repeat a "turn off" command 5 times at 5 minute intervals. On the 6th attempt, it also sends me a pushover notification. As a follow-up, I have a separate trigger that logs all the "(.*)no ack" messages to a CSV file in my dropbox to review from time to time. I'm assuming that if a device totally fails, then I would get a pushover notification every 20 minutes on a device until I disable the trigger.... currently, I rarely get a notification. Another "clean-up" item would be to add a schedule event that would reset all the variables back to 0 on a nightly basis. (I haven't bothered with this step yet because I haven't received too many pushover notifications).

My Insteon Error Catch Solution. :D

For each problematic Insteon device, I’ve created some triggers to help them out.
For each device I’ve created a variable and 2 triggers:

Variable: ErrorCatchDevice_Name

1st Trigger:
Name: Error Catch - Device_Name Off
Type: SQL Logger Event
Event: Error in Event Log
Errors to monitor for: Internal Indigo Errors
Sting to match: Device_Name(.*)no ack
Condition: Always
Actions:
    turn off “Device_Name”; delay 00:05:00
    Modify Variable ErrorCatchDevice_Name, Increment by 1

2nd Trigger:
Name: Error Catch - Device_Name Off 5th time
Type: SQL Logger Event
Event: Error in Event Log
Errors to monitor for: Internal Indigo Errors
Sting to match: Device_Name(.*)no ack
Condition: if variable ErrorCatchDevice_Name is greater than value 4
Actions:
    set variable ErrorCatchDevice_Name to 0
    Send pushover notification: Title: Error Catch Message: Device_Name Off, 6th Attempt.
    Turn off “Device_Name”; delay 00:05:00

Finally, I have another trigger that writes my no acknowledgment errors to a CSV file in dropbox so I can review it every now and then to see what’s acting up in my system…..

Name: Error Catch DropBox Log No Acknowledge Events
Type: SQL Logger Event
Event: Error in Event Log
Errors to monitor for: Internal Indigo Errors
Sting to match: (.*)no ack
Condition: Always
Action: Execute Script, Embedded Python

Code: Select all
logList = indigo.server.getEventLogList(lineCount=3)

import datetime
import os.path
from os import system
 
csvFilePath = "/Users/williammoore/Dropbox/Indigo/Error Catch.csv"
csvHeaders = "3 Lines Captured from Error no Ack" + "\n"

THIS_SCRIPT = 'Error Catch Log'
TIME = '{date:%Y-%m-%d_%H:%M.%S}'.format(date=datetime.datetime.now())


# Check and see if the file exists. If not, create and write the headers.
if not os.path.isfile(csvFilePath):
    csvFile = open(csvFilePath, "a")
    csvFile.write(csvHeaders)

 
# Write new values to the file.
csvFile = open(csvFilePath, "a")
element = logList + "\n"
csvFile.write(element)
 
# Close the file.
csvFile.close()

Bill
My Plugin: My People

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest