Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/lemon-items-trade.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@ecoflow-api/rest-client": minor
"@ecoflow-api/schemas": minor
---

add Delta3 Pro support
3 changes: 2 additions & 1 deletion packages/rest-client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ At the moment the following devices are supported with specific instances:
- Glacier
- Smart Home Panel
- Delta Pro
- Delta Pro 3

More devices to come.

Expand Down Expand Up @@ -654,4 +655,4 @@ Use of the software is at your own risk and discretion,
and I assume no liability for any potential damages or issues that may arise from using the software.

It is important to be aware that using this open-source software comes
without direct support or guarantees from the company Ecoflow.
without direct support or guarantees from the company Ecoflow.
118 changes: 118 additions & 0 deletions packages/rest-client/src/__fixtures__/deltaPro3Properties.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
export const deltaPro3Properties = {
code: "0" as const,
message: "Success" as const,
data: {
errcode: 0,
devSleepState: 1,
devStandbyTime: 1,
dcStandbyTime: 1,
bleStandbyTime: 1,
acStandbyTime: 1,
cmsMinDsgSoc: 0,
cmsChgDsgState: 1,
cmsBmsRunState: 1,
cmsBattSoc: 1.7,
cmsMaxChgSoc: 1,
cmsChgRemTime: 1,
cmsOilSelfStart: 0,
cmsOilOffSoc: 10,
cmsDsgRemTime: 10,
cmsOilOnSoc: 1,
bmsChgRemTime: 1,
bmsDesignCap: 10,
bmsMaxCellTemp: 10,
bmsBattSoc: 1.7,
bmsChgDsgState: 1,
bmsMinCellTemp: 10,
bmsDsgRemTime: 10,
powInSumW: 1.7,
powOutSumW: 1.7,
powGetAcHvOut: 1.7,
powGetAc: 1.7,
powGetTypec1: 1.7,
powGetTypec2: 1.7,
powGet12v: 1.7,
powGet24v: 1.7,
powGetAcLvOut: 1.7,
powGet5p8: 1.7,
powGetQcusb1: 1.7,
powGetQcusb2: 1.7,
powGet4p81: 1.7,
powGet4p82: 1.7,
powGetAcLvTt30Out: 1.7,
powGetPvH: 1.7,
powGetAcIn: 1.7,
powGetPvL: 1.7,
plugInInfoAcInChgHalPowMax: 1,
plugInInfoPvHChargerFlag: 0,
plugInInfo4p82InFlag: 1,
plugInInfoPvLChgAmpMax: 10,
plugInInfoAcInFeq: 50,
plugInInfoPvLType: 3,
plugInInfo5p8RunState: 1,
plugInInfo4p82RunState: 1,
plugInInfo4p81ChargerFlag: 0,
plugInInfo5p8ChgHalPowMax: 10,
plugInInfoPvHChgAmpMax: 10,
plugInInfo5p8DsgPowMax: 10,
plugInInfoAcInChgPowMax: 10,
plugInInfoPvHType: 3,
plugInInfo5p8ChargerFlag: 1,
plugInInfoAcInFlag: 0,
plugInInfo4p81DsgChgType: 3,
plugInInfoAcChargerFlag: 0,
plugInInfoPvHFlag: 0,
plugInInfo4p81Sn: "123456789",
plugInInfo4p82DsgChgType: 3,
plugInInfoPvHDcAmpMax: 10,
plugInInfo4p81InFlag: 1,
plugInInfo4p82ChargerFlag: 0,
plugInInfoPvLChgVolMax: 10,
plugInInfoPvLDcAmpMax: 10,
plugInInfo5p8Flag: 0,
plugInInfoAcOutDsgPowMax: 10,
plugInInfo5p8Sn: "123456789",
plugInInfoPvLChargerFlag: 0,
plugInInfo4p82Sn: "123456789",
plugInInfo5p8ChgPowMax: 10,
plugInInfoPvLFlag: 0,
plugInInfo4p81RunState: 10,
plugInInfoPvHChgVolMax: 10,
plugInInfo5p8DsgChg: 10,
flowInfoPvL: 2,
flowInfoPvH: 2,
flowInfoTypec1: 0,
flowInfoTypec2: 0,
flowInfoAcLvOut: 0,
flowInfo4p82Out: 0,
flowInfoAcIn: 2,
flowInfoAcHvOut: 2,
flowInfo12v: 2,
flowInfo24v: 2,
flowInfo4p81In: 2,
flowInfoQcusb1: 2,
flowInfoQcusb2: 2,
flowInfo4p82In: 2,
flowInfo5p8In: 2,
flowInfo4p81Out: 2,
flowInfo5p8Out: 2,
acEnergySavingOpen: 0,
multiBpChgDsgMode: 1,
fastChargeSwitch: 0,
lcdLight: 20,
energyBackupEn: 0,
acOutFreq: 10,
xboostEn: 1,
llcHvLvFlag: 10,
llcGFCIFlag: 0,
acLvAlwaysOn: 1,
screenOffTime: 10,
energyBackupStartSoc: 20,
acHvAlwaysOn: 0,
acAlwaysOnMiniSoc: 10,
enBeep: 0,
generatorPvHybridModeOpen: 0,
generatorCareModeOpen: 0,
generatorPvHybridModeSocMax: 10,
},
};
10 changes: 10 additions & 0 deletions packages/rest-client/src/__test__/shared.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ import { SmartHomePanel } from "../lib/devices/SmartHomePanel";
import { shpProperties } from "../__fixtures__/shpProperties";
import { DeltaPro } from "../lib/devices/DeltaPro";
import { deltaProProperties } from "../__fixtures__/deltaProProperties";
import { DeltaPro3 } from "../lib/devices/DeltaPro3";
import { deltaPro3Properties } from "../__fixtures__/deltaPro3Properties";

type DeviceTestData<T> = [
// device name
Expand Down Expand Up @@ -80,6 +82,14 @@ const devices: DeviceTestData<any> = [
"Invalid serial number for Delta Pro device.",
"bmsMaster.soc",
],
[
"Delta Pro 3",
DeltaPro3,
"MR51*****",
deltaPro3Properties,
"Invalid serial number for Delta Pro 3 device.",
"cmsMinDsgSoc",
],
];

describe.each(devices)(
Expand Down
Loading