The EcoFlow Delta-2 MAX has an Android application that can monitor and handle the generator.
It can show the battery charge and the instant load/discharge, enable/disable outputs, etc.
Hover one thing is missing : create and show a graph reporting the loading/discharge of the battery, to see for example how much the solar panel contribute to the charge and similar info.
The company seems not offering such thing, but people found a way to obtain such information, accessing the API.
Requirements
The unit is connected to internet and has some available API.
Steps
In order to have a graph is necessary to acquire the information from the unit.
To do so, one has to access via API the data collected and to do so ... one ned to be approved to become a developer on the EcoFlow domain.
It is assumed to have a valid account with EcoFlow.
- Step 1 - become a EcoFlow developer
To do so login at the EcoFlow developer site
After the login is necessary to ask to become a developer. This step can take few days to be complete, the request will be analyzed by EcoFlow who will decide to approve or not. - Step 2 - be sure to have on the local machine the basic tools and the GO language
- git
- MacOS - brew install go
- Step 3 - having an Access Key will be possible to access via API the devices registered in the account, in my case the EcoFlow Delta 2 MAX
- create a directory (example : mkdir ~/Projetcs/Ecoflow)
- copy the API test code in a file
- add two system variables :
- export ACCESS_KEY="<access_key>"
- export SECRET_KEY="<secret key>"
- Step 4 - set up the system :
- Initialize a module (use a module path; it can be anything you like)
go mod init example.com/ecoflow-test - Add the Ecoflow library as a dependency
go get github.com/tess1o/go-ecoflow - tidy up dependencies
go mod tidy - Step 5 - Run the test program
go run test.go
The code is working however not all the default operations seems apply to the Delta Max.
This the code after editing :
import (
"context"
"fmt"
"log"
"log/slog"
"os"
"github.com/tess1o/go-ecoflow"
)
func main() {
slog.SetLogLoggerLevel(slog.LevelDebug)
accessKey := os.Getenv("ACCESS_KEY")
secretKey := os.Getenv("SECRET_KEY")
if accessKey == "" || secretKey == "" {
slog.Error("AccessKey and SecretKey are mandatory")
return
}
//fmt.Print("Access Key = " + accessKey + "\n");
//fmt.Print("Secret Key = " + secretKey + "\n\n");
//create new client.
fmt.Print("Start program - login ...\n")
client := ecoflow.NewEcoflowClient(accessKey, secretKey)
//fmt.Print("Client : " + client + "\n")
// creating new client with options. Current supports two options:
// 1. custom ecoflow base url (can be used with proxies, or if they change the url)
// 2. custom http client
// client = ecoflow.NewEcoflowClient(accessKey, secretKey,
// ecoflow.WithBaseUrl("https://ecoflow-api.example.com"),
// ecoflow.WithHttpClient(customHttpClient()),
//)
//get all linked ecoflow devices. Returns SN and online status
fmt.Print("Get device list \n")
devList, err := client.GetDeviceList(context.Background())
if err != nil {
log.Fatal(err)
}
fmt.Printf("Devices: %+v\n", devList)
// get param1 and param2 for device
client.GetDeviceParameters(context.Background(), "DEVICE_SERIAL_NUMBER", []string{"param1", "param2"})
//fmt.Print("Serial Number : " + sn + "\n")
// get all parameters for device
client.GetDeviceAllParameters(context.Background(), "DEVICE_SERIAL_NUMBER")
ctx := context.Background()
// get set / get functions for power stations. PRO version is not currently implemented
ps := client.GetPowerStation("DEVICE_SERIAL_NUMBER")
//set functions, see details in documentation to each function. There are much more functions for each type of device
ps.SetDcSwitch(ctx, ecoflow.SettingEnabled)
ps.SetMaxChargeSoC(ctx, 99)
ps.SetMinDischargeSoC(ctx, 1)
ps.SetStandByTime(ctx, 60)
ps.SetCarStandByTime(ctx, 60)
ps.SetPrioritizePolarCharging(ctx, ecoflow.SettingEnabled)
//get parameters functions
ps.GetAllParameters(ctx)
ps.GetParameter(ctx, []string{"mppt.acStandbyMins", "mppt.dcChgCurrent"})
}
and this a running test :
$ go run test.go
Start program - login ...
Get device list
Devices: &{Code:0 Message:Success Devices:[{SN:xxxxxxxxxxxx Online:1}] EagleEyeTraceID: Tid:}
2026/01/16 15:57:56 DEBUG SetDeviceParameter request="map[id:1768600676858 moduleType:1 operateType:dcOutCfg params:map[enabled:1] sn:DEVICE_SERIAL_NUMBER]"
2026/01/16 15:57:56 DEBUG SetDeviceParameter response="{\"code\":\"8512\",\"message\":\"no permission to do it\",\"eagleEyeTraceId\":\"\",\"tid\":\"\"}"
2026/01/16 15:57:56 DEBUG SetDeviceParameter request="map[id:1768600676995 moduleType:2 operateType:upsConfig params:map[maxChgSoc:99] sn:DEVICE_SERIAL_NUMBER]"
2026/01/16 15:57:57 DEBUG SetDeviceParameter response="{\"code\":\"8512\",\"message\":\"no permission to do it\",\"eagleEyeTraceId\":\"\",\"tid\":\"\"}"
2026/01/16 15:57:57 DEBUG SetDeviceParameter request="map[id:1768600677133 moduleType:2 operateType:dsgCfg params:map[minDsgSoc:1] sn:DEVICE_SERIAL_NUMBER]"
2026/01/16 15:57:57 DEBUG SetDeviceParameter response="{\"code\":\"8512\",\"message\":\"no permission to do it\",\"eagleEyeTraceId\":\"\",\"tid\":\"\"}"
2026/01/16 15:57:57 DEBUG SetDeviceParameter request="map[id:1768600677269 moduleType:1 operateType:standbyTime params:map[standbyMin:60] sn:DEVICE_SERIAL_NUMBER]"
2026/01/16 15:57:57 DEBUG SetDeviceParameter response="{\"code\":\"8512\",\"message\":\"no permission to do it\",\"eagleEyeTraceId\":\"\",\"tid\":\"\"}"
2026/01/16 15:57:57 DEBUG SetDeviceParameter request="map[id:1768600677405 moduleType:5 operateType:carStandby params:map[standbyMins:60] sn:DEVICE_SERIAL_NUMBER]"
2026/01/16 15:57:57 DEBUG SetDeviceParameter response="{\"code\":\"8512\",\"message\":\"no permission to do it\",\"eagleEyeTraceId\":\"\",\"tid\":\"\"}"
2026/01/16 15:57:57 DEBUG SetDeviceParameter request="map[id:1768600677543 moduleType:1 operateType:pvChangePrio params:map[enabled:1] sn:DEVICE_SERIAL_NUMBER]"
2026/01/16 15:57:57 DEBUG SetDeviceParameter response="{\"code\":\"8512\",\"message\":\"no permission to do it\",\"eagleEyeTraceId\":\"\",\"tid\":\"\"}"
The EcoFlow API response code 8512 can be associated to these events :
- Error code 8512 may be linked to access restrictions or device-specific API limitations, especially for devices not officially released or supported via the public API.
- A similar issue was reported with the Delta Max in June 2025, where the API returned an error stating "current device is not allowed to get device info", due to EcoFlow restricting access to devices under development or not officially released.
- This suggests that API code 8512 could indicate unauthorized or unsupported access, particularly if the device model is not listed in the official Ecoflow OpenIoT documentation.
Resources
- EcoFlow - Developer access
- Reddit - Ecoflow community
- GitHub - Ecoflow API client via REST API or MQTT
- API EcoFlow documentation :git.myservermanager.com/varakh/go-ecoflow

No comments:
Post a Comment