Software architecture question for device that interfaces the HE to a lighting controller

I haven't worked on this for months. However, I have a Raspberry Pi with a usb->serial converter on it running mosquitto. And I've created a python daemon that spawns 2 threads, one for MQTT communication and one for serial communication. It basically populates mosquitto with the current status and monitors for commands over mqtt for requested changes. It's almost there, I just need to find an afternoon with some time to finish it. I'll post my code when it's done.