Skip to main content

Hubitat Elevation smart home integration, free and open source

Hubitat Elevation integration for Gladys Assistant

Your Hubitat hub devices in Gladys: lights, plugs, shades, thermostats, sensors. Unofficial.

This integration connects Gladys to your Hubitat Elevation hub through its Maker API app, and offers the devices you authorize there in the Discovery tab of Gladys: switches, dimmers, colour and white bulbs, plugs with their consumption, shades, thermostats, locks, garage doors, buttons and sensors. Once a device is added, its state follows the hub live, and Gladys controls it through the hub, which keeps its Z-Wave, Zigbee, Matter and LAN devices. Everything stays on your local network. Unofficial, not affiliated with Hubitat.

Development version (0.1). Written from the Maker API documentation and the Home Assistant integration of the same API, and tested against a simulated hub: it has never been tested on a real Hubitat hub yet. Your feedback is welcome on the GitHub repository.

What you get​

Hubitat capabilityIn Gladys
Switch, SwitchLevela light (bulbs, dimmers), else a switch (outlets, relays)
ColorControl, ColorTemperature (colorMode)colour (RGB) and colour temperature, the one the bulb shows
PowerMeter, EnergyMeter, VoltageMeasurement, CurrentMeterpower, energy (meter), voltage and current
WindowShade, WindowBlinda shutter: open, close, stop, position
Thermostat (heating and cooling setpoints, mode, operating state)a thermostat, setpoints in °C
Locka lock, read-only unless you allow it
GarageDoorControl, DoorControla door sensor, and a command read-only unless you allow it
PushableButton, HoldableButton, DoubleTapableButton…one button per number: pushed, double tapped, held, released
ContactSensor, MotionSensor, WaterSensoropening, motion and leak sensors
SmokeDetector, CarbonMonoxideDetector, TamperAlertsmoke, CO and tamper sensors
TemperatureMeasurement, RelativeHumidityMeasurementtemperature (°C) and humidity
IlluminanceMeasurement, CarbonDioxideMeasurement, Battery…illuminance, CO2, UV index, battery, presence

Each hub device makes one Gladys device, named after its label and room ("Ceiling light (Living room)"); its hub id, room and driver are kept in its parameters. Devices with none of these capabilities (speakers, for now) are left out. Water valves are not controlled. The switch of a device that is also a lock, a garage door, a valve, a siren or a security keypad is shown read-only, whatever the options: a "turn everything off" scene never reaches it.

Requirements​

  • A Hubitat Elevation hub (C-5, C-7, C-8 or later) on the same local network as Gladys.
  • The Maker API app installed on the hub (built in).

Installation​

  1. In the Hubitat web interface, Apps → Add Built-In App → Maker API. Select the devices Gladys may see and control, and click Done. Leave "Allow Access via Remote / Cloud" off: Gladys uses the local endpoints.
  2. Open the Maker API app again: its page shows URLs like http://192.168.1.50/apps/api/12/devices?access_token=…. Note:
    • the address of the hub (192.168.1.50),
    • the app number (12, after /apps/api/),
    • the access token (after access_token=).
  3. In Gladys, open the integration, Configuration, and fill in the three fields. You may paste a Maker API URL in the address field, without its access token: the address and the app number are taken from it.
  4. Click Test the connection: the number of authorized devices, the devices offered and whether the live events work show up.
  5. Open the Discovery tab and add the devices you want. Their values are sent as soon as they are added.

