I built this plugin for Vera:
I'm looking to port it to Hubitat. However, there are a couple of things that may influence how I build it. The way I see it, I have 2 options:
- Plugin supports making commands over the serial port via an ethernet->serial converter (probably a pi zero w with a usb->serial dongle and socat)
- Implement a REST API on the pi zero, and make the HE plugin talk to the REST API.
The controller I have now supports the Litetouch 2000 protocol, which doesn't provide for notifications of changes over the serial port. If someone turns on a light via the keypad, I have to poll for it to see what its status is. And, if I poll too quickly, the data coming back comes back out of order. The result is that the current Vera plugin has a circular queue of all of the loads and it polls one every 2 seconds and updates the status in the Vera. In any case, since my current LiteTouch controller doesn't notify, a REST interface would be fine.
However, I also have a newer Litetouch controller called a 5000LC. The 5000LC supports a newer protocol (over serial) that does have status change notifications. I'm guessing that if I do a REST API when I eventually make a plugin for the newer controller, I will possibly have problems getting immediate notification of load status changes and I'll still have to do polling.
Any thoughts on this?