Skip to the content
2 layers25.8 × 34.5 mmP1 Gateway, the printed circuit board in 3D

P1-WiFi-Gateway with support for cFos Power Brain Wallbox

Size
25.8 × 34.5 mm
Copper layers
2
Thickness
1.6 mm
Parts
11
Nets
21
Pads
42
Tracks, vias
97, 0
Routed
Yes
KiCad
KiCad 6 (file 20211014)
Created
5 Mar 2023
Updated
31 Aug 2026

Overview

P1 Gateway is an open-source printed circuit board by SchneHa, from the SchneHa/P1-WiFi-Gateway repository on GitHub. It is a 2-layer board of 25.8 × 34.5 mm with 11 parts on 21 nets, routed with 97 tracks and 0 vias.

It is built around the BC547. Its parts include 4 resistors, 1 capacitor, 1 IC, 1 diode and 1 transistor. It belongs with the radio and wireless boards of this library.

Main components

1

README

README.md

P1-WiFi-Gateway

P1-WiFi-Gateway mit Unterstützung der cFos Power Brain Wallbox

P1 wifi gateway 2022

(English Version below)

Basierend auf einem Repo von Ronald Leenes: https://github.com/romix123/P1-wifi-gateway

Diese Software vereint verschiedene Komponenten in einem handlichen Paket. Die Software läuft auf einem ESP8266 board wie dem Wemos D1 mini oder mini Pro und hat einen bescheidenen Platzbedarf.

Die Datenverarbeitung basiert auf: http://domoticx.com/p1-poort-smart-meter-data-to-domoticz-esp8266 Das Captive Portal basiert auf einem der ESP8266-Beispiele, die OTA-Einheit ebenfalls.

Das Modul liefert Daten über JSON- oder MQTT-Nachrichten an einen Host, kann aber auch über das Webinterface des Moduls oder per Telnet ausgelesen werden. Die Daten können an einen virtuellen Zähler "HTTP input" in der Power Brain Wallbox von cFos übertragen werden und dort für das Lastmanagement genutzt werden. Damit das funktioniert, muss der Charging Manager der Wallbox mindestens auf die Firmwareversion 1.17.4-beta gebracht werden.

Das Modul lädt beim Start zuerst den Pufferkondensator auf. Es blinkt dann 2x und versucht zunächst, sich mit Ihrem WLAN-Netzwerk zu verbinden. Während dieses Vorgangs blinkt die LED mit einer Periode von 0,5 Hz. Kommt keine Verbindung zustande, startet das Modul einen Access Point mit dem Namen P1_Setup. Verbinden Sie sich mit diesem Netzwerk und surfen Sie zu 192.168.4.1

Daraufhin erscheint der Menübildschirm des Moduls. Geben Sie dort die SSID und das Passwort Ihres WLAN-Netzwerks ein. Darunter tragen Sie die Daten des empfangenden Servers (IP und Portnummer) ein. Dies kann Ihr Domotociz-Server sein, in diesem Fall müssen Sie auch die IDx eingeben, die Domoticz für ein Gas- und ein Energiegerät erstellt. Auch die Daten für einen (z. B. auf einem Raspberry Pi selbst gehosteten) MQTT-Broker können jetzt eingegeben werden.

Wenn die Daten für das Lastmanagement einer cFos Power Brain Wallbox genutzt werden sollen, ist dies ebenfalls hier möglich.

In der jetzt veröffentlichten Version 1.2f ist es nun auch möglich, Gas-Verbrauchswerte über MQTT zu empfangen, die von einem Gassensor wie in meinem Repo https://github.com/SchneHa/Gas_Meter beschrieben gesendet werden. Es werden im Webinterface des P1-Gateways der Gas-Gesamtzähler und der aktuelle Tageszähler dargestellt. Dafür kann derselbe Broker wie für die anderen Werte angegeben werden, es kann aber auch ein anderer Broker sein.

Schließlich geben Sie an, wie viele Sekunden Daten an den Server gesendet werden sollen. DSMR4-Messgeräte verwenden ein Messintervall von 10 Sekunden. SMR5-Zähler liefern jede Sekunde Daten. Das erscheint viel und das Modul benötigt auch viel Strom, daher ist die Frage, ob es parasitär (powered by the meter) arbeiten kann. Empfohlen ist ein Intervall von 15 Sekunden oder höher. Das hier eingegebene Intervall wird nicht immer synchron zum Datenintervall des Zählers sein, gehen Sie also nicht davon aus, dass Sie in Domoticz, MQTT oder im Charging Manager der cFos Wallbox genau alle x Sekunden einen Messwert sehen.

