This project provides a lightweight, reliable bridge between your solar inverter, energy meter, and a go-eCharger. It is designed to run on an ESP8266 (or ESP32) to ensure maximum uptime for PV excess charging, independent of a central Home Automation server.
Many smart homes use complex systems like Home Assistant to manage EV charging. However, if the server updates, crashes, or the network is busy, PV charging might fail.
This project follows a "Keep It Simple" philosophy:
- Runs on a dedicated microcontroller (ESP8266/ESP32).
- Lower complexity than a full OS.
- Higher reliability for critical power management.
- MQTT Integration: Subscribes to multiple topics (e.g., Inverter data and Tasmota-based Smart Meter).
- JSON Parsing: Deep-parsing of nested JSON strings to extract real-time power values.
- go-eCharger Support: Aggregates data and publishes it in the format required by the go-eCharger for PV excess charging.
- Web Interface: On-the-fly configuration of MQTT brokers and topics via a built-in webserver.
- Persistent Storage: Settings are saved to the internal FileSystem (LittleFS).
- ESP8266 (e.g., NodeMCU or Wemos D1 Mini).
- Optional: ESP32 (requires replacing
#include <ESP8266WiFi.h>with#include <WiFi.h>). - A running MQTT Broker (e.g., Mosquitto).
- Tasmota Smart Meter Interface (to provide grid data via MQTT).
- Clone the repository.
- Update
config.h: Enter your WiFi credentials. - Flash the ESP: Use Arduino IDE or VS Code/PlatformIO.
- Web Configuration:
- Once running, access the ESP via its IP address in your browser.
- Enter your MQTT broker details.
- Define the JSON paths for your data (e.g.,
StatusSNS.lk13be.Power). - Save and Restart.
- Inverter/Meter → publishes JSON to → MQTT Broker.
- ESP8266 → parses JSON → calculates totals.
- ESP8266 → publishes combined data → go-eCharger Topic.
- go-eCharger → adjusts charging current based on PV excess.
While this project aims for high reliability, users should be aware of the following points:
This implementation relies on a WiFi connection. In environments with high interference or weak signal, the connection to the MQTT broker may drop.
- Impact: If the connection is lost, the go-eCharger will not receive updated power data, which might lead to incorrect charging behavior.
- Recommendation: For maximum stability, consider using hardware with an Ethernet port (e.g., an ESP32 with LAN shield) or ensure a very robust WiFi coverage.
This is a exmperimental implementation and is open for further improvement
- No Authentication: The built-in configuration webserver is currently not password protected. Anyone in your local network can view and modify your settings.
- Plaintext Storage: All credentials (WiFi password, MQTT password) are stored in plaintext within a JSON file on the internal flash memory (LittleFS).
- Risk: If someone gains physical access to the ESP or the filesystem, they can easily read your passwords.
- Recommendation: Use a dedicated, isolated "IoT-VLAN" for your smart home devices and only use a specific MQTT user with restricted permissions for this device.
The current logic assumes that the latest MQTT data is always valid.
- Future Improvement: Implementation of a "Watchdog" or "Heartbeat" mechanism that stops charging if no fresh data has been received for a certain period.
This project is open-source. Feel free to modify and adapt it to your specific inverter or meter setup.