Saltar al contenido principal

Integración domótica BleBox, gratuita y de código abierto

Integración BleBox para Gladys Assistant

BleBox Wi-Fi modules, locally: lights, relays, shutters, gate, heating, sensors.

info

La documentación de esta integración la escribe su autor y, por ahora, solo está disponible en inglés.

This integration shows your BleBox Wi-Fi modules in Gladys and controls them through their local HTTP API, on your network, without the BleBox cloud.

Never tested with a real device: the integration follows the API documentation and the manufacturer's blebox-uniapi library, but nobody has tried it on a real module yet. Feedback is welcome.

Unofficial integration, not affiliated with BleBox.

Supported modules​

ModuleIn Gladys
wLightBox, wLightBoxSlight: on/off, brightness, colour (depending on the colour mode)
dimmerBoxlight: on/off, brightness
switchBox, switchBoxDrelays (read only until declared safe), power
shutterBoxshutter or curtain: open, close, stop, position (if calibrated)
gateBoxgate: open/closed, position, open, close and stop buttons
thermoBoxtemperature, probe, setpoint, heating on/off, safety cut-off
tempSensortemperature
airSensorPM2.5 and PM10
multiSensortemperature, humidity, light level, wind, rain, flood, CO2…

Setup​

  1. Give each module a fixed IP address in your router.
  2. In Gladys, install the BleBox integration from the store.
  3. Type the IP addresses of the modules (separated by commas), or use "Find the BleBox devices" (mDNS search through Gladys).
  4. Add the devices from the Discovery tab.

If the local API of your modules is protected in the wBox app, type the user name and the password. The password is kept by Gladys in its database, never shown again, sent only to your modules: the typed addresses and the modules already added (in clear on your local network: the modules have no https). A protected module only found by the search gets no credentials: the status asks you to type its address.

Command safety​

  • Relays: a relay may feed anything, and a "turn everything off" of a voice assistant or a scene reaches every switch. So a relay is shown read only until you declare it safe in "Relays declared safe" (the module id, parameter DEVICE_ID of the Discovery tab, or id:number for one relay). A relay removed from the list is refused at once, even if its command was waiting.
  • Gate: never a switch, only buttons, and only the ones the wiring of the gateBox allows. Opening (and the walk-in output) is refused until "Allow opening the gate" is on.
    • Recent gateBox (API 20210118 or later): opening and closing use its /s/o and /s/c commands, the module decides on its limit switches (and refuses when it cannot tell). Closing is always allowed. These commands depend on the limit switches: check in the wBox app that the open/closed state the gateBox shows is right before relying on them.
    • Opening and closing on separate outputs: closing is always allowed.
    • Step-by-step mode on an older gateBox: closing and opening are the same pulse (open, stop, close, stop). So closing also needs "Allow opening the gate", and the pulse is only sent when the gate is seen fully open to close it, or fully closed to open it.
    • Stopping (second output set as "stop") is always allowed.
    • One pulse at a time: after a pulse, the next one is refused until the gate is seen elsewhere than where it was (or a few seconds later); use "Stop the gate". Recent gateBox modules do not tell whether the gate moves, only whether it is at a limit switch.
    • Closing and stopping cancel, as soon as they arrive, an opening (or a walk-in output) that has not left yet; cancelling never sends anything. The walk-in output follows the same one-pulse-at-a-time rule.
  • Heating (thermoBox): switching off is always sent, without a state read (it only depends on the identity of the module). Switching on and the setpoint are refused until "Allow the heating commands" is on, and the setpoint never exceeds the ceiling (25 °C by default, 30 °C at most) nor the range of the thermoBox. Gladys only switches the thermoBox on in the mode (heating or cooling) set in its own settings.
  • Before every command, Gladys checks that the same module still answers at this address. Each sensitive command reads the state of the module just before acting; the permission is checked again right before sending. A command that cannot leave within 3.5 seconds is refused unsent; a command sent without an answer is reported "sent, without confirmation".

Failures​

  • Credentials refused: the module is no longer asked nor commanded, then again after 15 min, 1 h, 6 h and every 24 h; saving other credentials or "Find the BleBox devices" tries again at once.
  • A module asking to wait (HTTP 429 or 5xx) is paused for one minute to six hours, even across a restart: no reads, no opening, no switching on. Closing, stopping and switching off stay possible (one try).
  • A module that does not answer is read again after 30 s, 1, 2 then 5 min, never faster than the refresh interval; if its address changed, an mDNS search finds it again (every 5 minutes at most).