Das Modul „schläft“ zwischen den Messungen (das Modem wird ausgeschaltet, so dass die Stromaufnahme von ca. 70 mA auf 15 mA sinkt). Dies gibt dem Pufferkondensator Zeit, sich für die vom WLAN-Sender des Moduls erzeugten Stromspitzen aufzuladen (und es spart dennoch etwas Strom (der von Ihrem Energieversorger bezahlt wird, aber trotzdem)). Jedes bisschen hilft.

Siehe http://esp8266thingies.nl für weitere Informationen über das Modul und http://www.esp8266thingies.nl/wp/forum-2/ für das Diskussionsforum. Anmerkung: Leider existiert diese Webseite nicht mehr.

Ergänzung vom 31.07.2023: Seit heute sind die PCB Dateien im KiCAD Format online. Das Board wurde schon produziert und getestet. Ebenso stehen die Gerber Dateien zur Verfügung.

grafik

IMG_3425

IMG_3427

IMG_3428

Ich habe noch einige PCBs aus der ersten Produktion übrig, bei Bedarf bitte melden.

text
PCB unbestückt: 5€
PCB mit Bauteilen: 10€
PCB fertig bestückt: 15€
D1 mini ESP8266 mit Headern: 10€
inklusive Versand innerhalb Deutschlands
hans(dot)schneider(at)gmx(dot)ch
text
Version: 1.2fa Datum: 31.August 2026
         Die Verbindung zum WLAN wird nun *wirklich* wiederhergestellt, wenn sie unterbrochen wurde
Version: 1.2f Datum: 29. Mai 2026
         Gasverbrauch (Gesamtzähler und Tageszähler), Import der Werte über MQTT implementiert
         Voraussetzung: Vorhandensein eines Gas-Sensors wie unter meinem Repo
         https://github.com/SchneHa/Gas_Meter beschrieben
Version: 1.2e Datum: 02.11.2025
         Checkt nun in jedem loop, ob eine Verbindung zum WiFi besteht. Wenn nicht, wird die
         Verbindung neu hergestellt.
Version: 1.2d Datum: 15.01.2025
         nach Ändern des voreingestellten Passworts für die cFos Power Brain wird das Passwort
         nun nicht mehr vergessen
Version: 1.2c Datum: 23.05.2024
         die Anzeige der Seite mit den Messwerten wird nun alle 20 Sekunden erneuert
         P1meter sendet nun positive Werte für actualElectricityPowerDelivered und negative Werte
         für actualElectricityPowerReturned zur cFos Power Brain Wallbox (das ist wichtig um
         korrekte Werte für die Einspeisung ins Stomnetz zu erhalten)
Version: 1.2b Datum: 22.05.2023
         Anpassungen für die Firmware 1.19.4 der cFos Power Brain Wallbox
         (power_va ist nun power_w, is_va existiert nicht mehr)
         Korrekturen der niederländischen, französischen und schwedischen Version
Version: 1.2a Datum: 13.03.2023
         Fertigstellung der französischen und schwedischen Version
         diverse Verbesserungen und Fehlerbehebungen

Empfohlenes Board:

Wemos D1 mini Pro, Flash Größe: 16 MB, FS: 14 MB, OTA: ~1019 kB

ebenso möglich:

Wemos D1 R2 & mini, Flash Größe: 4 MB, FS: 2 MB, OTA: ~1019 kB oder jedes andere kompatible board

text
Benötigte Dateien:
  P1WG2022current.ino
  CRC16.h 
  JSON.ino 
  MQTT.ino 
  TELNET.ino 
  debug.ino 
  decoder.ino 
  functions.ino 
  graph.ino
  logging.ino
  vars.h
  webserver.ino
  webserverDE.ino
  webserverFR.ino
  webserverNL.ino
  webserverSE.ino
  wifi.ino

Anmerkung: Zurzeit sind nur die deutsche und die niederländische Versionen lauffähig. Bei der französischen und der schwedischen Version muss ggf. die Übersetzung korrigiert werden.

English Version:

