Integración domótica Fibaro / Yubii Home, gratuita y de código abierto

Your Fibaro Home Center 2, HC3 or Yubii Home in Gladys: lights, shutters, sensors, remotes…
La documentación de esta integración la escribe su autor y, por ahora, solo está disponible en inglés.
This integration connects Gladys to your Fibaro Home Center 2, Home Center Lite, Home Center 3, HC3 Lite or Nice Yubii Home and offers the devices of the box in the Discovery tab of Gladys: switches, dimmers, RGBW controllers, roller shutters, thermostats, locks and sensors. Once a device is added, its states follow the box live, and Gladys controls it through the box, which keeps running: your Z-Wave network, your Fibaro scenes and your Yubii app stay as they are. The remotes and push buttons become scene triggers, and a scene action runs a Fibaro scene. Unofficial, not affiliated with Fibaro or Nice.
Development version (0.1). Written from the documentation of the API and from dumps of real boxes, not yet tested on a real Home Center or Yubii Home. Your feedback is welcome on the GitHub repository.
Setup
- Find the IP address of the box (in its web interface, or in your router). Give it a fixed address in your router.
- In Gladys, open Integrations → Fibaro / Yubii Home → Configuration and
type:
- the address:
http://192.168.1.50(a bare IP address meanshttp://). An HC3 or a Yubii Home set to HTTPS only:https://…, and turn off Verify the TLS certificate (their certificate is self-signed); - the user name and password you log in to the box with (
adminon a Home Center 2, often an e-mail address on an HC3 or a Yubii Home). An administrator account sees every device; a user account only the devices it was given.
- the address:
- Press Test the connection: the model, its firmware and the number of devices offered show up under the button.
- Open the Discovery tab and add the devices you want.
What you get
| In the box | In Gladys |
|---|---|
| Relay, wall plug (binary switch) | a switch, with its power and energy when the module measures them |
| Relay of a lamp (Light, Garden lamp, Bracket… role) | an on/off light, with its power and energy |
| Dimmer (Dimmer 2, Walli Dimmer…) | a light (on/off, brightness) when it drives a lamp, else a dimmer |
| RGBW controller | a light: on/off, brightness, color |
| Roller shutter (Roller Shutter 2/3, Walli Roller Shutter) | a shutter: position, open, close, stop |
| Shutter without position | open, close, stop |
| Thermostatic head, thermostat, HVAC | a thermostat: setpoint, mode (off, heat, cool, auto), heating state |
| Door lock | a lock: locking always; unlocking only with the option |
| Gate, garage door, motorized door (see below) | its state, and Open, Close, Stop buttons; Open only with the option |
| Gate on a relay (Gate or Garage door role) | the relay contact, and an Open button (a pulse) only with the option |
| Water or gas valve (valve type, Valve role) | its state, and Open and Close buttons, both only with the option |
| Door/window, motion, flood, smoke, CO sensor | the matching Gladys sensor |
| Temperature, light, humidity, power, energy sensors | the matching Gladys sensor |
| Battery level | a battery feature |
| Remote, push button, S1/S2 inputs with scene activation | one button per key, and the "Fibaro remote or button" trigger |
Each device is named after its room, as in the box: Wall plug (Living room). Left out: the disabled and hidden devices, the users and phones of
the box, and the devices of the plugins (HC2) and Quick Apps (HC3), unless
you turn on Also offer the plugins and Quick Apps.
Opening, unlocking and valves are off by default. Gladys closes and stops
a gate, a garage door or a motorized door, and locks a lock, but never opens or
unlocks them until you turn on Allow opening gates, garage doors and doors
(allow_gates) or Allow unlocking the door locks (allow_unlock). A
water or gas valve is neither opened nor closed (opening may flood, closing
cuts the water) until you turn on Allow opening and closing the valves
(allow_valves). Otherwise the command is refused with a message and nothing
is sent. With the option on, Gladys reads the state of the device from the box
again just before: it refuses when the state is unknown or the device is
reported dead, and sends nothing when it is already clearly open (or unlocked,
or in the state asked for a valve). A Stop, Close or Lock leaves at once and
cancels an opening or an unlocking still waiting. A gate driven by a plain
relay only has an Open button (a pulse): Gladys cannot know whether it is open,
it only checks that it answers. On a step-by-step gate, that pulse may also
stop or close it; the relay must be set to pulse mode in the box. For a valve
on a relay, "relay on" is read as "valve open": if your valve works the
other way round, Open and Close are swapped. Never tested on a real gate, lock
or valve.
How Gladys recognizes a gate. A device is a gate (never a shutter, a switch nor a dimmer, so never reached by "close the shutters", "turn everything off" or a scene opening the shutters) when:
- its type contains barrier, gate, garage or door;
- the id of its role in the box contains Gate, Garage, Door, Barrier or
Portal (
Gate,GarageDoor,SlidingGate…), or it is in thegatescategory of an HC3 or a Yubii Home; - it is a shutter module (or a radio motor) whose name contains garage, garaje, portail, portillon, barrière, porte sectionnelle, porte basculante, cancello, portón, portão, poort, garagedeur, the word gate or the word Tor, or a -tor compound (Rolltor, Hoftor, Einfahrtstor…). When in doubt, Gladys picks the gate (opening guarded by the option): a "Volet garage" is therefore a gate. Exception: a name with fenêtre, velux, window or Fenster stays a shutter;
- it is a plain relay, without a lamp role or category, whose name starts with the gate ("Portail", "Gate", "Porte de garage", "Hoftor"…, or exactly "Garage", with at most a number or a side: "Garage 2", "Garage left"; "Garage siren" stays a switch) and has no appliance word in it (heating, radiator, freezer, fridge, pump, ventilation, intercom, bell, water heater, washer, dryer, watering, plug, light, lamp, in French or English): "Chauffage garage" or "Pompe portail" stay switches.
A lock or a valve stays a lock or a valve, whatever its name.
If your gate still shows up as a shutter, give it the Gate (Gate) or Garage
door (GarageDoor) role in the box, or a name with "Gate" in it. If a
window shutter becomes a gate because its name contains "garage", rename
it in the box (for instance "Garage window shutter"). A gate motor that can
have no position and reports neither a value nor a state (a one-way radio
motor) opens, once the option is on, when the box says it answers, like a
gate on a relay; a gate with an unknown value or state is never opened. A
gate sensor, a lock or a door bell is never a gate.
After updating from 0.1.1. The devices already added keep their features, but an opening, unlocking or valve command is refused while its option is off: the 0.1.1 scenes that opened a gate, unlocked a lock or drove a valve then fail with that message. A shutter added in 0.1.1 as a switch or a dimmer shows "Update" in Discovery: that button replaces its On/off and Level features with Position and Open/close, and their history is deleted. A gate added as a switch loses that feature (and its history) on update. A valve added in 0.1.1 as a switch keeps its On/off feature and its history, but read-only: only the Open and Close buttons drive the valve, and the 0.1.1 scenes that used that switch must move to those buttons.
After updating to 0.1.3. The ids of the devices do not change, but some change category; open Discovery and press Update on them:
- a gate added as a shutter ("Shutter state", "Position") becomes a gate: its state and Open, Close, Stop buttons. Until the update, its old shutter features can only close or stop it (Position 0 closes); any opening is refused, nothing sent, with a message pointing to Discovery → Update. "Update" deletes them with their history; redo the scenes that used them with the new buttons;
- a lamp relay added as a switch becomes a light: its On/off feature changes category on update and keeps its history (same id);
- a relay named like a gate ("Portail") becomes a gate on a relay. Until the update, its old On/off feature can only turn it off; turning it on (the opening pulse) is refused with a message pointing to Update. The update removes that switch, with its history;
- a hidden light of the box whose S1/S2 keys only were offered shows up as a new device (to add); the "buttons" device already added does not change (Discovery may call it "<name> S1/S2"). An output you hid yourself in the box, on a module whose S1/S2 inputs are offered, shows up in Discovery too: nothing is created until you add it, ignore it.
A device the box reports as dead (it no longer answers: battery, range, power) keeps a badge with an orange dot in Gladys until it answers again.
Remotes and buttons in scenes
A key of a remote (KeyFob), of a push button (The Button) or the S1/S2 input of a Fibaro switch, dimmer or shutter with scene activation enabled sends a central scene event. Two ways to use it:
- the button feature of the device (one per key) changes on every press: "click", "double click", "triple click", "held", "released";
- the Fibaro remote or button scene trigger: pick the remote, the key
number and the gesture. Its variables give the key, the gesture and the
attribute sent by the box (
Pressed,Pressed2,HeldDown,Released…).
The S1/S2 keys only send events when scene activation is enabled in the parameters of the module (parameter 28 on a Dimmer 2; see the manual of the others).
Running a Fibaro scene
Press List the Fibaro scenes in the configuration: the number of each visible scene shows up under the button. In a Gladys scene, add the action Run a Fibaro scene and type the number. Scenes protected by a PIN code cannot be started this way.
Good to know
- Real time: Gladys keeps a request open with the box
(
/api/refreshStates), which answers as soon as something changes. - Measurements: a wall plug can report its power every few seconds. Gladys keeps the last reading every Minimum interval between two readings of a sensor (10 s by default); switches, buttons and opening or motion sensors are never delayed.
- Changes in the box (a device added, renamed, moved): Gladys reads the list again within seconds; press Scan in Discovery to force it.
- The box blocks an address after repeated failed logins: after a password error, Gladys retries only every 5 minutes.
Troubleshooting
- "refused the user name or the password": type them again; try them in the web interface of the box.
- "certificate refused": turn off Verify the TLS certificate, or use
http://. - "unreachable": use the LAN IP address of the box (not
localhost, not a remote access address), and check that the Gladys machine reaches it. - A device is missing: is it enabled and visible in the box? Is it a plugin or a Quick App (turn on the option)? Press Test the connection: the message counts the devices left out and why, and gives the Fibaro type of those with nothing to offer (to quote in an issue). The "technical nodes" it mentions are normal: a Z-Wave module has a hidden parent node in the box, its endpoints are the devices offered.
- A shutter is always a shutter in Gladys (position, open, close, stop), never a switch. The S1/S2 keys of a shutter module with scene activation also show up as read-only "button" features: they are scene triggers, not the shutter controls.
- A light shows up as "Button click" only: on a module whose relay the box hides, only the S1/S2 inputs were offered. Since 0.1.3 the relay is offered on its own, as a light (or a switch when its role in the box is not a lamp); the buttons device stays a trigger.
Sending the list of your devices (for an issue)
When a device is recognized wrongly, the list of the box helps fix the integration:
- In a browser logged in to the box (open its web interface first), open
http://<box-ip>/api/devices: the whole list, no number at the end. - Search (Ctrl+F) for the name of the device, or better its number: in
Gladys, Technical parameters of the device →
FIBARO_ID, then search for"id": <that number>(or"id":<that number>). - Copy the block of the device (from
{"id": …to its closing brace), then the block of its parent (the number in itsparentId), and the blocks with the sameparentId(the other channels of the module). - Check that no personal data is in there (names, addresses, e-mails, GPS
coordinates: replace them with
xxx); there is no password in that list. Paste them in the GitHub issue (or in a gist).
Why /api/devices/<number> answers "not found". Possible causes (not
checked on a Yubii Home):
- the number typed is not the Fibaro id: use the bare number of
FIBARO_ID, not the Gladys external id (fibaro:123, or with theext:…prefix), nor the number of a Gladys device; - the number comes from the Yubii app or from the address of a page of the
web interface: it may name another device (the visible module) than the one
Gladys offers. The "S1/S2 buttons" device, for one, is a hidden device of
the box named like
175.0.1, which Gladys calls after its module: searching the list by its name does not find it, search for its number; - the device was included again in the box since (it has a new number).
The whole /api/devices list avoids all three.
Parámetros de configuración
Estos son los parámetros que Fibaro / Yubii Home te pide en su pantalla de configuración en Gladys.
| Parámetro | Tipo | Obligatorio | Descripción |
|---|---|---|---|
| Your Fibaro or Yubii box in Gladys | section | No | For a Fibaro Home Center 2, Home Center Lite, Home Center 3, HC3 Lite or Nice Yubii Home: every enabled and visible device of the box is offered in the Discovery tab (switches, dimmers, RGBW controllers, shutters, thermostats, locks, door, motion, flood and smoke sensors, temperature, light, humidity, power, battery) and the remotes and push buttons become scene triggers. The states follow the box live and Gladys controls the devices through it, which keeps running. Opening gates and doors, unlocking and valve commands are off until you allow them below. Type the address of the box as seen from the Gladys machine (its LAN IP address) and the account you log in to it with. Unofficial, not affiliated with Fibaro or Nice. |
| Address of the box | string | Sí | Its IP address on your local network: http://192.168.1.50, or https://192.168.1.50 for an HC3 or a Yubii Home set to HTTPS. A bare IP address means http://. |
| User name | string | Sí | The account you log in to the web interface of the box with (admin, or an e-mail address on an HC3 or a Yubii Home). An administrator sees every device. |
| Password | secret | Sí | The password of this account. |
| Verify the TLS certificate (https) | boolean | No | The HC3 and the Yubii Home come with a self-signed certificate: turn this off to use https:// with them on your local network. |
| Also offer the plugins and Quick Apps | boolean | No | Off: only the physical devices (Z-Wave, Zigbee, Nice). On: the devices of the plugins (HC2) and Quick Apps (HC3) too. |
| Minimum interval between two readings of a sensor (s) | number | No | A wall plug reports its power every few seconds: Gladys keeps the last reading at this pace. Switches, lights, buttons, motion and opening sensors are never delayed. |
| Allow opening gates, garage doors and doors | boolean | No | Off (default): Gladys shows their state and can close or stop them, but never opens them. On: the Open button works too, after reading the state from the box again (refused when it is unknown). A gate driven by a shutter module or a relay: set its role to Gate or Garage door in the box. |
| Allow opening and closing the valves | boolean | No | Off (default): Gladys shows the state of the water or gas valves but never opens nor closes them (opening may flood, closing cuts the water). On: the Open and Close buttons work, after reading the state from the box again (refused when it is unknown). |
| Allow unlocking the door locks | boolean | No | Off (default): Gladys shows the state of the locks and can lock them, but never unlocks them. On: unlocking works too, after reading the state from the box again (refused when it is unknown). |
Cómo instalar Fibaro / Yubii Home en Gladys
- En Gladys, abre Integraciones: Fibaro / Yubii Home aparece en el catálogo junto a las integraciones nativas, con una insignia de comunidad.
- Haz clic en Instalar. Gladys descarga la imagen Docker (
ghcr.io/lm1lc3n7/gladys-fibaro:0.1.3), la ejecuta en un entorno aislado del núcleo y genera la interfaz de la integración (dispositivos, descubrimiento y configuración). - Abre la pantalla de Configuración de la integración, rellena los parámetros y guarda.
- También puedes instalarla directamente desde la URL de su repositorio: https://github.com/LM1LC3N7/gladys-fibaro.
Fibaro / Yubii Home requiere Gladys >=5.1.0. El catálogo de Gladys se actualiza cada hora, así que una nueva versión está disponible como máximo una hora después de publicarse.
¿Todavía no usas Gladys? Es gratuito y de código abierto: sigue la guía de instalación para empezar.
Sobre las integraciones externas
Fibaro / Yubii Home es una integración externa: una integración comunitaria empaquetada como contenedor Docker y publicada en GitHub. Gladys la instala con un clic y la ejecuta en un entorno aislado del núcleo. La publica y mantiene LM1LC3N7, no el equipo principal de Gladys.
- Explorar todas las integraciones, nativas y de la comunidad
- Crear y publicar tu propia integración externa
- Código fuente en GitHub — fuente de esta documentación