Hi,
I'm trying to understand HG philosophy behind the virtual modules to integrate my hardware modules with HG, and I need some help.
My home automation has many hardware devices, lets say I've got N relay devices. Each of these devices has a 6 relays (channels) to control 6 lights. I can talk to my home automation using TCP Helper. To control a single relay (light) I need to know the device ID, and then the relay number (1-6).
So, I started to implement this in HG. I'm added a new program that can talk with my system, then add 6 virtual modules (because single device has 6 outputs) in Startup Code. I'm also added option called DeviceID.
Now there is a problem. How can I add more than one device with this 6 outputs. I can't change the virtual modules for this program to lets say 12 for 2 devices or 18 for 3 devices, because each of these device has a different ID which I want to setup from options parameter.
Is it possible to configure HG in that way?
And problem no 2. My system TCP connector supports only few connections in the same time. If I have many programs in HG that handles many devices then I want to have only a single connector code, that talks with my system and route events to the specific programs. What is the best way to achieve this? Do I need to write a MIG Interface that handles the communication? Is it the best solution?