P1-WiFi-Gateway with support for cFos Power Brain Wallbox

P1 wifi gateway 2022

Based on a repo of Ronald Leenes: https://github.com/romix123/P1-wifi-gateway

This software combines various components in one handy package. The software runs on an ESP8266 board like the Wemos D1 mini or mini Pro and has a modest footprint.

The data processing is based on: http://domoticx.com/p1-poort-smart-meter-data-to-domoticz-esp8266 The captive portal is based on one of the ESP8266 samples, as is the OTA unit.

The module delivers data to a host via JSON or MQTT messages, but can also be read out via the module's web interface or via Telnet. It is possible to send data to a virtual meter "HTTP input" of the Power Brain Wallbox of cFos which can be used to implement load management. For that to work Charging Manager of cFos Power Brain Wallbox has to be at least on firmware version 1.17.4-beta.

When starting, the module first charges the buffer capacitor. It will then blink 2x and first try to connect to your WiFi network. During this process, the LED flashes with a period of 0.5 Hz. If no connection is established, the module starts an access point with the name P1_Setup. Connect to this network and surf to 192.168.4.1

The module menu screen appears. Enter the SSID and password of your WiFi network there. Below this, enter the data of the receiving server (IP and port number). This can be your Domotociz server, in this case you also have to enter the IDx that Domoticz creates for a gas and an energy device. The data for an MQTT broker (e.g. hosted on a Raspberry Pi itself) can now also be entered.

If the data is to be used for load management of a cFos Power Brain Wallbox, this is also possible here.

In the newly released version 1.2f, it is now also possible to receive gas consumption data via MQTT, sent by a gas sensor as described in my repository https://github.com/SchneHa/Gas_Meter. The total gas meter reading and the current daily meter reading are displayed in the P1 gateway's web interface. The same broker used for the other values ​​can be specified for this, or a different broker can be used.

Finally, specify how many seconds of data should be sent to the server. DSMR4 gauges use a measurement interval of 10 seconds. SMR5 counters provide data every second. That seems a lot to me and the module also draws a lot of current, so the question is whether it can operate parasitically (powered by the meter). I recommend an interval of 15 seconds or higher. The interval entered here will not always be in sync with the meter's data interval, so don't assume that you will see a reading in Domoticz, MQTT or in Charging Manager of the cFos Wallbox exactly every x seconds.

The module "sleeps" between the measurements (the modem is switched off so that the current consumption drops from approx. 70 mA to 15 mA). This gives the buffer capacitor time to charge up for the current spikes generated by the module's WiFi transmitter (and it still saves some electricity (which is paid for by your utility, but still)). Every little helps.

See http://esp8266thingies.nl for more information about the module and http://www.esp8266thingies.nl/wp/forum-2/ for the discussion forum. Note: Unfortunately, this website no longer exists.

Addition from 07/31/2023: Since today the PCB files in KiCAD format are online. The board has already been produced and tested. The Gerber files are also available.

grafik

IMG_3425

IMG_3427

IMG_3428

I still have some PCBs left from the first batch, please let me know if you need one.

text
PCB unassembled: 5€
PCB with parts: 10€
PCB assembled: 15€
D1 mini ESP8266 with headers: 10€
shipping to Germany included
hans(dot)schneider(at)gmx(dot)ch
text
Version: 1.2fa Date 31.8.1026
         Now the WiFi is *really* reconnected after connection lost
Version: 1.2f Date: 29.5.2026
         Gas consumption (Total counter and daily counter), import of the values via MQTT implemented
         Requirement: A Gas sensor as described in my repo https://github.com/SchneHa/Gas_Meter must
         be available
Version: 1.2e Date: 02.11.2025
         now checks connection to wifi in every loop, if not connected it will be reconnected
Version: 1.2d Date: 15.01.2025
         after changing cFos Power Brain password from it's default the new password isn't forgotten anymore now
Version: 1.2c Date: 23.05.2024
         measurement page refreshes every 20 seconds now
         P1meter now sends positive values for actualElectricityPowerDelivered and negative values for
         actualElectricityPowerReturned to cFos Power Brain wallbox (that is important to calculate correct
         values for feeding energy into the power grid)
