Fairly new to Hubitat and trying to integrate in a business settings with many smart devices throughout. My question today however is regarding connecting other Hubitats at different locations to the main one at the business location. The goal is to be able to activate lights/ speaker announcements on Hubitats in homes when one of the smoke detectors goes off at the office. Is this possible?
Yes, it is possible. There are built-in ways of accomplishing this using, for example, MakerAPI. There is also a community developed app maintained by @csteele, called HubConnect, that bears consideration for use in this situation.
I've tried various ways to connect hubs on different networks; in my case our primary residence and a summer house.
In my experience, the easiest way by far is to set up a peer-to-peer VPN between the two networks. Then you can use the built-in hub mesh application to share devices between hubs.
Setting up the VPN may or may not be easy, depending on the equipment you have at either end. In my case, I have Ubiquity routers in both locations, so setup was pretty simple.
Your hub wants to communicate to hubs on the same network. Typically that means Hub Mesh will not work to 'distant' locations. You can expand the hub's subnets to allow both locations to be "the same subnet."
It's all 'advanced networking' that isn't exactly hard but it is very much 'down in the weeds'.
With a VPN, you can make the two subnets reachable, and then with above networking manipulation would make Hub Mesh able to converse.
Hub Connect took a far different approach and was built with a mobile home / camper as the 2nd hub in mind. Hub Connect uses Hubitat's cloud as the communications pathway and doesn't care about subnetting. I'm told it's more work than Hub Mesh but it's far less than getting hub subnet adjacency built. Hub #1 talks to/from Hubitat's cloud and so does Hub #2.
Side thought - alternatively is it possible to add an external device outside of the Hub network? Either as a virtual device or through a smart hub (Homekit, etc)? Basically just need to be able to flash a light in a different location as a part of an emergency protocol.
To get it to work, one would need to place both locations on the same subnet with the VPN tunnel using only layer two (broadcast domain) like a switch port. The Habitat broadcasts would find its mesh mate. But then so will every node in both locations will be able to broadcast (ARP) to each other. This would require both locations to be configured as one vlan. There would be configuration issues such as router split horizion to deal with as well as unifying services such as dhcp and dns. There is another way but I have only seen it supported on enterprise level networking gear and that is forwarding broadcasts from one vlan to another vlan and is useful to get devices which use broadcasting as their only discovery protocol to find one another. Apples bonjour and SONOS devices come to mind.
One option I didn’t see mentioned, if this is your only (or primary) goal, is to use Rule Machine and the trigger known as a “cloud endpoint.” I believe it would work for the use case you describe, and would go something like this.
Create a new rule machine rule on hub at home (call it hub B)
Create new trigger and select “cloud endpoint”
Copy the url it creates
Now on the hub in the office (call it hub A), create a rule machine rule triggered by your smoke detector
In the rule A actions, select “send http get” and paste in the url from hub B above
Back to rule B, configure whatever actions you want hub B to take when triggered (lights on, speaker announcement, etc)
Now when Rule A is triggered by smoke, it’ll send an http request via Hubitat’s cloud relay that will be received by hub B, and then hub B will notify you at home
If you want this to happen in multiple homes, repeat the steps above for each additional hub
I’ve never tried anything quite like this myself, but it seems doable to me.