Hello all,
I've implemented a script that communicates with a Cyclades PM10A, which is a power strip you communicate with over a 9600baud link to tell it to turn outlets on and off, ask for status, etc.
My script refreshes the PM10A's status once every 3 minutes. Basically, I send a "status all" with a carriage return to make sure all 10 of the outlets are in the correct state, and look for the PM10A's "pm" prompt in the response so I can know the link is healthy.
If I don't see one prompt at least once every 4 minutes, I send another carriage return and also send myself an email to say that the watchdog timed out.
It seems like my script works very well. However, maybe once a day or so, where the watchdog times out, and sends the second carriage return. On this timeout, the serial callback is finally called. The output of "hs.GetComPortData" in the callback indicates that two prompts have been received.
The only pattern that I can detect is that every time the callback fails to be called, there was another event that was triggered in the same second:
10/22/2012 2:14:09 PM Event Event Trigger "Refresh PM10 Login"
10/22/2012 2:14:09 PM Event Running script in background: PM10Handler.txt("SendToServerPM10","RefreshLogin")
10/22/2012 2:14:09 PM Event Event Trigger "Update Audrey Page"
10/22/2012 2:14:09 PM Event Running script in background: MyScripts.txt("UpdateAudreyPage","")
10/22/2012 2:14:09 PM LogPM10Cmd SrvPM10 RefreshLogin
[...]
10/22/2012 2:15:09 PM Event Event Trigger "SrvPM10 Watchdog Timeout (delayed event)"
10/22/2012 2:15:09 PM Event Event Trigger "SrvPM10 Watchdog Timeout"
10/22/2012 2:15:09 PM Event Running script in background: PM10Handler.txt("SendToServerPM10","Watchdog")
10/22/2012 2:15:09 PM LogPM10Cmd SrvPM10 Watchdog!!
10/22/2012 2:15:09 PM SrvPM10 SrvPM10:InputReceived: statusallONSI(s)Users1UOFF2UON3UON4UOFF5UOFF6UOFF7UOFF8UON9U ON10UONpmpm
10/22/2012 2:15:09 PM email Email successfully sent
10/22/2012 2:15:09 PM SrvPM10 SrvPM10: Prompt seen. Normal state.
Has anyone seen anything like this?
Thanks,
Chris
I've implemented a script that communicates with a Cyclades PM10A, which is a power strip you communicate with over a 9600baud link to tell it to turn outlets on and off, ask for status, etc.
My script refreshes the PM10A's status once every 3 minutes. Basically, I send a "status all" with a carriage return to make sure all 10 of the outlets are in the correct state, and look for the PM10A's "pm" prompt in the response so I can know the link is healthy.
If I don't see one prompt at least once every 4 minutes, I send another carriage return and also send myself an email to say that the watchdog timed out.
It seems like my script works very well. However, maybe once a day or so, where the watchdog times out, and sends the second carriage return. On this timeout, the serial callback is finally called. The output of "hs.GetComPortData" in the callback indicates that two prompts have been received.
The only pattern that I can detect is that every time the callback fails to be called, there was another event that was triggered in the same second:
10/22/2012 2:14:09 PM Event Event Trigger "Refresh PM10 Login"
10/22/2012 2:14:09 PM Event Running script in background: PM10Handler.txt("SendToServerPM10","RefreshLogin")
10/22/2012 2:14:09 PM Event Event Trigger "Update Audrey Page"
10/22/2012 2:14:09 PM Event Running script in background: MyScripts.txt("UpdateAudreyPage","")
10/22/2012 2:14:09 PM LogPM10Cmd SrvPM10 RefreshLogin
[...]
10/22/2012 2:15:09 PM Event Event Trigger "SrvPM10 Watchdog Timeout (delayed event)"
10/22/2012 2:15:09 PM Event Event Trigger "SrvPM10 Watchdog Timeout"
10/22/2012 2:15:09 PM Event Running script in background: PM10Handler.txt("SendToServerPM10","Watchdog")
10/22/2012 2:15:09 PM LogPM10Cmd SrvPM10 Watchdog!!
10/22/2012 2:15:09 PM SrvPM10 SrvPM10:InputReceived: statusallONSI(s)Users1UOFF2UON3UON4UOFF5UOFF6UOFF7UOFF8UON9U ON10UONpmpm
10/22/2012 2:15:09 PM email Email successfully sent
10/22/2012 2:15:09 PM SrvPM10 SrvPM10: Prompt seen. Normal state.
Has anyone seen anything like this?
Thanks,
Chris
Comment