Zendure EV Guard
Protect your Zendure batteries while charging your electric car
Compatible with Zendure SolarFlow 2400 AC • Shelly Pro 3EM • Smappee • Windows, Linux, macOS
Do you have Zendure batteries and an electric car?
You know it: when your car is plugged into the wallbox, it draws everything. Your Zendure batteries drain quickly, cycles accumulate, and the lifespan of your precious cells melts away like snow in the sun.
If your car is a company vehicle and the electricity is paid for by your employer, it's a shame to drain your batteries to recharge it when you will have nothing left in the evening for your home's self-consumption.
Another scenario: even if it is not a company car, you may simply want to prevent your batteries from draining during charging, so you can fully enjoy the electricity produced by your solar panels in full sun, without drawing from your Zendure batteries.
Zendure EV Guard automatically solves this problem. As soon as your car's charging is detected, the program pauses your batteries. When the charging is complete, it reactivates them. Simple, automatic, risk-free.
How does it work?
1. Detection
Your Shelly Pro 3EM (or Smappee) measures the consumption. When the power exceeds the threshold (e.g., 5000W), the program knows that your car is charging.
2. Protection
The Zendure batteries instantly switch to OFF mode. They no longer discharge, your cycles are preserved.
3. Resumption
Charging complete? The program automatically reactivates your batteries with your original settings. No manual intervention.
🔒 100% safe for your batteries
Zendure EV Guard uses exclusively the local HTTP API of your Zendure hub. It only modifies one parameter: the minSoc (minimum charge level). To pause, it sets the minSoc to 100% — which prevents any discharge. To resume, it restores your usual value (for example, 10%).
No firmware modified, no cloud access, no risk. It's exactly the same as if you changed the setting manually in the Zendure app, but automatically and at the right time.
Requirements
| Equipment | Details |
|---|---|
| Zendure SolarFlow 2400 AC | Hub with local HTTP API enabled (port 80) |
| Shelly Pro 3EM or Smappee1 required | Current clamp (Shelly, real-time) or Smappee energy monitor (cloud API, 5-minute blocks) to measure consumption |
| Wallbox / Charging station | Any charging station — detection is based on consumption, not on the station itself |
| PC, Server, or NAS | Windows, Linux, or macOS — the program runs in the background 24/7 |
Download — Version 1.0.8
Installation
1. Unzip the archive
Extract the contents of the ZIP file to your chosen directory, for example:
- Windows :
C:\ZendureEvGuard\ - Linux :
/home/ZendureEvGuard/ - macOS :
/Applications/ZendureEvGuard/
2. Execution rights (Linux / macOS only)
On Linux and macOS, you must make the file executable before running it:
chmod +x ZendureEvGuard
./ZendureEvGuard3. Configure appsettings.json
Open the appsettings.json file located next to the executable and fill in your parameters (see the section below).
4. Launch the program
# Windows
ZendureEvGuard.exe
# Linux / macOS
./ZendureEvGuardThe program displays connection information at startup. Use P to manually pause, R to resume, and Ctrl+C twice to stop cleanly.
a) Create a dedicated user (optional but recommended):
sudo useradd -r -s /usr/sbin/nologin zendure
sudo chown -R zendure:zendure /home/ZendureEvGuardb) Create the service file:
sudo nano /etc/systemd/system/zendure-evguard.servicePaste the following content:
[Unit]
Description=ZendureEvGuard - EV Charging Battery Protection Daemon
After=network.target
[Service]
Type=simple
WorkingDirectory=/home/ZendureEvGuard
ExecStart=/home/ZendureEvGuard/ZendureEvGuard
Restart=on-failure
RestartSec=10
SyslogIdentifier=zendure-evguard
User=zendure
Environment=DOTNET_ENVIRONMENT=Production
[Install]
WantedBy=multi-user.targetc) Enable and start the service:
sudo systemctl daemon-reload
sudo systemctl enable zendure-evguard
sudo systemctl start zendure-evguardd) Useful commands:
# View status
sudo systemctl status zendure-evguard
# View logs in real time
sudo journalctl -u zendure-evguard -f
# Restart after an update
sudo systemctl restart zendure-evguard
# Stop the service
sudo systemctl stop zendure-evguardConfiguration — appsettings.json
Here are all the parameters you can configure. The Shelly and ZendureDevice sections are mandatory.
⚡ Shelly required
Configuration of your Shelly Pro 3EM. This is the sensor that measures the electricity consumption of your home.
| Parameter | Description | Example |
|---|---|---|
Enabled | Enable Shelly as a measurement source | true |
Host | IP address of your Shelly Pro 3EM on your local network | "192.168.1.50" |
UseDigestAuth | Enable if you have protected your Shelly with a password | false |
Username | Username (if auth enabled) | "admin" |
Password | Password (if auth enabled) | "mypassword" |
🔌 Smappee Charging Station optional
The energy station Smappee can be used in two ways:
- As an EV detection source (alternative to Shelly) — if Shelly is disabled, Smappee becomes the power measurement source to detect EV charging. Detection is done via the Smappee cloud API (5-minute blocks, less reactive than Shelly in real-time).
- In parallel with Shelly — if Shelly is active as a detection source, Smappee can still be enabled to continuously display consumption information (solar, home, grid) and your Smappee EV Wall (charging power, status, etc.) in the logs.
| Parameter | Description | Example |
|---|---|---|
Enabled | Enable Smappee (detection source if Shelly is disabled, or display consumption/EV station info in parallel) | false |
ClientId | Client ID of your Smappee application (API v3) | "your-client-id" |
ClientSecret | Client Secret of your Smappee application | "your-client-secret" |
Username | Username of your Smappee account | "user@email.com" |
Password | Password of your Smappee account | "password" |
ServiceLocationId | ID of your Smappee location (visible in the Smappee dashboard, this is not the serial number) | "190802" |
PollingIntervalSeconds | Smappee API polling frequency | 30 |
EvThresholdWatts | Power threshold to consider that the EV station is charging (info display only) | 1400 |
🔋 ZendureDevice required
Configuration of your Zendure SolarFlow 2400 AC hub. The IP address is found in the Zendure app.
| Parameter | Description | Example |
|---|---|---|
Host | IP address of your Zendure hub on the local network | "192.168.1.127" |
Port | HTTP port of the local API (80 by default) | 80 |
DefaultOutputLimit | Maximum output power in watts to restore after EV charging | 2400 |
DefaultMinSoc | Minimum charge level to restore (the value is ×10: 100 = 10%, 950 = 95%). This is the threshold below which your batteries will no longer discharge. | 100 |
TimeoutSeconds | Timeout for requests to the hub | 10 |
💡 Understanding DefaultMinSoc
This parameter defines the minimum charge level of your batteries after recovery. The value is multiplied by 10 in the Zendure API:
100= batteries can go down to 10%200= batteries can go down to 20%950= batteries stop at 95% (very conservative mode)
It's up to you to choose! A low minSoc (100-200) maximizes the use of your batteries. A high minSoc (800-950) preserves the lifespan of the cells. Most users choose between 100 (10%) and 200 (20%).
🚗 EvDetection
Settings for detecting the charging of your electric vehicle. The algorithm uses a hysteresis: it requires several consecutive readings above the threshold to confirm charging, and several readings below to confirm stopping.
| Parameter | Description | Default |
|---|---|---|
PowerThresholdWatts | Power threshold (in watts) above which the program considers that a car is charging. Adjust it to your wallbox. | 5000 |
ConfirmationReadings | Number of consecutive readings above the threshold to confirm the start of charging | 2 |
ReleaseReadings | Number of consecutive readings below the threshold to confirm the end of charging (24 = ~2 minutes at 5s/reading) | 24 |
PollingIntervalSeconds | Measurement frequency in seconds | 5 |
📬 Notification optional
Receive emails when your batteries pause, resume, or in case of error. Configure your SMTP server.
| Parameter | Description | Default |
|---|---|---|
Enabled | Enable email notifications | false |
SmtpHost | SMTP server (e.g., smtp.gmail.com) | "" |
SmtpPort | SMTP port | 587 |
UseSsl | Use TLS/SSL | true |
Username / Password | SMTP credentials | "" |
FromAddress | Sender's email address | "" |
ToAddress | Recipient(s), separated by ; for multiple | "" |
RateLimitMinutes | Minimum interval between two alerts (anti-spam) | 15 |
📴 Pushover optional
Push notifications to your phone via Pushover. Create an application on pushover.net to obtain your API Token.
| Parameter | Description |
|---|---|
Enabled | Enable Pushover (true / false) |
ApiToken | Your Pushover application API Token |
UserKey | Your Pushover user key |
RateLimitMinutes | Minimum interval between alerts (default: 15) |
💬 Telegram optional
Notifications via a Telegram bot. Create a bot with @BotFather and retrieve your Chat ID.
| Parameter | Description |
|---|---|
Enabled | Enable Telegram (true / false) |
BotToken | Your Telegram bot token (provided by @BotFather) |
ChatId | ID of the chat to send messages (multiple separated by ;) |
RateLimitMinutes | Minimum interval between alerts (default: 15) |
📈 Monitoring optional
| Parameter | Description | Default |
|---|---|---|
HealthCheckIntervalSeconds | Frequency of checking device connectivity | 30 |
LogStatusIntervalSeconds | Frequency of logging the complete status in log files | 300 |
🔄 Update optional
| Parameter | Description | Default |
|---|---|---|
AutoUpdateEnabled | Enable automatic update checking | true |
CheckIntervalHours | Check interval (in hours) | 4 |
Minimal configuration example
Here is a ready-to-use example. Simply replace the IP addresses with those of your devices:
{
"Shelly": {
"Enabled": true,
"Host": "192.168.1.50"
},
"ZendureDevice": {
"Host": "192.168.1.127",
"Port": 80,
"DefaultOutputLimit": 2400,
"DefaultMinSoc": 100
},
"EvDetection": {
"PowerThresholdWatts": 5000
}
}With this configuration, the program monitors your Shelly, detects any consumption above 5000W, and restores your batteries with a minimum of 10% (100 ÷ 10) and a maximum output of 2400W.
Free trial & License
🎉 30 days free trial — no commitment!
Download Zendure EV Guard and test it for 30 full days, without paying anything and with no feature limits. You will have access to 100% of the functions to ensure that the program fits perfectly with your setup.
At the end of the 30 days, a PRO license at 99 €/year is required to continue using the program. A small investment to protect batteries that are worth much more!
Ready to protect your batteries?
Download for free, set up in 5 minutes, and sleep peacefully.
Aucun commentaire pour le moment.