hollie/misterhouse — pull request #288 by pmatis (2013-10-18 04:35:34+00:00)
Title: Insteon device log verbosity

This adds the ability to turn on Insteon debugging for just a specific device, by adding something like $object_name:4 to the debug line in mh.private.ini. I was on the fence about including the $ or not, but I think it's best to include it to reduce the chance of overlapping debug statements. It's obvious that a debug line with a $ is for an object.

There's plenty of places that don't deal with an Insteon object, but rather the messaging stack itself. The messaging could be the result of object interaction, but I'm not currently testing for that. Should we?

The only issue I'm having is setting the debug status for an object in the web interface. If I use SEARCH->'debug' then fill in the debug flag with $kpl_kit1_main:5, then underscores get stripped out. We may need to look at that in a separate request.

One last thought. I didn't look thoroughly, so there may be places where code is dealing with more than one object, and only checking if ONE object has debug turned on. We might want to use:
if $self->debuglevel(3) || $other_object->debuglevel(3)

I think I covered it pretty well so far. Perhaps a couple other tweaks will be needed to finalize.

Proposed fix to issue #81