Terminals Sharing DevicesTerminal Sharing Devices let you combine separate Virtual Wiring systems into one big system. If you have 2 or more Virtual Wiring systems running independently, and you want them to work together, Terminals Sharing Devices are your answer. An Application - Shared Christmas LightsImagine you and your neighbors each used your own Virtual Wiring system to control your Christmas lights. Independently, your systems flash the various lights on the trees around your house. The systems turn on all the green lights, then the red, then the blue, and then the white. You all do it differently, perhaps synced to music. It's pretty cool the first year, but the 2nd year, you all decide it would be much cooler if all your houses were synced together. That way, someone looking down the street would see a giant light display with all the lights operating together. How to do this? Terminals Sharing Devices. Terminals Sharing Devices share whatever signals they receive with one other Virtual Wiring system. So in the case of synced Christmas lights, one system could generate the green, blue, red and white light signals and share them with each of the other Virtual Wiring systems. The other systems could then use the shared signals to turn their colored lights on and off. If you didn't want one system to control all the lights, but wanted one system to control the red, another the green, etc., that's possible. One system could share its green signal with all the others, another could share its red, etc. You could get really fancy and have each system generate its light signals based on the light signals from all the other systems... Terminals Sharing Device DescriptionTerminals Sharing Devices are installed in pairs, and a pair of Terminals Sharing Devices allows two systems to share signals with each other. Like all Devices, Terminals Sharing Devices are installed with Scripts, and once they are installed, they are visible on the Device Explorer page. Like all Devices, Terminals Sharing Devices can have terminals (and to be useful, they need them), and their terminals are available for attaching virtual wires. During configuration, two Terminals Sharing Devices are connected together. When two Terminals Sharing Devices are connected, the terminals they have in common (common means they have the same names) are functionally wired together. Once the two Devices are connected, events applied to either Device's terminals on will show up on the other Device's like-named terminals. As an example, if a system applies an "on" event to the "green_light" terminal of its Terminals Sharing Device, the Terminals Sharing Device connected to that Device will receive an "on" event on its "green_light" terminal. Terminals Sharing Devices are a way of connecting two sets of terminals together without explicitly creating wires. If one created a pair of Terminals Sharing Devices within the same system and used configuration parameters to connect them together, that would be the same (functionally) as creating two Devices, not configuring them, and drawing wires between like-named terminals. However, Terminals Sharing Devices will work between 2 different Virtual Wiring Systems. Unlike the wires on the Wires page, the connections that run between Terminals Sharing Devices can run between Virtual Wiring systems. All that is required is that the two systems be on the same (TCP/IP) network. Terminals Sharing Devices are installed pairwise. They can have as many terminals as one needs, and the terminals can be named with any valid terminal name (they just need to have the same names on both Devices). A system can have as many Terminals Sharing Devices as it needs. For the Devices to work, the systems sharing the Device(s) need to have a network connection. Getting back to our Christmas light example, if we wanted one system to control the lights of 5 other systems, we would add 5 Terminals Sharing Devices to the controlling system, and one Device to each of 5 other systems. Each of the Terminals Sharing Devices on the controlling system would be connected to the one Device in the 5 other systems. After creating the Devices, we would create four terminals on each device, for controlling the red, green, blue and white lights. Creating Terminals Sharing DevicesTerminals Sharing Devices are created by running the TerminalSharer Script. The parameters for the TerminalSharer Script are:
These parameters are optional:
Running the TerminalSharer Script with the parameters listed below creates a Terminals Sharing Device.
It creates a Terminals Sharing Device with the ID "terminal_sharer" and "red", "green", "blue", and "white" terminals. The Terminals Sharing Device connects to the Terminals Sharing Device with ID "terminal_sharer" on host "virtual_wiring_system2", running the Virtual Wiring application on port 4567 . On the "virtual_wiring_system2" host we run the TerminalSharer Script with the parameters listed below. We'll assume that we created our first Terminals Sharing Device on host "virtual_wiring_system1", running the Virtual Wiring application on port 1234.
The two Terminals Sharing Devices on hosts "virtual_wiring_system1" and "virtual_wiring_system2" are now connected. Though the two Terminals Sharing Devices share the same ID, "terminal_sharer", this is only done to make their connection clearer; the IDs need not be the same. |