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 the problem: when your car is plugged into the wallbox, it draws everything. Your Zendure batteries drain at full speed, cycles accumulate, and the lifespan of your precious cells melts away.
If your car is a company vehicle and the electricity is paid for by your employer, it is a shame to drain your batteries to recharge it, only to 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 discharging while charging, so you can fully benefit from the electricity produced by your solar panels in bright sunshine, without drawing from your Zendure batteries.
Zendure EV Guard solves this problem automatically. As soon as your car's charging is detected, the program pauses your batteries. When charging is complete, it reactivates them. Simple, automatic, risk-free.
How does it work?
1. Detection
Your Shelly Pro 3EM (or Smappee) measures consumption. When 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, and 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 modifies only a single parameter: minSoc (minimum charge level). To pause, it sets minSoc to 100%, which prevents any discharge. To resume, it restores your usual value (for example, 10%).
No modified firmware, no cloud access, no risk. It is exactly the same as if you changed the setting manually in the Zendure app, but automatically and at the right time.
Prerequisites
| Equipment | Details |
|---|---|
| Zendure SolarFlow 2400 AC | Hub with active local HTTP API (port 80) |
| Shelly Pro 3EM or Smappee1 required | Current clamp (Shelly, real time) or Smappee energy monitor (cloud API, 5-minute intervals) to measure consumption |
| Wallbox / Charging station | Any charging station: detection is based on consumption, not on the charging station itself |
| PC, Server or NAS | Windows, Linux or macOS, the program runs in the background 24/7 |
Installation
1. Extract the archive
Extract the contents of the ZIP file into the directory of your choice, for example:
- Windows :
C:\ZendureEvGuard\ - Linux :
/home/ZendureEvGuard/ - macOS :
/Applications/ZendureEvGuard/
2. Execution permissions (Linux / macOS only)
On Linux and macOS, you must make the file executable before launching it:
chmod +x ZendureEvGuard
./ZendureEvGuard3. Configure appsettings.json
Open the appsettings.json file located next to the executable and fill in your settings (see the section below).
4. Launch the program
# Windows
ZendureEvGuard.exe
# Linux / macOS
./ZendureEvGuardThe program displays the connection information at startup. Use P to pause manually, 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:
# Voir le statut
sudo systemctl status zendure-evguard
# Voir les logs en temps reel
sudo journalctl -u zendure-evguard -f
# Redemarrer apres une mise a jour
sudo systemctl restart zendure-evguard
# Arreter le service
sudo systemctl stop zendure-evguardConfiguration: appsettings.json
Here are all the settings you can configure. The Shelly and ZendureDevice sections are required.
⚡ Shelly required
Configuration of your Shelly Pro 3EM. This is the sensor that measures your home's electricity consumption.
| Parameter | Description | Example |
|---|---|---|
Enabled | Enable Shelly as the 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 authentication is enabled) | "admin" |
Password | Password (if authentication is enabled) | "monmotdepasse" |
🔌 Smappee charging station optional
The Smappee energy station can be used in two ways:
- As an EV detection source (alternative to Shelly): if Shelly is disabled, Smappee becomes the power measurement source for detecting EV charging. Detection is performed via the Smappee cloud API (5-minute blocks, less responsive than Shelly in real time).
- In parallel with Shelly: if Shelly is active as the detection source, Smappee can still be enabled to continuously display consumption information (solar, home, grid) and information about your Smappee EV Wall charging station (charging power, status, etc.) in the logs.
| Parameter | Description | Example |
|---|---|---|
Enabled | Enable Smappee (detection source if Shelly is disabled, or display consumption/EV charger information in parallel) | false |
ClientId | Client ID of your Smappee application (API v3) | "votre-client-id" |
ClientSecret | Client Secret of your Smappee application | "votre-client-secret" |
Username | Username of your Smappee account | "user@email.com" |
Password | Password for your Smappee account | "motdepasse" |
ServiceLocationId | ID of your Smappee location (visible in the Smappee dashboard; this is not the serial number) | "190802" |
PollingIntervalSeconds | Smappee API polling frequency | 30 |
🔋 Zendure Battery required
Configuration of your Zendure SolarFlow 2400 AC hub or others. The IP address can be found in the Zendure app.
| Parameter | Description | Example |
|---|---|---|
Host | IP address of your Zendure hub on the local network | "192.168.1.127" |
Port | Local API HTTP port (80 by default) | 80 |
DefaultOutputLimit | Maximum output power in watts to restore after EV charging | 2400 |
DefaultMinSoc | Discharge floor to restore after charging: the level below which your batteries will no longer discharge (the value is ×10: 100 = 10%, 200 = 20%). This is not the maximum charge level. | 100 |
TimeoutSeconds | Timeout for requests to the hub | 10 |
💡 Understanding DefaultMinSoc
This parameter defines the discharge floor of your batteries: the level below which the hub will no longer allow them to discharge. The value is multiplied by 10 in the Zendure API:
100= the batteries can drop as low as 10%200= the batteries can drop as low as 20%500= the batteries stop at 50%, and half of your capacity is no longer usable
Do not confuse this with the charge ceiling. The level at which your batteries stop charging is socSet, another setting, the one you see in the Zendure app. Setting 950 here therefore does not mean "charge up to 95%" but "never go below 95%": your batteries become unusable. Since version 1.3.0, the program refuses to start with a value outside the range of 1 to 999 and warns you above 500.
The choice is yours! The lower the value, the more you use your batteries; the higher it is, the more you preserve the cells, at the cost of available capacity. Most users choose between 100 (10%) and 200 (20%).
🚗 EvDetection
Settings for detecting your electric vehicle's charging. The algorithm uses hysteresis: several consecutive readings above the threshold are required to confirm charging, and several readings below it to confirm that charging has stopped.
| 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 required to confirm the start of charging | 2 |
ReleaseReadings | Number of consecutive readings below the threshold required to confirm the end of charging (24 = ~2 minutes at 5s/reading) | 24 |
PollingIntervalSeconds | Measurement frequency in seconds | 5 |
PauseOnSourceUnreachableMinutes | New in 1.3.0. Duration for which the meter can remain unreachable before the batteries are paused as a precaution: while blind, the program can no longer see your car plug in. The pause is lifted as soon as the first valid measurement is received. Set to 0 to disable this safeguard. | 3 |
📬 Notification optional
Receive emails when your batteries pause, resume, or in case of an 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 recipients | "" |
RateLimitMinutes | Minimum interval between two alerts (anti-spam) | 15 |
📴 Pushover optional
Push notifications on your phone via Pushover. Create an application on pushover.net to obtain your API Token.
| Parameter | Description |
|---|---|
Enabled | Enable Pushover (true / false) |
ApiToken | API Token of your Pushover application |
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) |
Bots | List of bots. Each one has its Name, its BotToken, and its list of ChatIds. This makes it possible to notify different people in different groups |
RateLimitMinutes | Minimum interval between alerts (default: 15) |
Since 1.2.0, you can notify several groups at once: two people via a first bot, and three others via a second. Each sending operation is isolated; an unreachable recipient no longer prevents the others from receiving the message.
"Telegram": {
"Enabled": true,
"RateLimitMinutes": 15,
"Bots": [
{
"Name": "Famille",
"BotToken": "123456:AAExxxxxxxxxxxxxxxxxxxx",
"ChatIds": [ "11111111", "22222222" ]
},
{
"Name": "Voisins",
"BotToken": "789012:BBEyyyyyyyyyyyyyyyyyyyy",
"ChatIds": [ "33333333", "44444444", "55555555" ]
}
]
}The old format, with a single BotToken and ChatId values separated by semicolons, continues to work. If you do not change anything in your configuration, your notifications will continue exactly as before.
📈 Monitoring optional
| Parameter | Description | Default |
|---|---|---|
HealthCheckIntervalSeconds | Frequency for checking device connectivity | 30 |
LogStatusIntervalSeconds | Frequency for logging the complete status in the log files | 300 |
🔄 Update optional
Since 1.2.0, the program no longer updates itself. It checks once an hour whether a newer version is available and simply notifies you: a reminder in the logs every hour until you have installed the new version, and a single message on the channels you have configured, with the direct download link.
Replacing the binary of a service that protects your batteries while it is running is the riskiest operation in the product. It is better for you to decide when to do it. The old keys AutoUpdateEnabled and CheckIntervalHours are no longer read: you can leave them in your file; they are ignored.
| Parameter | Description | Default |
|---|---|---|
CheckEnabled | Check every hour whether a newer version exists | true |
NotifyOnNewVersion | Send a message to your notification channels upon the first detection of a version. Only once per version, never repeated | true |
🔑 License after the trial
After the 30-day trial period, add your secret key to activate the PRO license. Your key can be found in your account at top right > "My Account". The license renews automatically in the background.
| Parameter | Description | Example |
|---|---|---|
SecretKey | Your unique secret key (GUID) from your digital3d.com account. Leave empty to use trial mode. | d79d24cc-eb02-48d7-94f8-xxxxxxxxxxxx |
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
},
"Subscription": {
"SecretKey": "d79d24cc-eb02-48d7-94f8-xxxxxxxxxxxx"
}
}With this configuration, the program monitors your Shelly, detects any consumption above 5000W (for example), and restores your batteries with a minimum of 10% (100 ÷ 10) and a maximum output of 2400W. The Subscription section is empty by default: the program operates in trial mode for 30 days. To activate the PRO license, add your secret key from your account in the top right.
Free Trial & Subscription
🎉 30-day free trial, no commitment!
Download Zendure EV Guard and try it for 30 full days, without paying anything and with no feature limitations. You will have access to 100% of the features to make sure that the program perfectly suits your setup.
At the end of the 30 days, a Digital3D subscription is required to continue using the program. A single subscription gives you access to all Digital3D applications (CompactForIA, AutoMouseMove, Zendure EV Guard, etc.).
🔑 How to activate your license
- Subscribe to a plan on "One for All"
- Log in to your account at digital3d.com and copy your secret key (a unique identifier in GUID format, for example:
f89f26cc-eb03-48d7-94f8-xxxxxxxxxxxx) - Open the
appsettings.jsonfile and add your key in theSubscriptionsection:"Subscription": { "SecretKey": "votre-clef-secrete-guid" } - Restart the program: the PRO license is activated automatically and renews without any action on your part.
Ready to protect your batteries?
Download for free, configure it in 5 minutes, and sleep soundly.
“ One for All ” subscription: a single subscription for all Digital3D applications.
Join the conversation
You need an account to comment on this article. Creating one is free and takes under a minute.
No comments yet.