Skip to content

Commit 314c38d

Browse files
authored
Merge pull request #53 from rustyy/development
Development
2 parents 2d53fee + a57d608 commit 314c38d

15 files changed

Lines changed: 1925 additions & 11 deletions

File tree

.changeset/fresh-lights-call.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@ecoflow-api/rest-client": patch
3+
---
4+
5+
fix: missing `DeltaPro` device support to `DeviceFactory` type mapping

.changeset/lemon-items-trade.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@ecoflow-api/rest-client": minor
3+
"@ecoflow-api/schemas": minor
4+
---
5+
6+
add Delta3 Pro support

packages/rest-client/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ At the moment the following devices are supported with specific instances:
3232
- Glacier
3333
- Smart Home Panel
3434
- Delta Pro
35+
- Delta Pro 3
3536

3637
More devices to come.
3738

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

656657
It is important to be aware that using this open-source software comes
657-
without direct support or guarantees from the company Ecoflow.
658+
without direct support or guarantees from the company Ecoflow.
Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
export const deltaPro3Properties = {
2+
code: "0" as const,
3+
message: "Success" as const,
4+
data: {
5+
errcode: 0,
6+
devSleepState: 1,
7+
devStandbyTime: 1,
8+
dcStandbyTime: 1,
9+
bleStandbyTime: 1,
10+
acStandbyTime: 1,
11+
cmsMinDsgSoc: 0,
12+
cmsChgDsgState: 1,
13+
cmsBmsRunState: 1,
14+
cmsBattSoc: 1.7,
15+
cmsMaxChgSoc: 1,
16+
cmsChgRemTime: 1,
17+
cmsOilSelfStart: 0,
18+
cmsOilOffSoc: 10,
19+
cmsDsgRemTime: 10,
20+
cmsOilOnSoc: 1,
21+
bmsChgRemTime: 1,
22+
bmsDesignCap: 10,
23+
bmsMaxCellTemp: 10,
24+
bmsBattSoc: 1.7,
25+
bmsChgDsgState: 1,
26+
bmsMinCellTemp: 10,
27+
bmsDsgRemTime: 10,
28+
powInSumW: 1.7,
29+
powOutSumW: 1.7,
30+
powGetAcHvOut: 1.7,
31+
powGetAc: 1.7,
32+
powGetTypec1: 1.7,
33+
powGetTypec2: 1.7,
34+
powGet12v: 1.7,
35+
powGet24v: 1.7,
36+
powGetAcLvOut: 1.7,
37+
powGet5p8: 1.7,
38+
powGetQcusb1: 1.7,
39+
powGetQcusb2: 1.7,
40+
powGet4p81: 1.7,
41+
powGet4p82: 1.7,
42+
powGetAcLvTt30Out: 1.7,
43+
powGetPvH: 1.7,
44+
powGetAcIn: 1.7,
45+
powGetPvL: 1.7,
46+
plugInInfoAcInChgHalPowMax: 1,
47+
plugInInfoPvHChargerFlag: 0,
48+
plugInInfo4p82InFlag: 1,
49+
plugInInfoPvLChgAmpMax: 10,
50+
plugInInfoAcInFeq: 50,
51+
plugInInfoPvLType: 3,
52+
plugInInfo5p8RunState: 1,
53+
plugInInfo4p82RunState: 1,
54+
plugInInfo4p81ChargerFlag: 0,
55+
plugInInfo5p8ChgHalPowMax: 10,
56+
plugInInfoPvHChgAmpMax: 10,
57+
plugInInfo5p8DsgPowMax: 10,
58+
plugInInfoAcInChgPowMax: 10,
59+
plugInInfoPvHType: 3,
60+
plugInInfo5p8ChargerFlag: 1,
61+
plugInInfoAcInFlag: 0,
62+
plugInInfo4p81DsgChgType: 3,
63+
plugInInfoAcChargerFlag: 0,
64+
plugInInfoPvHFlag: 0,
65+
plugInInfo4p81Sn: "123456789",
66+
plugInInfo4p82DsgChgType: 3,
67+
plugInInfoPvHDcAmpMax: 10,
68+
plugInInfo4p81InFlag: 1,
69+
plugInInfo4p82ChargerFlag: 0,
70+
plugInInfoPvLChgVolMax: 10,
71+
plugInInfoPvLDcAmpMax: 10,
72+
plugInInfo5p8Flag: 0,
73+
plugInInfoAcOutDsgPowMax: 10,
74+
plugInInfo5p8Sn: "123456789",
75+
plugInInfoPvLChargerFlag: 0,
76+
plugInInfo4p82Sn: "123456789",
77+
plugInInfo5p8ChgPowMax: 10,
78+
plugInInfoPvLFlag: 0,
79+
plugInInfo4p81RunState: 10,
80+
plugInInfoPvHChgVolMax: 10,
81+
plugInInfo5p8DsgChg: 10,
82+
flowInfoPvL: 2,
83+
flowInfoPvH: 2,
84+
flowInfoTypec1: 0,
85+
flowInfoTypec2: 0,
86+
flowInfoAcLvOut: 0,
87+
flowInfo4p82Out: 0,
88+
flowInfoAcIn: 2,
89+
flowInfoAcHvOut: 2,
90+
flowInfo12v: 2,
91+
flowInfo24v: 2,
92+
flowInfo4p81In: 2,
93+
flowInfoQcusb1: 2,
94+
flowInfoQcusb2: 2,
95+
flowInfo4p82In: 2,
96+
flowInfo5p8In: 2,
97+
flowInfo4p81Out: 2,
98+
flowInfo5p8Out: 2,
99+
acEnergySavingOpen: 0,
100+
multiBpChgDsgMode: 1,
101+
fastChargeSwitch: 0,
102+
lcdLight: 20,
103+
energyBackupEn: 0,
104+
acOutFreq: 10,
105+
xboostEn: 1,
106+
llcHvLvFlag: 10,
107+
llcGFCIFlag: 0,
108+
acLvAlwaysOn: 1,
109+
screenOffTime: 10,
110+
energyBackupStartSoc: 20,
111+
acHvAlwaysOn: 0,
112+
acAlwaysOnMiniSoc: 10,
113+
enBeep: 0,
114+
generatorPvHybridModeOpen: 0,
115+
generatorCareModeOpen: 0,
116+
generatorPvHybridModeSocMax: 10,
117+
},
118+
};

packages/rest-client/src/__test__/shared.test.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ import { SmartHomePanel } from "../lib/devices/SmartHomePanel";
1515
import { shpProperties } from "../__fixtures__/shpProperties";
1616
import { DeltaPro } from "../lib/devices/DeltaPro";
1717
import { deltaProProperties } from "../__fixtures__/deltaProProperties";
18+
import { DeltaPro3 } from "../lib/devices/DeltaPro3";
19+
import { deltaPro3Properties } from "../__fixtures__/deltaPro3Properties";
1820

1921
type DeviceTestData<T> = [
2022
// device name
@@ -80,6 +82,14 @@ const devices: DeviceTestData<any> = [
8082
"Invalid serial number for Delta Pro device.",
8183
"bmsMaster.soc",
8284
],
85+
[
86+
"Delta Pro 3",
87+
DeltaPro3,
88+
"MR51*****",
89+
deltaPro3Properties,
90+
"Invalid serial number for Delta Pro 3 device.",
91+
"cmsMinDsgSoc",
92+
],
8393
];
8494

8595
describe.each(devices)(

0 commit comments

Comments
 (0)