This app is designed to allow 2 hubs to synchronize the values of hub variables, HSM Status, and Hub Mode. (Can have multiple copies of the app if running 3 or hubs.) Much of this functionality will, at some point be available via Hub Mesh for hubs on the same LAN segment (Mode already is), but this app will also allow the use of HE's cloud endpoints for hubs that are not on the same segment.
Suggested setup steps:
- Setup the hub variables on both hubs (Names and Type must agree)
- Import the app code from https://raw.githubusercontent.com/thebearmay/hubitat/main/apps/hubVarSync.groovy (or use HPM when I get it updated) to each hub and enable OAuth
- Create the app on each hub using Add a User App
- Go to your first hub and open the Remote Hub Information
- Go to the second hub and open up the Local Hub Information
- Copy the API from the #5 to #6 (use the cloud API if not on the same LAN)
- Copy the Access Token from #5 to #6
7a) Optional - Select to resync from remote hub at reboot - Click Done
- Repeat #4-7 reversing the hubs
- Select the Variables you want to sync on both hubs (can be a 1-way sync or a 2-way)
- Optional Click Send Update on one of the hubs to send values of the selected variables to the other hub
After doing all of that, whenever a selected hub variable value changes it will be transmitted to the other hub for update.