This example Thing is a hub. A hub is a bridge that provides an aggregated UI to view any or all of the child user interfaces. The hub does not forward packets between children; it strictly provides an aggregated view into all connected children.
We can run a hub to view all three Thing in one UI.
We see a Thing icon for each child connected. Click on the Thing icon to view the child. The child's UI is shown in a HTML iframe element below the Thing icons. Notice the hub view of the child is synchronized with a standalone view of the child. If the user makes a stateful change in one view, all views are updated.
If a child disconnects, the hub shows the child offline. When the child comes back online, the hub will show the child online.
There is no hardware setup for the hub itself, other than the hosting system that runs the hub. The hub could run on a VM on the internet, or run locally on a private server on the local network. Regardless of where the hub runs, the child Things need to have a network path to the hub.
Files for this example are located in examples/hub.
This example hub allows only certain children to connect. Which children can connect is hard-coded in the hub's BridgeThingers() interface:
In this case, the hub will allow any children with model = [relays | gps | bmp180]. Children models outside of [relays | gps | bmp180] will not be allowed to connect.