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

in HE (driver/app) or other kind of programing ?

What I've done so far: