I have a board that has an Ethernet jack, 8 relays and 8 binary inputs. The control/state of the I/Os is done via sockets. I have managed to write the python function that polls the board and am now looking to integrate into HA.
I’ve followed the AwesomeLights example and the extension found here: Examples are great!
Before I go deeper down my current rabbit hole, I’d appreciate any guidance/suggestion. At this point, I’m trying to get just the relays (switch component) working…
- Is it best practice to “spin-off” a thread to communicate with the board?
- Should I create a class for the board, then separate classes for the relays and inputs? What is the best way to have these communicate?
Would appreciate some high-level guidance before I spend another week spinning my wheels.
Many thanks,
J.