Event-rich bidirectional communication library for INSTEON modems