Limits​

  • No energy index (kWh counters) in this version, nor the PM1 of the airSensor, the slat tilt, the white temperature or the effects of the wLightBox.
  • No saunaBox, tvLiftBox nor gateController.

Parámetros de configuración​

Estos son los parámetros que BleBox te pide en su pantalla de configuración en Gladys.

ParámetroTipoObligatorioDescripción
Your BleBox modules, on your local networksectionNowLightBox, wLightBoxS and dimmerBox (lights), switchBox and switchBoxD (relays), shutterBox (shutters), gateBox (gate), thermoBox (heating), tempSensor, airSensor and multiSensor, through the local HTTP API of the modules, without the BleBox cloud. Give each module a fixed IP address in your router, type the addresses below or use "Find the BleBox devices", then add them from the Discovery tab. Never tested with a real device. Unofficial integration, not affiliated with BleBox.
IP addresses of the modulesstringNoSeparated by commas, for example 192.168.1.40, 192.168.1.41 (add :port if it is not 80). Modules found by the search are kept without being typed here.
User name (optional)stringNoOnly if the local API of your modules is protected by a password in the wBox app. The same for every module.
Password (optional)secretNoKept by Gladys in its database, never shown again, sent only to your BleBox modules: the typed addresses and the modules already added (in clear on your local network: they have no https). A module only found by the search gets no credentials.
Refresh interval (s)numberNoHow often each module is read, in seconds.
Relays (switchBox)sectionNoA relay may feed anything (a pump, a heater, a gate motor), and a "turn everything off" of a voice assistant or a scene reaches every switch. So a relay is only shown in Gladys, read only, until you declare it safe below: it then becomes a switch you can control.
Relays declared safestringNoThe device ids (shown in the Discovery tab, parameter DEVICE_ID), separated by commas: every relay of the module, or id:number for one relay (0 for the first one). Only for loads that may be switched at any time (a lamp, a fan).
Gate (gateBox)sectionNoThe gate is shown with buttons (open, close, stop), never as a switch. Opening (and the walk-in output) is refused until you allow it below. Stopping, and closing on a gateBox that has its own close command (recent firmware, or open/close wiring), are always allowed. In step-by-step mode on an older gateBox, closing sends the same pulse as opening: it needs this permission too, and is only sent when the gate is seen fully open (fully closed to open). One pulse at a time: another one waits until the gate is seen moving.
Allow opening the gatebooleanNoOff by default. On: the dashboard, the scenes and the voice assistants can open the gate (and close a step-by-step one, the same pulse).
Heating (thermoBox)sectionNoBy default Gladys only reads the thermoBox, and can switch it off (even while the module asks to wait; only refused credentials stop it). Once allowed, it can also switch it on and change its setpoint, never above the ceiling below nor outside the range of the thermoBox.
Allow the heating commandsbooleanNoOff by default. Off: switching on and setpoints are refused (switching off stays allowed).
Setpoint ceiling (°C)numberNoGladys never sets a thermoBox above this temperature. 25 °C by default, from 10 to 30 °C (never more than 30 °C, whatever is typed).
Language of the feature namesselectNoUsed for the names of the features added from now on, and for the command errors.

Cómo instalar BleBox en Gladys​

  1. En Gladys, abre Integraciones: BleBox aparece en el catálogo junto a las integraciones nativas, con una insignia de comunidad.
  2. Haz clic en Instalar. Gladys descarga la imagen Docker (ghcr.io/lm1lc3n7/gladys-blebox:0.1.1), la ejecuta en un entorno aislado del núcleo y genera la interfaz de la integración (dispositivos, descubrimiento y configuración).
  3. Abre la pantalla de Configuración de la integración, rellena los parámetros y guarda.
  4. También puedes instalarla directamente desde la URL de su repositorio: https://github.com/LM1LC3N7/gladys-blebox.

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

BleBox 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.

Suscríbete a la newsletter de Gladys Assistant

Unos pocos correos al mes sobre nuevas versiones y novedades del proyecto. Enviados por Pierre-Gilles Leymarie, fundador del proyecto. Puedes darte de baja cuando quieras 🙂