I have spent many many hours trying to determine why the network connections of SmartThings sucked so badly. In a nutshell, the precise same code snippet worked in one method to send a socket message, and not in another method. And both worked six months ago.
I can’t believe how bad this is. It’s this:
If you createEvent() and return it, or sendEvent(), right after firing off a hubAction, the hubAction silently fails to send.
If you don’t do the event or you do it before the hubAction, it works.
I haven’t gone through to determine this in greater resolution. But it is definitely that particular sequence.
And you guys wonder why us community developers have lost the passion. Good grief!