Skip to main content

Logitech Harmony Hub smart home integration, free and open source

Logitech Harmony Hub integration for Gladys Assistant

Logitech Harmony Hub on the local network: activities, remote commands, scene triggers.

Control your Logitech Harmony Hub from Gladys, over the local network: start an activity ("Watch TV", "Listen to Music"), turn everything off, send any remote key to the devices the hub drives (TV, amplifier, media player…), and start scenes when an activity starts — dim the lights when "Watch a Movie" starts, whether it was started from the Harmony remote, the app or Gladys.

Developed without the hardware: feedback welcome. This integration is not affiliated with Logitech; Harmony is a trademark of Logitech.

What you need​

  • A Logitech Harmony Hub (alone, or the hub of a Harmony Companion, Elite, Pro or Smart Control), set up with the Harmony app, on the same local network as Gladys.
  • Gladys 5.1 or later.
  • Ideally, a fixed address for the hub in your router (DHCP reservation): the integration follows a hub that changes address, but a fixed one makes the link faster to come back.

No Logitech account, password or cloud access is needed: the integration talks to the hub directly, on its local port 8088 (the WebSocket API the Harmony app uses). The old XMPP API, disabled by default on recent firmwares, is not used.

Configuration​

  1. Install the integration (Integrations → Install from GitHub).
  2. Open its Configuration tab. The hubs of the local network are searched automatically (SSDP, relayed by Gladys). If yours is not found, enter its IP address in Hub IP addresses (several hubs: separate them with commas). The Harmony app shows it under Menu → Harmony Setup → Add/Edit Devices & Activities → Hub → Network Info; your router lists it too.
  3. Language sets the names given to the features of new devices, the name of the "Off" choice and the language of the error messages (French by default).
  4. Search for hubs runs a search and lists the hubs found, with their address, their number of activities and devices, and whether they answer.
  5. Open the Discover tab and add the devices you want (see below).

The devices​

Each hub gives three kinds of devices, added one by one from the Discover tab. Their names start with the hub name, e.g. "Harmony Living Room · Watch TV".

The hub​

  • Current activity: the name of the running activity, or "Off".
  • Activity: a list of the hub's activities, plus "Off". Choosing one starts it (or turns everything off). In a scene, the core action "Set device value" offers the same list.

The activities​

One device per activity, with a single switch, Running: on while the activity runs. Turning it on starts the activity; turning it off turns everything off (when that activity was running). Being devices, the activities can be picked from lists in the scene triggers, the scene actions and the widget settings.

The devices driven by the hub​

One device per appliance the hub drives (TV, amplifier, Apple TV…):

  • Command: the list of every command the hub knows for the appliance (inputs, sound modes, colored buttons…). Choosing one sends it.
  • Push buttons for the usual remote keys the appliance has: volume up and down, mute, channels, arrows and OK, menu, guide, info, back, exit, play, pause, stop, rewind, fast forward, previous, next, record.

The commands are the ones of the hub configuration: change them in the Harmony app, and the integration reads the new configuration by itself.

Real time​

The hub tells the integration right away when an activity starts or when everything turns off, whatever started it: the states change in Gladys within a second. On top of that, the integration reads the current activity every 30 seconds (a missed notification, a lost connection), and sends the unchanged states again every 6 hours so Gladys never shows them as stale. Gladys' own scheduler is not needed.

When the hub stops answering, its devices show the "unreachable" badge and the integration reconnects by itself, more and more slowly (up to once a minute).

Network use​

Everything stays on the local network: no Logitech server is contacted. The integration keeps one connection open per hub and sends it one small request every 30 seconds, plus one per command; the configuration is read when it changes. A search (at startup, every 15 minutes, and with the button) sends one SSDP request through Gladys and asks each address found whether it is a hub.

Scenes​

Triggers​

  • Harmony activity started: an activity starts, from the remote, the app or Gladys. Filters (optional): the activity, the hub. Information passed on to the actions: the activity, the previous activity, the hub.
  • Harmony turned everything off: the hub turns everything off. Filter (optional): the hub. Information: the previous activity, the hub.

