I am currently developing a binding for controlling multiple LED modules (there are 8 colors/channels on each LED module). Each module has a specific ID and I can control every module via CAN (a simple data bus).
The binding is currently structured, that each module is one thing with 8 channel items. The module ID is written into the thing configuration.
So far so good.
But now I want to group modules. It is very exhausting setting up 4 things to control 4 light modules.
So I read on the binding documentation, that the preferred way of controlling multiple things (via the same protocol) is to use a Bridge.
I looked into the HUE and Milight bridges, but I can’t quite understand if this concept would fit my needs.
What I currently want, is to set a channel which then sets all other channels on the other modules.
My way of achieving this currently would be to create a bridge, which receives a list of IDs of the light modules, which then get instantiated as things. And when receiving a command, I would just send the command to all things in the “thing-list”.
Is this the right approach to do this? Did I understand everything correctly?
And also are there some good bindings which implement bridges in this way? I just can’t find a good example on how to use a bridge, but not as a gateway between different protocols.
If this would be correct, then I see possibilities in the future of scanning actively in the bridge for those light modules which then get dynamically added to the lightmodule-list.