Howto use more than one "Duet-Device"
a.theofilu
Posts: 16
Hallo,
I'm writing a Duet module for a MMS-5 (Mirage media player). This player supports up to 5 zones, where every zone needs a separate network connection. While this is not a problem, I want to have up to 5 "Duet-Device" to send and receive messages separate for each zone.
To initialize this I've written the following code:
And in the functions:
This works in the way that I can send out from the Duet-module any messages to the UI-module written in NetLinx. But messages from the UI-module to the Duet-module don't arrive, except for the first device (vdvMedia1).
What must I do to get the messages also from vdvMedia2 to vdvMedia5?
--
A.T.
I'm writing a Duet module for a MMS-5 (Mirage media player). This player supports up to 5 zones, where every zone needs a separate network connection. While this is not a problem, I want to have up to 5 "Duet-Device" to send and receive messages separate for each zone.
To initialize this I've written the following code:
DPS dps1 = new DPS(props.getProperty("Duet-Device")); DPS dps2 = new DPS(dps1.getDevice(), dps1.getPort()+1, dps1.getSystem()); DPS dps3 = new DPS(dps1.getDevice(), dps1.getPort()+2, dps1.getSystem()); DPS dps4 = new DPS(dps1.getDevice(), dps1.getPort()+3, dps1.getSystem()); DPS dps5 = new DPS(dps1.getDevice(), dps1.getPort()+4, dps1.getSystem()); // Assign the virtual Duet device vdvMedia1 = new NetLinxDevice(dps1, true); vdvMedia2 = new NetLinxDevice(dps2, true); vdvMedia3 = new NetLinxDevice(dps3, true); vdvMedia4 = new NetLinxDevice(dps4, true); vdvMedia5 = new NetLinxDevice(dps5, true);
And in the functions:
protected void doAddNetLinxDeviceListeners() { vdvMedia1.addDataListener(this); vdvMedia2.addDataListener(this); vdvMedia3.addDataListener(this); vdvMedia4.addDataListener(this); vdvMedia5.addDataListener(this); } protected boolean doNetLinxDeviceInitialization() { vdvMedia1.initialize(); vdvMedia1.notifyOnline(); vdvMedia2.initialize(); vdvMedia2.notifyOnline(); vdvMedia3.initialize(); vdvMedia3.notifyOnline(); vdvMedia4.initialize(); vdvMedia4.notifyOnline(); vdvMedia5.initialize(); vdvMedia5.notifyOnline(); }
This works in the way that I can send out from the Duet-module any messages to the UI-module written in NetLinx. But messages from the UI-module to the Duet-module don't arrive, except for the first device (vdvMedia1).
What must I do to get the messages also from vdvMedia2 to vdvMedia5?
--
A.T.
0
Comments
Thanks for that hint. That's it. Now it works.
--
A.T.
Do you have a comm module for the MSS-5A that allows you to define only one module as opposed to one for every TP?
If so, any chance you could send it on?