Zum Hauptinhalt springen

Pure Energie Smart-Home-Integration, kostenlos und Open Source

Pure Energie-Integration für Gladys Assistant

Unofficial: Pure Energie (NET2GRID) meter reader on your network: power and indexes.

Info

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

Unofficial integration, not affiliated with Pure Energie nor NET2GRID. It reads the energy meter reader of Pure Energie (a NET2GRID SmartBridge, such as the SBWF3102, plugged on the P1 port of your electricity meter) through its local HTTP API: no cloud, no account, no key, nothing sent to the device but read requests (GET), one read every 30 seconds at most.

Never tested with a real device: it was built from the Python library gridnet (the one the Pure Energie integration of Home Assistant uses). Feedback welcome.

What you get​

One device, named after the model and the end of the id of the meter reader (Pure Energie SBWF3102 3795):

FeatureKind
Powerenergy sensor, W
Consumption indexenergy index, kWh
Injection index (kWh)plain sensor
  • The power is signed: below 0 while your home injects (solar panels).
  • The consumption index feeds the Gladys energy monitoring: Gladys derives the consumption and its cost from it. It is published once a minute at most and checked first: a value of 0 is never sent; any drop, even of 1 Wh, or a jump larger than your home could have drawn (the "highest plausible power" of the configuration, 100 kW by default, over the time since the last value) is held back (the last accepted value is sent again) and shown in the integration status. If it is right (a new meter), click Accept the held index twice (see Buttons). Saving the configuration never accepts it.
  • The injection is never in the energy monitoring (it would be billed as consumption): a plain sensor, never sent at 0.
  • An index given in another unit than Wh or kWh, or without a unit, is not sent (the status says so): an index is never guessed.
  • Gas is not read.

Fresh values only​

The meter reader dates its values. A read whose date and values have not moved since the read before sends nothing: an old value is never sent as a new one, not after a restart of the integration nor after a restart of Gladys either (this mark is kept in /data for the 8 meter readers whose values changed most recently: at the 9th, the oldest mark is forgotten, and a reader that comes back frozen after a restart may then be published once; also when the clock of Gladys restarts behind it). When nothing has moved for 2 hours, the status says so. Without a date, a fingerprint of the values stands for it.

Identity​

The device is keyed by the id the meter reader gives on its /info page (84df:0c11:9999:3795, kept as its hex digits). Every read asks for the id before and after the values: if another id answers in between, or if the id cannot be read, nothing from that read is published. If another meter reader answers at the address, it gets its own device (create it in Discover); the old device keeps its history.

Setup​

  1. Find the IP address of the meter reader in your router, and preferably give it a fixed address there.
  2. In Gladys, open the integration, enter this address and save.
  3. In the Discover tab, create the device.

Buttons​

  • Test the connection: reads the meter reader once when a read is due (never more than one every 30 seconds), otherwise tells the last read: its id, the power, the consumption and injection indexes.
  • Accept the held index, in two clicks. The first click shows the index held back and takes nothing. The second click, a few seconds to 5 minutes later, takes what the first showed, only if the held value has not changed since (beyond what the meter may have measured meanwhile). A jump is counted at once as consumption; a drop bills nothing.

When something goes wrong​

  • Unreachable or wrong answer: new try after 30 seconds, then doubled up to 10 minutes.
  • The device asks to wait (429) or fails (5xx): reads paused from 1 minute to 6 hours, also after a restart.
  • The state file in /data cannot be read: it is left as it is (never written over) and the status says so; a held index or the date of the last values may then be forgotten.

Privacy​

Everything stays on your network. The integration only sends GET requests to the address you entered.

Konfigurationseinstellungen​

Diese Einstellungen fragt Pure Energie in seinem Konfigurationsbildschirm in Gladys ab.

EinstellungTypPflichtfeldBeschreibung
Pure Energie meter readersectionNeinUnofficial connector, not affiliated with Pure Energie nor NET2GRID. It reads the energy meter reader of Pure Energie (a NET2GRID SmartBridge, plugged on the P1 port of the electricity meter) through its local HTTP API, without any cloud nor key: the power every 30 seconds (signed: below 0 while you inject), the consumption index once a minute for the Gladys energy monitoring, and the injection index as a plain sensor. Read-only. Gas is not read. Never tested with a real device.
Meter reader addressstringJaThe IP address of the meter reader on your network (shown by your router), with a port only if it is not 80. Preferably give it a fixed address in your router; if it changes, enter the new one: the device keeps its history (it is keyed by the id of the meter reader).
Highest plausible power of the home (kW)numberNeinThe guard of the consumption index holds back a rise larger than this power over the time since the last value (100 kW by default).

So installierst du Pure Energie in Gladys​

  1. Öffne in Gladys Integrationen: Pure Energie erscheint im Katalog neben den nativen Integrationen, mit einem Community-Badge.
  2. Klicke auf Installieren. Gladys lädt das Docker-Image (ghcr.io/lm1lc3n7/gladys-pure-energie:0.1.2) 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/LM1LC3N7/gladys-pure-energie.

Pure Energie benötigt Gladys >=5.1.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​

Pure Energie 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 LM1LC3N7 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 🙂