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

Track your SiL Lausanne smart electricity meter: grid consumption, solar feed-in and cost.
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â
- 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. - 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.
- Leave
Meter device idandLogical register numbersempty: 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. - Click Test the SiL connection: it shows the newest day available.
- In Discovery, add the Compteur SiL Lausanne device.
- 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:
- Open Energy Monitoring â Contracts â Create.
- Meter: select the Compteur SiL Lausanne device.
- 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:
| Feature | Category / type | Role |
|---|---|---|
| Grid consumption (30 min) | energy-sensor / thirty-minutes-consumption | HP + HC import, priced |
| Grid feed-in (index) | grid-sensor / output-index | cumulative 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.
| Einstellung | Typ | Pflichtfeld | Beschreibung |
|---|---|---|---|
| SiL Lausanne account | section | Nein | This 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 email | string | Nein | The email you use to log in to your lausanne.ch account. |
| Account password | secret | Nein | Your lausanne.ch password. It is only sent to www.lausanne.ch to log in, and never logged. |
| Contract reference (optional) | string | Nein | If 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) | secret | Nein | Only 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) | string | Nein | Leave 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) | string | Nein | Leave 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) | string | Nein | Earliest day to import on the first backfill. Leave empty to start ~13 months back (the portal keeps limited history). |
| Refresh interval (s) | number | Nein | How 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â
- Ăffne in Gladys Integrationen: SiL Lausanne erscheint im Katalog neben den nativen Integrationen, mit einem Community-Badge.
- 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). - Ăffne den Bildschirm Konfiguration der Integration, fĂŒlle die Einstellungen aus und speichere.
- 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.
- Alle Integrationen durchsuchen, native und aus der Community
- Deine eigene externe Integration bauen und veröffentlichen
- Quellcode auf GitHub â Quelle dieser Dokumentation