Skip to main content

Hive smart home integration, free and open source

Hive integration for Gladys Assistant

Control Hive heating, hot water, lights, plugs and sensors from Gladys.

Control your Hive (Centrica / British Gas) devices from Gladys Assistant: heating, hot water, radiator valves, lights, plugs, motion and door/window sensors, plus the automations ("actions") of the Hive app.

This is a cloud integration: Gladys talks to the Hive cloud, the same one the Hive app uses, and needs an Internet connection.

Supported devices​

Hive productIn Gladys
Active Heating (thermostat)Thermostat: temperature, target, mode, heating, battery
Radiator Valve zone (TRV)Thermostat: temperature, target, mode, heating, battery
Hot waterWater heater: mode (schedule / on / off), boost, heating
Active Light (warm white, tuneable, colour)Light: on/off, brightness, white temperature, colour
Active PlugSwitch: on/off, power (W)
Motion sensorMotion, temperature, battery
Window / door sensorOpening, battery
Hive actions (automations)A switch to enable or disable each action

Thermostat modes: Schedule (follows the Hive schedule), Manual (holds the target temperature) and Off (frost protection). Setting a temperature while the heating is off switches it to Manual.

Configuration​

  1. Open the Configuration tab of the integration.
  2. Enter the email and password of your Hive account, then save.
  3. Hive usually confirms a new login with a code sent by SMS. The connection status then says so: type the code in the SMS code field and save within 3 minutes.
  4. Gladys is then a remembered device of your Hive account (it appears as "Gladys Assistant" in the account's device list): later logins need no code, even after a restart.
  5. Your devices appear in the Discovery tab, ready to be added.

Other settings:

  • Refresh interval (60 s by default, 30 s minimum): how often Gladys reads the Hive cloud. Sensors (motion, door) are seen with this delay — Hive does not push events to third parties.
  • Default boost duration / temperature: used by the hot water boost feature, the widget buttons and the scene actions left empty.
  • Low battery threshold: level under which the "Hive battery low" scene trigger fires.

Buttons​

  • Test the connection — logs in again with the saved settings (this may send a new SMS code) and counts the devices.
  • Refresh the Hive devices — re-reads the home, e.g. after adding a bulb in the Hive app.
  • Forget the Hive session — forgets the remembered device and the session: the next login asks for a new SMS code. Use it before removing the integration, or when the login is stuck.

Scenes​

The integration adds its own cards to the scene editor (Gladys 5.1 or later).

Triggers:

  • Hive motion detected — a motion sensor saw something move ({{triggerEvent.data.device_name}}).
  • Hive door or window — a sensor opened or closed (filter on the change).
  • Hive boost ended — a heating or hot water boost ended, timer elapsed or cancelled from the Hive app.
  • Hive device online / offline — Hive lost or found a device again.
  • Hive battery low — a battery dropped under the threshold ({{triggerEvent.data.battery}}).

Actions:

  • Boost the Hive heating (zone, duration, temperature) and Cancel the Hive heating boost;
  • Boost the Hive hot water (duration) and Cancel the Hive hot water boost;
  • Set the Hive heating mode (schedule, manual with a temperature, off);
  • Set the Hive hot water mode (schedule, always on, off).

Leave the zone empty to target the first one of the home. Each action returns whether it worked (e.g. "Boost started"), so the following actions can depend on it. Commands sent by Gladys never fire the Hive triggers themselves.

Dashboard​

  • Hive heating widget: live temperature and target of a zone (pick it in the widget settings), mode, remaining boost time, boiler activity, battery, and Boost / Cancel boost / Back to schedule buttons.
  • Hive home widget: Hive connection, hot water, lights on, open doors and windows, offline devices and low batteries, with a hot water boost button.

Troubleshooting​

  • "Hive refused the email or password": check them in the Hive app or on my.hivehome.com.
  • "Wrong SMS code" / "The SMS code expired": use Test the connection to receive a new code, then save it within 3 minutes.
  • A device shows "unreachable": Hive reports it offline (bulb switched off at the wall, flat battery, hub disconnected).
  • Look at the integration logs: passwords, tokens and codes are never logged.

The session (remembered device, renewal token) is stored in the integration's private /data volume, never the password.

Configuration settings​

These are the settings Hive asks for in its configuration screen in Gladys.

SettingTypeRequiredDescription
Your Hive accountsectionNoSign in with the email and password of the Hive app. Hive usually confirms a new login with a code sent by SMS: when the connection status asks for it, type the code below and save within 3 minutes. Gladys is then remembered by your Hive account and no longer needs a code.
Hive emailstringYes
Hive passwordsecretYes
SMS codestringNoOnly when the connection status asks for it: the code Hive sent by SMS.
Refresh interval (s)numberNoHow often Gladys reads the Hive cloud. Sensors are seen with this delay.
Default boost duration (min)numberNo
Default heating boost temperature (°C)numberNo
Low battery threshold (%)numberNo

How to install Hive in Gladys​

  1. In Gladys, open Integrations: Hive appears in the catalog, next to the native integrations, with a community badge.
  2. Click Install. Gladys pulls the Docker image (ghcr.io/gboulvin/gladys-hive: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/gboulvin/Gladys-Hive.

Hive 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​

Hive 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 gboulvin, 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 🙂