I have multiple Logitech Harmony Hubs (which I will call "Hubs" with an uppercase "H"), devices in my house that act as remote control transceivers. In other words, the Hubs can receive commands from a select set of Logitech-branded physical remote control devices such as the Logitech Harmony 950 and then issue commands to other devices via infrared (IR) or Bluetooth. The Hubs can also receive commands from other things such as an app on a phone or tablet, or a home automation controller such as openHAB. A single Hub can also be "linked" with an Amazon account meaning that you may control it using voice commands to an Amazon Echo, (which I will refer to as "Echo"), device. However, in houses such as mine where there are more than one Hub, there is no way to control additional Hubs directly with an Echo without either losing some natural language options or creating multiple Amazon accounts. To get around the "one Hub per account" restriction while retaining natural language control and not losing things such as whole-home audio with the Echo, I use the openHAB automation software to receive voice commands from an Echo and forward those commands to the proper Hub.
The Logitech devices are built around the idea of activities. An activity can be something like "Watch TV" that when selected on a remote will trigger the Hub to turn on the TV, turn on the Android TV (streaming) device, turn on the audio and video receiver (AVR), and configure all the inputs and outputs of these items as needed. The Hub can also communicate over Bluetooth and to some Z-Wave bridges meaning you can have it send commands to a number of different things when an activity is selected. For example, when you tell it that you want to watch a movie, it could not only turn on and configure the necessary audio and video devices, but it could also dim the lights in the room if the lights are connected to a supported Z-Wave bridge like the Philips Hue Bridge.
Echo devices have a "skill" (app) available that allows them to connect to a Hub and issue voice commands such as "Alexa, turn on the TV" to trigger the "Watch TV" activity. However, the skill only allows you to connect one Hub to your Amazon account and I have multiple Hubs. While there are ways to control two or more Hubs with the Echo devices using tools provided by Amazon and Logitech, there are severe drawbacks to those solutions.
One solution involves installing two different "skills" that Logitech makes available through Amazon. One limitation to this option is that you cannot connect a third Hub. Another limitation is that you have to address each Hub slightly differently. While you could still say, "Alexa, turn on the TV", that command would only control a specific Hub and TV in one room. To control a different Hub in another room I would have to say, "Alexa, ask Harmony to turn on the TV". That would be confusing. Another option is to have multiple Amazon accounts and link different Echo devices to different accounts. Unfortunately, that has several undesirable consequences and would break things such as my use of the Echo devices as a whole-home audio system.
Fortunately, openHAB can connect to both Amazon Echo devices as well as more than two Harmony Hubs. It can also emulate a Philips Hue Bridge, which is important to allow the Harmony Hub to talk to Z-Wave devices connected to the openHAB server. (Logitech sells a Z-Wave adaptor for the Hub so it can communicate directly with my Z-Wave devices, but the cost of that adaptor did not justify its use for my needs.)
In my scenario, I have a Hub in my living room that controls all the various devices there such as the TV, AVR, game consoles, and Blu-ray player. I also have a Hub in my bedroom that controls similar items as well as a Bluetooth receiver so I can play music on my Echo Dot and have it streamed to my bedroom speakers. (The AVR in the living room has Bluetooth built-in, so I do not need a separate receiver in that area.) I want to be able to issue voice commands such as "Alexa, turn on the living room TV" and "Alexa, turn on the bedroom TV". Also, in my bedroom, I want to be able to say "Alexa, turn on the bedroom speakers" and have the Harmony Hub turn on my AVR as well as the Bluetooth receiver, the latter of which is connected to a Z-Wave power switch. A final "nice-to-have" is when I am in the living room and say, "Alexa, turn on the TV", it would issue a command to the Hub in the living room to trigger the "Watch TV" activity. Likewise if I am in my bedroom and say the same thing it would instead trigger the "Watch TV" activity on the Harmony Hub in my bedroom. To implement all of this I used a combination of groups, rules, and metadata in openHAB, groups in the Alexa app, and Philips Hue Bridge emulation in openHAB.
To start, I exposed the Z-Wave-controlled power outlet to which the Bluetooth receiver in the bedroom is connected as a switch connected to a Philips Hue Bridge. I then programmed the Hub in the bedroom to turn that switch as well as the AVR on or off when I select a "Listen to Bluetooth" activity. Once all the other activities on all hubs were programmed, (e.g. "Watch TV", "Listen to Radio", "Watch a Blu-Ray", etc.), I then connected openHAB to both Hubs and configured communication channels for all of the activities and devices connected to those Hubs. That meant that the openHAB software could act as a remote control and issue commands like "Watch TV" just as if a physical remote was used.
Once the openHAB integration with the Hubs was fully complete, I moved on to configure openHAB to act as a bridge between the Echo devices and the Hubs. To do that I created groups with names such as "Living Room TV", "Master Bedroom TV", "Living Room Speakers", "Master Bedroom Speakers", etc. Those groups were configured as switches meaning you could turn them on or off. Metadata was then added to the groups so that the Echo devices would see them as a switch you could control with voice commands e.g. "Alexa, turn on the living room TV". The final integration step was to create rules in openHAB so if e.g. the group "Living Room TV" received an "ON" command it would trigger the "Watch TV" activity on the Hub in the living room. This required a number of rules as each activity defined on each Hub needed two rules: one to detect turning "on" the switch and another to detect turning "off" the switch. Technically all the "turn off" rules could be merged into one as they all trigger sending a "PowerOFF" command to the Hub instead of individual actions such as "turn off the TV", etc. However, I prefer to keep them as individual on and off rules for each activity.
At this point voice commands work and can control all Hubs in the house. However, you have to specify what specific device you want to turn on or off e.g. "turn on the living room TV". In order to be able to say "turn on the TV" and have the TV in the room where the command was issued turn on, I used the groups capability in the Alexa app. In there I created groups such as "Living room" and "Master bedroom". I then associated all the Echo devices and items in a given room to the proper group. That way when I am in the bedroom, I can say, "Alexa, turn on the lights", or "Alexa, turn on the TV", and it will turn on the lights or TV in the bedroom and only in the bedroom. Likewise when I am in the dining room and say, "Alexa, turn on the lights", the lights in the dining room will turn on. Due to limitations in what the Echo devices understand today, I cannot say "turn on the speakers" and have the proper Bluetooth receiver and AVR turn on. So for the Bluetooth receiver I still have to say things like, "Alexa, turn on the bedroom speakers", or, "Alexa, turn on the living room speakers".
All of this works together well to allow for natural voice commands and provides befits which extend beyond just activities controlled by the Hubs. For example, being able to say "turn on the lights" while in a given area is much nicer than having to specify a location. This is especially true for areas that have more complicated names such as "first floor hallway lights" and "ground floor hallway lights". Plus it allows me to control as many Hub devices as I want instead of only being able to control one.