DVDDave wrote:I guess I’m not understanding how it can fail with such 2.5 hour regularity if it’s the result of random connection issues.
Just a hypothesis, but what if your router or your ISP had some clean-up task that runs every 150 minutes which closes all socket connections that have not had traffic in the last N minutes? (where N is less than the 10 minutes that the Indigo heart-beat is sent)
Point being, I'm 99.9% sure the 2.5 hours isn't coming from Indigo, so that means it is further down the network chain (router, ISP, etc.). Something is prematurely closing the socket connection. It shouldn't be doing that since Indigo forces traffic over the socket every 10 minutes, but sometimes routers and ISPs do things they shouldn't.
Indigo's internal keep-alive is indeed using HTTP. Since leaving a browser window open helps, I suggest you do the following to add your own internal keep-alive message using Indigo:
1) Create a new Schedule. Have it execute every N minutes. I'd try 1 or 2 minutes for starters to see if that prevents the premature socket closing.
2) Select the
Hide Executions in Event Log checkbox at the bottom of the Schedule panel UI.
3) Have the Action be to execute the following embedded python script (just paste it in):
- Code: Select all
import urllib
query_url = 'http://YOUR_REFLEDCTOR_NAME_HERE.indigodomo.net/prismstatus'
try:
result = urllib.urlopen(query_url, None)
if result is not None:
server_reply_str = result.read()
if server_reply_str == 'connected':
pass
# Comment out or delete this next log line after verifying it is working:
indigo.server.log('reflector test returned connected')
else:
indigo.server.log('reflector test returned ' + server_reply_str, isError=True)
else:
indigo.server.log('reflector test returned None', isError=True)
except IOError, e:
indigo.server.log('reflector test error: ' + str(e), isError=True)
Edit the
query_url string at the begging to be your reflector. After you verify it is running every couple of minutes (in the Event Log) you can comment out the line mentioned in the script so that it will only log if there is an error trying to make the HTTP call.