Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Insteon: Detailed Tracking and Reporting of Statistics Related to Message #240

Merged
merged 21 commits into from
Aug 9, 2013

Conversation

krkeegan
Copy link
Collaborator

In the most simple terms, this adds (or will add once we merge the voice commands changes) the following new voice commands:

Print Message Stats -> $device->print_message_log
Reset Message Stats -> $device->reset_message_log
Print All Message Stats -> ::Insteon::print_message_logs
Reset All Message Stats -> ::Insteon::reset_message_logs

Print Message Stats - Prints the following detail to the print log file:

  • In - The number of incoming messages received
  • Corrupt - The number of incoming corrupt messages received
  • %Corrpt - Of the incoming messages received, the percentage that were corrupt
  • Dupe - The number of duplicate messages that have been received from this device.
  • %Dupe - The percentage of duplilicate incoming messages received.
  • Hops_Left - The average hops left in the messages received from this device.
  • Max_Hops - The average maximum hops in the messages received from this device.
  • Act_Hops = Max_Hops - Hops_Left, this is the average number of hops that have been required for a message sent from the device to reach MisterHouse.
  • Out - The number of unique outgoing messages, without retries, sent.
  • Fail - The number times that all retries were exhausted without a successful delivery of a message.
  • %Fail - Of the outgoing messages sent, the percentage that failed.
  • Retry - The number of retry attempts that have been made to deliver a message. Ideally this is 0, but Sends/Msg is a better indication of this parameter.
  • AvgSend - The average number of send attempts that must be made in order to successfully deliver a message. Ideally this would be 1.0.
    NOTE: If the number of retries exceeds the value set in the configuration file for Insteon_retry_count, MisterHouse will abandon sending the message. As a result, as this number approaches Insteon_retry_count it becomes a less accurate representation of the number of retries needed to reach a device.
  • Avg_Hops - The average number of hops that have been used by MisterHouse when sending messages to this device.
  • Hop_Count - The current hop count being used by MH. This count is dynamically controlled by MH and is not reset by calling reset_message_log

Print All Message Stats - Prints the same information above for all devices, plus it prints a nice summary of the average for the entire network.

Reset [All] Message Stats - Resets all of the logs and counters to 0.

Added a number of functions to track message details.
Added functions to print message statistics to the log
Added functions to reset the message statistics
Added 2 voice commands:
- print message statistics - prints details on all devices to the log
- reset message statistics - resets the message statistics to 0 for all devices
Now collects and prints a total average for the entire network.
Save the object so we can use it in print_log messages
They still provide some detail on how long messages take to arrive.

There may be one issue in that this may catch subsequent deliveries of the same message with a lower hops_left count.  Such as when the message is delivered on the 2nd and 3rd hop.  But at the same time, sometimes the messages that should take longer to arrive, as they have used more hops, somehow arrive first, so this may be a wash.  In the end, the best way to avoid this problem is to use proper hop counts.
@krkeegan
Copy link
Collaborator Author

Here is an example of what the summary of the entire network looks like:

24/07/2013 19:35:29  [Insteon] Average Network Statistics:
    In Corrupt %Corrpt  Dupe   %Dupe HopsLeft Max_Hops Act_Hops
  6022      10    0.2%    29    0.5%      0.1      1.3      1.2
   Out    Fail   %Fail Retry AvgSend Avg_Hops CurrHops
  5637       6    0.1%   110     1.0      1.2      1.3

krkeegan added a commit that referenced this pull request Aug 9, 2013
Insteon: Detailed Tracking and Reporting of Statistics Related to Message
@krkeegan krkeegan merged commit b1a7b59 into hollie:master Aug 9, 2013
@krkeegan krkeegan deleted the insteon_stats branch August 9, 2013 23:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant