homA
homA copied to clipboard
Support multiple addresses per component
In order for homA to be usable with real HA devices, it is essential to be able to expose multiple devices from a single component. The reason is that many existing technologies rely on USB/serial interfaces/gateways which talk to many devices. In its current state, the architecture of homA seems too simple to support this.
I don't see how this should be a problem. I have an Arduino which is connected to a bank of relays. Some control lighting in the garden, some control the engine heaters of our cars (essential in the Finnish winter). While i could have named my device logically (gardenlights
, engineheater
), i chose to give it the physical name (switchbank
). Admittedly, giving the device a logical name would be simpler.
Also, there is nothing to stop me from subscribing to several device channels from one device. While it would have made my code longer, i could have subscribed to (or as) /devices/gardenlights/#
and /devices/engineheater/#
. I could also have several devices all subscribing to /devices/gardenlights/#
and the device itself would filter out which messages are of importance.