Saltar al contenido principal

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

Integración SiL Lausanne para Gladys Assistant

Track your SiL Lausanne smart electricity meter: grid consumption, solar feed-in and cost.

info

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

Track your Services Industriels de Lausanne (SiL) smart electricity meter in Gladys: grid consumption every 30 minutes, priced by Gladys with your energy contract, and the solar feed-in (refoulement).

Data comes from the SiL "Ma consommation" portal, which publishes the meter readings with a delay of one day or more (sometimes weeks): this is not real-time metering. Self-consumed solar energy is not measured by the meter, so only grid import and grid export are known.

Requirements​

  • A SiL Lausanne account with a smart meter ("Ma consommation" section).
  • Gladys >= 5.2.0 (energy contracts).

Configuration​

  1. Account. Enter the email and password of your lausanne.ch account. The integration logs in by itself, and logs in again when the portal session expires. The password is only sent to www.lausanne.ch, never logged, and kept in the Gladys configuration only.
  2. Contract. If your account holds several SiL contracts (for example after a move), enter the contract reference of the current one (shown in the contract selector at the top of the portal): the portal only returns the readings of the activated contract. Otherwise leave it empty.
  3. Leave Meter device id and Logical register numbers empty: they are read from the portal after logging in (fill them in only to override them). Once the device is created, never change the meter id: it names the device.
  4. Click Test the SiL connection: it shows the newest day available.
  5. In Discovery, add the Compteur SiL Lausanne device.
  6. Click Import the full history (backfill) to load the available past. A long history goes on in the background after the button answers.

Cost: your energy contract​

The integration computes no cost. Create your contract in Gladys and attach it to this meter:

  1. Open Energy Monitoring → Contracts → Create.
  2. Meter: select the Compteur SiL Lausanne device.
  3. Template / parameters: pick or describe your SiL tariff, with its peak (HP) and off-peak (HC) hours and prices.

Gladys then prices every 30-minute slot of Grid consumption (30 min) with the contract, HP and HC hours included, and shows it in the energy widgets. A reading published late by SiL is priced when it arrives.

Device and features​

One Compteur SiL Lausanne device with:

FeatureCategory / typeRole
Grid consumption (30 min)energy-sensor / thirty-minutes-consumptionHP + HC import, priced
Grid feed-in (index)grid-sensor / output-indexcumulative refoulement (daily)

The newest day published by SiL is often incomplete: the integration re-publishes it at the next sync until it is complete.

Updating from an earlier version​

Earlier versions published cumulative indexes and their own cost. Those features are no longer fed: in Discovery, update the device to get the new Grid consumption (30 min) feature (and delete the old features if you wish), then click Import the full history again.

Login problems​

  • "Login failed, check the email and password": the portal refused the credentials. The integration stops trying until you change them (so the hourly sync cannot lock your account); Test the SiL connection retries on demand.
  • "Unexpected login step": the portal probably asks you to accept new terms of use. Log in once in a browser, accept them, then test again.

Already-imported history is kept; the sync resumes where it stopped.

Without storing your password​

You can leave the email and password empty and paste a session cookie instead: log in to the portal, open a period in "Ma consommation", open the developer tools (F12) → Network → a diamond-smart-data request → right-click → Copy → the Cookie: request header. This cookie expires after a few days and must then be pasted again. It is ignored when an email and password are set.

Parámetros de configuración​

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

ParámetroTipoObligatorioDescripción
SiL Lausanne accountsectionNoThis integration reads the 15-minute readings of your SiL smart meter from the "Ma consommation" portal (published with a delay of one day or more). Enter the email and password of your lausanne.ch account: the integration logs in by itself, and again when the session expires. The cost is computed by Gladys from the energy contract you attach to this meter (Energy Monitoring).
Account emailstringNoThe email you use to log in to your lausanne.ch account.
Account passwordsecretNoYour lausanne.ch password. It is only sent to www.lausanne.ch to log in, and never logged.
Contract reference (optional)stringNoIf your account holds several SiL contracts (e.g. after a move), the reference of the current one, shown in the contract selector at the top of the portal. The portal only returns the readings of the activated contract. Leave empty to use your default contract.
Session cookie (optional)secretNoOnly if you do not want to store your password: the full Cookie header of an authenticated session (DevTools -> Network -> a diamond-smart-data request -> Copy -> request headers). It expires after a few days. Ignored when an email and password are set.
Meter device id (optional)stringNoLeave empty: it is read from the portal after logging in. It names the device in Gladys: once the device is created, never change it (a new value creates a new, empty device).
Logical register numbers (optional)stringNoLeave empty: the meter's registers are read from the portal after logging in. Fill in only to override them (comma-separated list).
History start date (YYYY-MM-DD)stringNoEarliest day to import on the first backfill. Leave empty to start ~13 months back (the portal keeps limited history).
Refresh interval (s)numberNoHow often the portal is polled, in seconds. Data is daily, so one hour is plenty (one minute minimum).

Cómo instalar SiL Lausanne en Gladys​

  1. En Gladys, abre Integraciones: SiL Lausanne 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/sylvainpelissier/gladys-sil:0.0.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/sylvainpelissier/gladys-sil.

SiL Lausanne requiere Gladys >=5.2.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​

SiL Lausanne 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 sylvainpelissier, 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 🙂