Having problems with this LiteTouch plugin I made, any suggestions here?

No idea if anyone here uses this, I had a few users of my plugin for this on Vera, so I know it's out there. It works for control, but...

I am having 2 problems though:

  1. The polling loop doesn't seem to be working. It should continuously poll the loads in a circular queue to ensure the states are up to date since the LT2000 protocol doesn't notify when changes are made via wall keypad.
  2. When a load is changed via the Hubitat, it does a poll on it to verify that the change took. I get a "read timed out" error. Data is coming back though, but it seems like it's not interpreting it. If I telnet to the port and type the command to poll a load, the response that comes back is in the format "18 250\r". I can't figure out why it's not matching this.

Any ideas here? I've never done anything in Groovy before.

You mention using telnet to test it, but I don't see you making any sort of telnet connection in the app. Or can you just blast TCP data at it also or should it be telnet?

Here is a good example of a driver using Telnet: [RELEASE] Network UPS Tools (NUT) monitor and shutdown controller (upsmon)

I gotta commit the new code. It's not an app and a driver anymore, it's only a driver and a child driver since apps don't let you hold open a connection.

I will get that committed.

Ok, I uploaded my existing code. There is a parent driver and a child:

Still same issues? Did you do any debugging? I see it is using "rawSocket" now, not telnet, does the device support that? Or maybe it is the same as using the built in telnet functions, I am not actually sure.

Same issues. It sort of works. I kind of wonder if multiple things are sending/receiving at the same time and it's getting all wonky because of that.