My needs were much simpler than the very full featured driver in the OP. So I made a "Lite" version.
This version:
- removes all of the commands I didn't need (but I left the command code in, so you can add any back you may need)
- Adds optional debug logging / auto debug logging turn off
- Refreshes device ON/OFF status every minute automatically