Version: 1.2b Date: 22.05.2023
         changes for cFos Power Brain Firmware 1.19.4
         (power_va is now power_w, is_va doesn't exist anymore)
         improvements of dutch, french and swedish language
Version: 1.2a Date: 13.03.2023
         Finishing the french and swedish Version
         various Improvements and bug fixes
Version: 1.2 Date: 03/05/2023, Author: Hans Schneider
         added Support for the HTTP_input meter of cFos Power Brain Wallbox

Recommended board:

Wemos D1 mini Pro, Flash Größe: 16 MB, FS: 14 MB, OTA: ~1019 kB

also possible:

Wemos D1 R2 & mini, Flash Größe: 4 MB, FS: 2 MB, OTA: ~1019 kB or any other compatible board

Files needed:

text
  P1WG2022current.ino
  CRC16.h
  JSON.ino
  MQTT.ino
  TELNET.ino
  debug.ino
  decoder.ino
  functions.ino
  graph.ino
  logging.ino
  var.h
  webserver.ino
  webserverDE.ino
  webserverFR.ino
  webserverNL.ino
  webserverSE.ino
  wifi.ino

Note: Only the German and Dutch versions are currently working. The French and the Swedish version needs improvement of translation.

Parts

11
QtyValueFootprintReferences
31kResistor_THT:R_Axial_DIN0204_L3.6mm_D1.6mm_P7.62mm_HorizontalR1, R2, R4
12k2Resistor_THT:R_Axial_DIN0204_L3.6mm_D1.6mm_P7.62mm_HorizontalR3
13300uFCapacitor_THT:CP_Radial_D5.0mm_P2.50mmC1
15VTestPoint:TestPoint_Keystone_5000-5004_MiniatureTP1
16P6CConnector_RJ:RJ12_Amphenol_54601J1
1BC547Package_TO_SOT_THT:TO-92L_Inline_WideQ1
1D1 mini proModule:WEMOS_D1_mini_lightU1
1LEDLED_THT:LED_D3.0mmD1
1open: progTestPoint:TestPoint_2Pads_Pitch2.54mm_Drill0.8mmJP1

Similar boards

  • 2 layers83.3 × 65.3 mmSimonShield, the printed circuit board in 3D

    SimonShield

    github-linguist/linguist

    Language Savant. If your repository's language is being reported incorrectly, send us a pull request!

    46 parts14kMIT
  • 2 layers56 × 65 mmSeaTalk1, the printed circuit board in 3D

    SeaTalk1

    dotnet/iot

    This repo includes .NET Core implementations for various IoT boards, chips, displays and PCBs.

    24 parts2.4kMIT
  • 2 layers132.1 × 45.7 mmIPoS, the printed circuit board in 3D

    IPoS

    peterheinrich/InternetOverSpaghetti

    Transmitting IP packages over a pair of spaghetti thus demonstrating how media independent IP really is.

    42 parts342
  • 2 layers99.1 × 99.7 mmRC6502 General Video Adapter, the printed circuit board in 3D

    RC6502 General Video Adapter

    tebl/RC6502-Apple-1-Replica

    An expandable SBC-version of the Apple 1 computer, easy to get started with and lot of cool stuff that can be added to it!

    80 parts193GPL-3.0
  • 2 layers55.9 × 38.6 mmMega Amp, the printed circuit board in 3D

    Mega Amp

    theacodes/genesynth

    A Sega Genesis inspired synthesizer

    40 parts178Apache-2.0
  • 2 layers40 × 100 mmBack pcb, the printed circuit board in 3D

    Back pcb

    ZeroPhone/ZeroPhone-PCBs

    PCB files for ZeroPhone - for gerbers and schematics, go to "Releases" tab!

    118 parts148GPL-3.0
  • 2 layers100 × 100 mmCANBuster, the printed circuit board in 3D

    CANBuster

    GBert/misc

    miscellaneous stuff / unsorted

    182 parts99

Questions

How big is the P1 Gateway PCB?

It measures 25.8 × 34.5 mm and has 2 copper layers, 1.6 mm thick.

What parts does the P1 Gateway use?

11 parts, built around the BC547. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the P1 Gateway KiCad files?

From the SchneHa/P1-WiFi-Gateway repository on GitHub, at the commit this page was made from: the board is Hardware/KiCAD/P1_Gateway.kicad_pcb and its schematic Hardware/KiCAD/P1_Gateway.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the P1 Gateway design in my own project?

Its repository states no licence, so its author keeps all rights: ask SchneHa before reusing the design.