How to troubleshoot when parse() is not called?

I am trying to develop a direct apcupsd NIS device driver. It is a poll based API - ultimately, it opens a TCP connection, sends a command, receives a response and the closes the connection.

I have been working with interfaces.rawSocket.connect / sendMessage and sendHubCommand / HubAction. (I have not tried telnetConnect, but was not thinking that is the correct approach.)

I have both of them working to the point that they send the message and the server responds (verifiable via tcpdump captures), but parse does not reliably get called.

Is there additional ways for me to troubleshoot what might be going on?