SeByDocKy / pvbrain2
AI Architecture Analysis
This repository is indexed by RepoMind. By analyzing SeByDocKy/pvbrain2 in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.
Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.
Repository Overview (README excerpt)
Crawler viewPVbrainV2 > [!IMPORTANT] > is an open source/openhardware project to monitor/control __ __ : > - Multiple inverters. > - And multiple BMS. > > -> _In theory any inverter or BMS with ESPhome support can be used with the PVbrain2._ > > It also adds the possibility of controlling up to 32 relays allowing for example to control an **A**utomatic **T**ransfer **S**witch (ATS) _(Offgrid return to the network)_. > > The PCB uses only crossover components or pluggable components in order to have easy setup/maintenance. > > The MCU used is an ESP32S3 running allowing communication over WiFi to (HA) natively. > -> _But can be added easily._ > > __The main features are :__ > - [x] Direct communication and control with Voltronic/Pipsolar, DEYE, SOFAR, GROWATT inverters via direct Ethernet cable. _(pvbrain has a built-in RS232 and RS485 => TTL)_ > - [x] CANbus support. Possibility to translate informations from old generation BMS into modern CANbus protocols (Pylontech 1.2, Pylontech +, SMA, Victron) > - [x] The VEdirect for models with an insulated adapter provided. > - [x] Important settings can be set directly from HA _(or the web server if enabled)_ . > - [x] Monitor multiple BMS _(tested with JKBMS but should work with antBMS, DalyBMS, PaceBMS or SeplosBMS)_ with an insulated adapter provided. > - [x] Detect multiple AC sources _(solar/network/other)_ via optocoupler modules (in order for example to do soft switching for the ATS part). > - [x] Monitor _via_ a JSY193, JSY194T module _(modbus)_ solar and network production. > - [x] Monitor _via_ a JSY231, Smartshunt module _(modbus)_ and _(VE.direct)_ battery energetic flows > - [x] Control up to 32x relays with two i2c extension SX1509, _that is_ for ATS control or the reversing mode of a modern inverter. _(Axpert max I & II for example)_ > - [x] A solar power diverter for pure resistive loads (eg. hot water tank) thanks to ROBOTDYN or SSR modules controlled in PWM, 0-10V. Can be easily extented for Modbus RTU model. > - [x] Smart EVSE regulation _for_ a ETEK ekepc2 module with AC active power, DC battery current or Pyranometer informations > - [x] Monitor your basement temperature/humidity/pressure with BME280 _(you can set up alarms just in case)_ . > - [x] Free I2C ports available for plugging in additional I2C sensors. > - [x] SPI port is also available. > [!NOTE] > This PCB uses the excellent ESPhome integrations done by : > - (Many BMS and inverter). > - (Expansion cards WK2132 and WK2168 ). > > The __PVbrain 2.0__ represents a joint work between of the and . > - With the help of several members of the . **For more information on the project, the pcb, the code and their use, please refer to the wiki.** Release PVbrain 2 Youtube Live event: _Video in French._ Software (ESPhome) installation steps: • __First of all be sure you have installed on your machine the ESP32 S3 driver from Sillicon Labs.__ __Classic procedure :__ > > Click here for show the Classic procedure. :arrow_heading_down: > > :back: > - :one: :heavy_minus_sign: Retrieve the PVbrain 2.0 zip (by right clicking) and save it into a new created folder, eg. /pvbrain2 > - :two: :heavy_minus_sign: Uncompress the zip file into your local folder (/pvbrain2) or into your/config/esphome folder of HASSIO (use samba share to transfer the uncompressed files). > - :three: :heavy_minus_sign: Open your esphome's secrets.yaml file and check if wifi_ssid, wifi_password and ap_password variables are correctly corresponding with your local WiFi informations. > - :four: :heavy_minus_sign: Edit the PVbrain2.yaml and comment/uncomment each package according to your own solar setup. > - :five: :heavy_minus_sign: Compile and upload the code on your ESP32 S3 device. > __Dummy procedure (for newbabies) :__ > > Click here for show the Dummy procedure. :arrow_heading_down: > > :back: > - :one: :heavy_minus_sign: Create/sign in a Github accompt. You can create it faster with OAuth2 via your google account for example. > - :two: :heavy_minus_sign: Open the following Gitpod link. > - The first time you will need also to sign in into gitpod framework for example with your previously created Github account. > - :three: :heavy_minus_sign: When logged into Gitpod, you will see during the ESPhome installation, some log lines printed in the terminal. > - Wait a couples of minutes to let finish the processus. > - When done, press the "Open Browser" located at the botton right of the Gitpod page. > - It should open a new webpage with the ESPhome Dashboard. > - :four: :heavy_minus_sign: On the ESPhome Dashboard, click first on "secret" button located at the top right corner. > - Replace "xxxxxxxx", "yyyyyyyy" and "zzzzzzzz" with your own WiFi SSID/password and AP informations (AP password will allow to access to your PVbrain2 if your WiFi/LAN is down). > - Be aware, WiFi password must be a minimum of 8 caractars. > - If not, you will need to change your WiFi password correspondly. > - Click on "save" and quit the secret page by clicking on the top left cross. > - :five: :heavy_minus_sign: Click on "Edit" for the PVbrain2 model. > - Comment and/or uncomment each package according to your own solar setup and save the file. (Tip: you can comment/uncomment several lines simultaneously by selecting the lines and press on CTRL + /) > - :six: :heavy_minus_sign: Plug your ESP32-S3 with a USB data cable first then the on top right corner, choose "Install" then on "Plug into this computer" to compile the firmware. It can be a long processus !!!. > - Wait a couple of minutes (it first compile the code at background during 3-4min) then it starts the flashing part. > - You should see a progression bar running when flashing. > - :seven: :heavy_minus_sign: You finished the flashing procedure. > - If you entered correctly your WiFi informations in the secrets.yaml file, you should see a notification in Home Assistant asking you to accept a new ESPhome device. > - Accept it... __You finished!!!!__ > > > Click here for show…