They fire when the hub reports the change while connected: a change made while the connection was down updates the states when it is back, without starting scenes. If activities change more than six times in a minute (two scenes starting each other's activity), the triggers pause for a minute.

Actions​

  • Start a Harmony activity: choose the activity device; the action waits for the hub to switch every device on (up to 90 seconds).
  • Turn everything off (Harmony): choose the hub, or any of its devices.
  • Send a Harmony command: choose the device, then a command from the list of usual ones, or type the name of any other one in Other command (its name or its label, as in the device's Command list, e.g. InputHdmi1). Repeat sends it several times, with Delay between repeats (in milliseconds) between two.

Scene ideas​

  • Trigger "Harmony activity started", activity "Watch a Movie" → dim the living room lights to 20%, close the shutters.
  • Trigger "Harmony turned everything off" → turn the living room lights back on.
  • Every night at 1 a.m. → action "Turn everything off (Harmony)" (nothing is sent when everything is already off).
  • The doorbell rings → action "Send a Harmony command", device "Denon AV Receiver", command "Mute".

Dashboard widget​

Harmony remote shows the current activity, a button for up to three favourite activities (the first ones of the hub when none is chosen in its settings) and an Off button. The running activity carries a check mark. A tap answers as soon as the hub accepted the order; the widget follows the change. With several hubs, choose one in the widget settings.

Troubleshooting​

  • No hub found: check that the hub is on the same network as Gladys and enter its IP address in the configuration. The search through Gladys needs a Gladys that relays SSDP; typed addresses always work.
  • "No hub answers at…": the address does not answer on port 8088. Check the address, and that the hub is powered (its light).
  • The hub is unreachable: the integration keeps trying; check the hub's Wi-Fi. A hub that changed address is found again by the next search (every 15 minutes, or with the Search for hubs button).
  • A command does nothing: the hub sent it in infrared; check that nothing stands between the hub (or its IR blaster) and the appliance, and that the command works from the Harmony app.
  • A new activity is missing: it appears in the Discover tab once the hub has synchronized with the Harmony app (a minute or so).
  • More details: set the LOG_LEVEL environment variable to debug and read the integration logs.

Limits​

  • Developed without the hardware: the protocol follows aioharmony, the library of the Home Assistant integration, but this integration was not tested on a real hub yet. Please report what works and what does not.
  • The scene action "Send a Harmony command" offers the usual commands in a list; the others are typed. The full list of an appliance is its Command feature (core action "Set device value").
  • Choosing the same command twice in a row from the Command list of the dashboard does nothing the second time (the list keeps its choice): use the push buttons, the widget or a scene for repeated keys.
  • A key is pressed and released at once: no long press.
  • The hub only knows what it sent: the states of the TV or the amplifier themselves (on, volume, input) are not known, only the running activity.
  • Harmony "Sequences", the Hue lights and the smart home devices paired with the hub are not exposed.
  • Logitech no longer sells or develops Harmony products; a firmware update that closes the local API would stop this integration.

Configuration settings​

These are the settings Logitech Harmony Hub asks for in its configuration screen in Gladys.

SettingTypeRequiredDescription
Finding your hubssectionNoHarmony Hubs on the same network as Gladys are searched automatically: open the Discover tab. If yours is missing, enter its IP address below (Harmony app: Menu, Harmony Setup, Add/Edit Devices & Activities, Hub, Network Info). Developed without the hardware: feedback welcome. Not affiliated with Logitech.
Hub IP addressesstringNoOptional, separated by commas. Only needed for the hubs the automatic search does not find. Give the hub a fixed address in your router.
LanguageselectNoNames given to the features of new devices (Activity, Command...), name of the "Off" choice, and language of the error messages.

How to install Logitech Harmony Hub in Gladys​

  1. In Gladys, open Integrations: Logitech Harmony Hub appears in the catalog, next to the native integrations, with a community badge.
  2. Click Install. Gladys pulls the Docker image (ghcr.io/guim31/gladys-harmony:1.0.1), starts it in a sandbox isolated from the core, and generates the integration's interface (devices, discovery and configuration).
  3. Open the Configuration screen of the integration, fill in the settings, and save.
  4. You can also install it directly from its repository URL: https://github.com/guim31/gladys-harmony.

Logitech Harmony Hub requires Gladys >=5.1.0. The catalog inside Gladys refreshes every hour, so a new version becomes available at most one hour after its release.

Not running Gladys yet? It is free and open source: follow the installation guide to get started.

About external integrations​

Logitech Harmony Hub is an external integration: a community integration packaged as a Docker container and published on GitHub, that Gladys installs in one click and runs in a sandbox isolated from its core. It is published and maintained by guim31, not by the Gladys core team.

Subscribe to the Gladys Assistant newsletter

A few emails per month about new releases and project news. Sent by Pierre-Gilles Leymarie, founder of the project. Unsubscribe anytime 🙂