Options​

  • Temperature scale of the hub: the scale set in Hubitat (Settings → Location and modes). Gladys always shows °C and converts; when the hub gives the unit of a reading, the unit wins, and is kept for the next reads. When the hub's units disagree with the option, the connection status says so and thermostat setpoints are refused. A setpoint is sent in the scale of the hub's unit when known, else in the scale of this option (live events or not), and only when the current setpoint is known and plausible in that scale: up to 35 in °C, from 39 in °F. A °F hub set to °C here is caught that way.
  • Live events (on by default): the integration listens to the event socket of the hub (ws://<hub>/eventsocket). The changes reach Gladys within a second, and the button presses reach your scenes. Off, or when the socket is lost, the devices are read at the interval below.
  • Read interval without live events: 30 seconds by default (10 to 3600). With the live events, the whole list is read every 5 minutes anyway.
  • Minimum interval between two readings of a sensor: 10 seconds by default (0 to 300). A plug that reports its power every second is sent to Gladys at this pace. Switches, lights, buttons, motion and contact sensors are never delayed.
  • Language of the feature names: French or English, for the devices added from now on.
  • Allow lock control from Gladys (off by default): see Safety.
  • Allow garage door control from Gladys (off by default): see Safety.

Safety​

  • Locks and garage doors are read-only by default. Their state shows up, but every command is refused until you turn on the matching option. Once on, Gladys can unlock your door and open your garage, from the dashboard, your scenes and the voice assistants. The garage door command works like a shutter (open 1, close -1; stop only when the opener has a stop command): a scene acting on every shutter reaches it too.
  • Before a lock or garage door command, the integration reads the device again on the hub, and refuses when its state is unknown or moving (opening, closing); nothing is sent when it is already in place.
  • After the command, the device is guarded: any other lock or garage door command on it is refused ("a command is already in progress") until it reports the state asked for, or for 20 seconds (lock) / 60 seconds (garage door). A late report of the old state or an unknown state never lifts the guard. Stopping a moving garage door (when the opener has a stop command) stays possible during the guard. The device is read again after 5 and 15 seconds (and 30 and 60 for a garage door); when these reads fail, or the state never comes, its badge says "state not confirmed".
  • The commands of one device are sent one at a time. Gladys waits 5 seconds for an answer: a command that could not leave within 3.5 seconds is refused, never sent late.
  • The integration never changes the alarm (HSM) nor the modes of the hub: there is no such command in it.

Good to know​

  • The hub stays in charge of the devices: Gladys sends its commands to the Maker API, which drives them. Keep the hub running.
  • Buttons: each button number is a feature (Button 1, Button 2…). Pushed is a click, double tapped a double click, held a long press, released its end (a release without a hold before is a plain "release"). The presses only arrive through the live events: with them off, the buttons stay silent.
  • Live events watchdog: when a full read finds a two-state change (switch, contact, motion, lock, door…) that no event told, or when the socket said nothing for 30 minutes, the socket is opened again at once; the badges only turn orange if that reopening fails.
  • Energy: the energy index only goes up. A lower reading is held; it is taken only when a later reading rises above that low value (the meter was reset and counts again). The same low value read again stays held, so an index read at 0 then back to normal makes no false consumption. A driver reporting Wh is converted to kWh.
  • The event socket carries the events of every device of the hub, not only those you authorized: the integration keeps the authorized ones and drops the rest. It needs no token.
  • Door contacts: Gladys shows 0 for open and 1 for closed; the integration converts.
  • Transport badge: a device turns "unreachable" when the hub is, or when Hubitat reports it offline (healthStatus); an orange dot means the live events are lost and the state is read at the configured interval.
  • Devices authorized later in the Maker API show up in Discovery at the next full read (5 minutes at most). The Scan button reads them at once.

Troubleshooting​

Status messageWhat to do
The Maker API refused the access tokenCopy the token again from the Maker API app page.
No Maker API app answers with this numberCheck the app number, after /apps/api/ in the URLs of the app.
The Hubitat hub is unreachableCheck the address, seen from the Gladys machine (not localhost), and that the hub is on.
The address contains the access tokenKeep only the address of the hub in that field, and paste the token in its own field.
No live events from the hubGladys reads the devices at the configured interval meanwhile, and tries again by itself.

The logs of the integration (Gladys, integration page) give the details.

Privacy​

Everything stays on your local network: the integration only talks to your hub, over the Maker API and its event socket. The access token is kept by Gladys in its database, never shown again, and sent only to your hub; it is never written to the logs. Hubitat and Hubitat Elevation are trademarks of Hubitat, Inc.; this integration is not affiliated with Hubitat.

Configuration settings​

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

SettingTypeRequiredDescription
Your Hubitat Elevation devices in GladyssectionNoThe devices you authorize in the Maker API app of your hub are offered in the Discovery tab: switches, dimmers, colour and white bulbs, plugs with their consumption, shades, thermostats, buttons, contact, motion, leak, smoke and CO sensors, temperature, humidity, illuminance, battery. The states follow the hub live and Gladys controls the devices through it, on your local network only. Locks and garage doors stay read-only until you allow them below; the alarm (HSM) and the modes are never changed. Never tested on a real hub yet. Unofficial, not affiliated with Hubitat.
Address of the hubstringYesThe local IP address of your Hubitat hub, like 192.168.1.50. A Maker API URL copied from the app page works too, without its access_token.
Maker API app numberstringYesIn Hubitat, Apps → Maker API: the number after /apps/api/ in the URLs the app shows.
Maker API access tokensecretYesShown on the Maker API app page. Kept by Gladys in its database, never shown again, and sent only to your hub.
Temperature scale of the hubselectNoThe scale set in Hubitat (Settings → Location and modes). Gladys shows the temperatures in °C and converts.
Live eventsbooleanNoListens to the event socket of the hub (ws://<hub>/eventsocket): the states follow within a second and the button presses reach your scenes. Off: the devices are read at the interval below and the presses are not seen.
Read interval without live events (s)numberNoHow often every device is read when the live events are off or lost (10 to 3600 s). With them, every 5 minutes.
Minimum interval between two readings of a sensor (s)numberNoSome devices report every second (power meters): Gladys keeps the last reading at this pace. Switches, lights, buttons, motion and contact sensors are never delayed.
Language of the feature namesselectNoUsed for the names of the features of the devices added from now on.
Allow lock control from GladysbooleanNoOff by default: locks are read-only. On, Gladys can lock and UNLOCK them, from the dashboard, scenes and voice assistants.
Allow garage door control from GladysbooleanNoOff by default: garage doors are read-only. On, Gladys can open and close them, from the dashboard, scenes and voice assistants; the command works like a shutter (open, close).

How to install Hubitat Elevation in Gladys​

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

Hubitat Elevation 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​

Hubitat Elevation 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 LM1LC3N7, 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 🙂