Linking two Hubitat Elevation Hubs
When two Hubitat Elevation hubs run on the same local network, it is possible to view and control devices on one of the hubs (called the Remote hub) from the other hub (called the Master hub). The built-in app called Hub Link is installed on the Master hub. Hub Link is the same app used to link a SmartThings hub to Hubitat Elevation. The ip address of the Remote hub must be entered into the setup page for Hub Link. To link two hubs together, Hub Link should be installed first on the Master hub. It is possible to have more than one Remote hub linked to Hub Link, along with a SmartThings hub -- all at the same time. The ip address for each Remote hub (or ST hub) should be entered into Hub Link, separated by commas.
On the Remote hub, install and setup the built-in app, Link to Hub. This app is similar to the Send Hub Events SmartApp used to link a SmartThings hub to Hubitat Elevation (see this post). In Link to Hub, you must enter the ip address of the Master Hub (which must be on the same LAN and subnetwork). You may also select devices on the Remote hub that you want to appear on the Master hub. Each selected device will have a counterpart virtual device of the same name created on the Master hub. For sensors, any sensor event that occurs on the Remote hub will also occur on the Master hub. For actuators -- specifically, switches, dimmers, bulbs, locks and button devices -- any commands given to the real device on the Remote hub will also be given to the virtual device on the Master hub -- and vice versa. Any command given to the virtual device on the Master hub will also be given to the real device on the Remote hub.
By using this setup described above, for all practical purposes the devices selected in Link to Hub on the Remote hub are available on the Master hub. This means those devices can be used in automations on the Master hub, just as if those were real devices connected to the Master Hub. This also means that a Dashboard set up on the Master hub may contain devices from the Remote hub, that can be monitored and controlled from the Dashboard.
About Virtual Device Management
When you hit Done in Link to Hub, after selecting devices, corresponding virtual devices are created on the Master hub, each with the same name as the real device on the Remote hub. If you deselect a device previously selected in Link to Hub, the corresponding virtual device is not removed from the Master hub. You will have to remove it manually. However, if you remove Hub Link on the Master hub, all of the virtual devices it has created will be removed.
When you hit Done in Link to Hub, after selecting actuator devices, special virtual devices are created on that Remote hub. These virtual devices have 'ugly' names starting with the letter 'v', and should just be ignored. These are used for the two-way communication coming back from Hub Link when the virtual actuator devices on the Master hub are used to control the real devices on the Remote hub. If you deselect an actuator device previously selected in Link to Hub, the corresponding special virtual device on that Remote hub is removed. If Link to Hub itself is removed, all such special virtual devices are removed at the same time.