Zum Hauptinhalt springen

SiL Lausanne Smart-Home-Integration, kostenlos und Open Source

SiL Lausanne-Integration fĂŒr Gladys Assistant

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

Info

Die Dokumentation dieser Integration wird von ihrem Autor geschrieben und ist bisher nur auf Englisch verfĂŒgbar.

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.

Konfigurationseinstellungen​

Diese Einstellungen fragt SiL Lausanne in seinem Konfigurationsbildschirm in Gladys ab.

EinstellungTypPflichtfeldBeschreibung
SiL Lausanne accountsectionNeinThis 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 emailstringNeinThe email you use to log in to your lausanne.ch account.
Account passwordsecretNeinYour lausanne.ch password. It is only sent to www.lausanne.ch to log in, and never logged.
Contract reference (optional)stringNeinIf 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)secretNeinOnly 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)stringNeinLeave 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)stringNeinLeave 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)stringNeinEarliest day to import on the first backfill. Leave empty to start ~13 months back (the portal keeps limited history).
Refresh interval (s)numberNeinHow often the portal is polled, in seconds. Data is daily, so one hour is plenty (one minute minimum).

So installierst du SiL Lausanne in Gladys​

  1. Öffne in Gladys Integrationen: SiL Lausanne erscheint im Katalog neben den nativen Integrationen, mit einem Community-Badge.
  2. Klicke auf Installieren. Gladys lÀdt das Docker-Image (ghcr.io/sylvainpelissier/gladys-sil:0.0.1) herunter, startet es in einer vom Kern isolierten Sandbox und erzeugt die OberflÀche der Integration (GerÀte, Erkennung und Konfiguration).
  3. Öffne den Bildschirm Konfiguration der Integration, fĂŒlle die Einstellungen aus und speichere.
  4. Du kannst sie auch direkt ĂŒber die URL ihres Repositorys installieren: https://github.com/sylvainpelissier/gladys-sil.

SiL Lausanne benötigt Gladys >=5.2.0. Der Katalog in Gladys wird stĂŒndlich aktualisiert, eine neue Version ist also spĂ€testens eine Stunde nach ihrer Veröffentlichung verfĂŒgbar.

Du nutzt Gladys noch nicht? Es ist kostenlos und Open Source: folge der Installationsanleitung, um loszulegen.

Über externe Integrationen​

SiL Lausanne ist eine externe Integration: eine Community-Integration, die als Docker-Container verpackt und auf GitHub veröffentlicht wird. Gladys installiert sie mit einem Klick und fĂŒhrt sie in einer vom Kern isolierten Sandbox aus. Sie wird von sylvainpelissier veröffentlicht und gepflegt, nicht vom Gladys-Kernteam.

Abonniere den Newsletter von Gladys Assistant

Ein paar E-Mails im Monat zu neuen Releases und Neuigkeiten aus dem Projekt. Verschickt von Pierre-Gilles Leymarie, dem GrĂŒnder des Projekts. Jederzeit abbestellbar 🙂