iobroker.mg-saic 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +55 -4
- package/build/battery-capacity.js +85 -0
- package/build/battery-capacity.js.map +7 -0
- package/build/battery-profiles.js +193 -0
- package/build/battery-profiles.js.map +7 -0
- package/build/main.js +263 -25
- package/build/main.js.map +2 -2
- package/build/runtime-translations.js +39 -0
- package/build/runtime-translations.js.map +2 -2
- package/build/saic-client.js +35 -3
- package/build/saic-client.js.map +3 -3
- package/build/status-metadata.js +16 -31
- package/build/status-metadata.js.map +2 -2
- package/io-package.json +14 -14
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -40,6 +40,58 @@ The adapter does not import previously saved native login or password values. On
|
|
|
40
40
|
- Supports climate, heating, and charging features where available for the vehicle.
|
|
41
41
|
- Omits unrecognized free-form charging text while retaining numeric measurements and validated charging-point identifiers.
|
|
42
42
|
|
|
43
|
+
### Battery capacity and available energy
|
|
44
|
+
|
|
45
|
+
The adapter tries to identify your vehicle's battery capacity automatically. Some SAIC values can be wrong or unclear, so you can correct the value separately for each vehicle. This is done in the vehicle's data points, not in the general adapter settings.
|
|
46
|
+
|
|
47
|
+
#### Correct the capacity manually
|
|
48
|
+
|
|
49
|
+
1. In ioBroker Admin, open **Objects** and find your vehicle under `mg-saic.<instance> > vehicles > <vehicleId>` (`<instance>` is usually `0`).
|
|
50
|
+
2. Open `status > charging > statistics` and edit `batteryCapacityOverride`.
|
|
51
|
+
3. Enter the battery's **usable capacity** in kWh. This is the capacity available to drive the vehicle, not the larger gross/nominal pack size. If you are unsure which value you have, report the details first rather than entering a guess.
|
|
52
|
+
4. Set `batteryCapacityOverride` to `0` to clear the manual value and return to automatic detection.
|
|
53
|
+
|
|
54
|
+
The override is saved separately for each vehicle, remains in place after an adapter restart, and takes effect immediately. Changing it does not send a command to the vehicle or make an extra SAIC API request. Invalid values are rejected and the last valid value is restored.
|
|
55
|
+
|
|
56
|
+
#### What the battery data points show
|
|
57
|
+
|
|
58
|
+
- `totalBatteryCapacity` is the capacity the adapter currently uses. Its source is shown in `batteryCapacitySource`: `manual` (your override), `profile` (a recognized vehicle), `api` (a trusted SAIC value), or `unknown`.
|
|
59
|
+
- `totalBatteryCapacityRaw` shows the value reported by SAIC, converted to kWh. It is for comparison and troubleshooting; it can be wrong or unavailable.
|
|
60
|
+
- `batteryCapacityOverride` is the writable per-vehicle correction described above. A value of `0` means automatic detection.
|
|
61
|
+
- `batteryAvailableEnergy` is calculated from the state of charge only when the adapter knows a usable battery capacity. It remains `null` rather than showing a misleading estimate when that information is not reliable.
|
|
62
|
+
|
|
63
|
+
The adapter checks a manual override first, then an exact vehicle profile, and then a valid API value. If none is trustworthy, it reports the capacity as unknown. Some profiles list gross/nominal capacity, while others list usable capacity; where that distinction is not verified, the adapter does not treat the number as usable energy. For this reason, use a confirmed usable value for the manual override.
|
|
64
|
+
|
|
65
|
+
#### Automatically recognized vehicles
|
|
66
|
+
|
|
67
|
+
The profiles currently include:
|
|
68
|
+
|
|
69
|
+
- MG4: `EH32MCE S` is 64 kWh gross/nominal with 59.5 kWh usable; `EH32 X3` is 77 kWh. Other `EH32` variants require a battery-type value (`BType`): `1` maps to 64 kWh and `0` to 51 kWh. The capacity basis for those other values is not confirmed.
|
|
70
|
+
- Marvel R (`EP21`): 69.9 kWh usable when the adapter account region is set to `EU`. The region check is a safeguard, not proof of the vehicle's sales market; use a manual override if your vehicle is from another market.
|
|
71
|
+
- MG4 Urban: `AH4EM L` is 43 kWh; `AH4EM S` is 54 kWh.
|
|
72
|
+
- MGS5: `MZS3E` with `BType` `0` is 49 kWh; `BType` `1` is 64 kWh gross or 62.1 kWh usable.
|
|
73
|
+
- MG5: series starting with `EP2CP3` is 50.3 kWh; `EP2DP3` is 61.1 kWh.
|
|
74
|
+
- ZS EV: `BType` `0` is 49 kWh; `BType` `1` is 68.3 kWh.
|
|
75
|
+
- Cyberster (`EC32`): 72.5 kWh usable (77 kWh nominal is also reported).
|
|
76
|
+
- MGS6 (series starting with `MIS3E`): 74.3 kWh usable.
|
|
77
|
+
- HS PHEV (series starting with `AS33P`): 23.2 kWh usable (24.7 kWh nominal is also reported).
|
|
78
|
+
|
|
79
|
+
This list is not complete. Some variants cannot yet be identified reliably from the available vehicle data, and the adapter will not guess their battery size. In particular, a raw SAIC value of `725` (72.5 kWh) may be a placeholder; it is accepted automatically only when a matching profile confirms that value, such as the Cyberster profile. The raw value remains visible in `totalBatteryCapacityRaw` for troubleshooting.
|
|
80
|
+
|
|
81
|
+
For other model-specific readings, `AH4EM L` battery voltage uses the measured correction `reported voltage × 0.82 + 4.85` documented by the Home Assistant integration; it does not apply to `AH4EM S`. For `AS33P`, the displayed electric range uses `imcuVehElecRng` from the charging data already retrieved by the adapter, rather than the unreliable `fuelRangeElec` reading. The last valid IMCU range is retained if a later response omits it; until the first valid IMCU value arrives after startup, no range estimate is published for that model. These corrections add no API requests.
|
|
82
|
+
|
|
83
|
+
#### Reporting an incorrect or unsupported vehicle
|
|
84
|
+
|
|
85
|
+
Please [open a GitHub issue](https://github.com/Voodoo2man/ioBroker.mg-saic/issues/new), email [Voodoo2man@outlook.de](mailto:Voodoo2man@outlook.de), or send me a direct message through the [ioBroker forum](https://forum.iobroker.net). Include:
|
|
86
|
+
|
|
87
|
+
- the exact value of the vehicle's `series` data point (`vehicles.<vehicleId>.series`);
|
|
88
|
+
- the actual battery capacity in kWh, and whether it is usable/net or gross/nominal if you know;
|
|
89
|
+
- the vehicle model and model year, if available.
|
|
90
|
+
|
|
91
|
+
Please do not include your VIN, account details, or login credentials. The exact `series` value and the verified capacity help us correct or add the appropriate vehicle profile.
|
|
92
|
+
|
|
93
|
+
Profile and correction references: [SAIC-iSmart-API/saic-python-mqtt-gateway](https://github.com/SAIC-iSmart-API/saic-python-mqtt-gateway/blob/444b370a6b0eba4ed578535ac789d1d06a6b0c88/src/vehicle_info.py), the [mg-saic-ha vehicle profiles](https://github.com/townsmcp/mg-saic-ha/blob/ac4ac56c25a45cfb106f9df2d9d306f225a4cbbf/custom_components/mg_saic/const.py), its [model-specific logic](https://github.com/townsmcp/mg-saic-ha/blob/ac4ac56c25a45cfb106f9df2d9d306f225a4cbbf/custom_components/mg_saic/logic.py), and the [EP21 EU owner report](https://github.com/townsmcp/mg-saic-ha/issues/374).
|
|
94
|
+
|
|
43
95
|
## Polling modes
|
|
44
96
|
|
|
45
97
|
Polling controls how often the adapter asks the iSmart cloud for vehicle information. More frequent updates can make displayed values newer, but they also create more cloud requests and may wake the vehicle. No polling mode guarantees protection of the 12 V battery; other apps and integrations can wake the vehicle too.
|
|
@@ -114,6 +166,9 @@ The adapter is published on npm and available from ioBroker's Stable adapter rep
|
|
|
114
166
|
</a>
|
|
115
167
|
|
|
116
168
|
## Changelog
|
|
169
|
+
### 0.5.0 (2026-12-01)
|
|
170
|
+
|
|
171
|
+
- (Voodoo2man) Added per-vehicle battery-capacity resolution and overrides, logged API/profile capacity differences as informational messages, and corrected model-specific voltage and range values.
|
|
117
172
|
|
|
118
173
|
### 0.4.0 (2026-12-01)
|
|
119
174
|
|
|
@@ -131,10 +186,6 @@ The adapter is published on npm and available from ioBroker's Stable adapter rep
|
|
|
131
186
|
|
|
132
187
|
- (Voodoo2man) Corrected command-response validation, status values, charging-field handling, vehicle ID reuse, and cloud polling intervals; removed the non-informative vehicle name state.
|
|
133
188
|
|
|
134
|
-
### 0.1.3 (2026-11-08)
|
|
135
|
-
|
|
136
|
-
- (Voodoo2man) Retry startup initialization after temporary cloud login and vehicle-list outages with bounded backoff, prevent false setting writes from triggering remote setting actions, and add the missing region labels in the Admin UI.
|
|
137
|
-
|
|
138
189
|
Older changelog entries are available in [CHANGELOG_OLD.md](CHANGELOG_OLD.md).
|
|
139
190
|
|
|
140
191
|
## License
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var battery_capacity_exports = {};
|
|
20
|
+
__export(battery_capacity_exports, {
|
|
21
|
+
calculateUsableEnergy: () => calculateUsableEnergy,
|
|
22
|
+
getRawBatteryCapacity: () => getRawBatteryCapacity,
|
|
23
|
+
normalizeRawCapacity: () => normalizeRawCapacity,
|
|
24
|
+
resolveBatteryCapacity: () => resolveBatteryCapacity,
|
|
25
|
+
scaleRawCapacityForDisplay: () => scaleRawCapacityForDisplay,
|
|
26
|
+
validPositiveCapacity: () => validPositiveCapacity
|
|
27
|
+
});
|
|
28
|
+
module.exports = __toCommonJS(battery_capacity_exports);
|
|
29
|
+
var import_battery_profiles = require("./battery-profiles");
|
|
30
|
+
function getRawBatteryCapacity(status) {
|
|
31
|
+
var _a;
|
|
32
|
+
const read = (fields) => {
|
|
33
|
+
var _a2;
|
|
34
|
+
return (_a2 = Object.entries(fields).find(([key]) => key.toLowerCase() === "totalbatterycapacity")) == null ? void 0 : _a2[1];
|
|
35
|
+
};
|
|
36
|
+
return (_a = read(status.rvsChargeStatus)) != null ? _a : read(status.chrgMgmtData);
|
|
37
|
+
}
|
|
38
|
+
function validPositiveCapacity(value) {
|
|
39
|
+
return typeof value === "number" && Number.isFinite(value) && value > 0;
|
|
40
|
+
}
|
|
41
|
+
function scaleRawCapacityForDisplay(value) {
|
|
42
|
+
return typeof value === "number" && Number.isFinite(value) ? Number((value * 0.1).toFixed(1)) : null;
|
|
43
|
+
}
|
|
44
|
+
function normalizeRawCapacity(value) {
|
|
45
|
+
if (typeof value !== "number" || !Number.isFinite(value) || value <= 0 || value === -128) {
|
|
46
|
+
return void 0;
|
|
47
|
+
}
|
|
48
|
+
const capacity = value * 0.1;
|
|
49
|
+
return Number.isFinite(capacity) && capacity > 0 ? Number(capacity.toFixed(1)) : void 0;
|
|
50
|
+
}
|
|
51
|
+
function resolveBatteryCapacity(vehicle, override, rawApiValue, region) {
|
|
52
|
+
if (validPositiveCapacity(override)) {
|
|
53
|
+
return { capacityKwh: override, source: "manual", usableCapacityKwh: override };
|
|
54
|
+
}
|
|
55
|
+
const profile = (0, import_battery_profiles.resolveBatteryProfile)(vehicle, void 0, region);
|
|
56
|
+
if (profile) {
|
|
57
|
+
return {
|
|
58
|
+
capacityKwh: profile.capacityKwh,
|
|
59
|
+
source: "profile",
|
|
60
|
+
...profile.usableCapacityKwh === void 0 ? {} : { usableCapacityKwh: profile.usableCapacityKwh },
|
|
61
|
+
profile
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
const apiCapacity = normalizeRawCapacity(rawApiValue);
|
|
65
|
+
if (apiCapacity !== void 0 && apiCapacity !== 72.5) {
|
|
66
|
+
return { capacityKwh: apiCapacity, source: "api" };
|
|
67
|
+
}
|
|
68
|
+
return { capacityKwh: null, source: "unknown" };
|
|
69
|
+
}
|
|
70
|
+
function calculateUsableEnergy(usableCapacityKwh, socPercent) {
|
|
71
|
+
if (!validPositiveCapacity(usableCapacityKwh) || typeof socPercent !== "number" || !Number.isFinite(socPercent) || socPercent < 0 || socPercent > 100) {
|
|
72
|
+
return void 0;
|
|
73
|
+
}
|
|
74
|
+
return Number((usableCapacityKwh * socPercent / 100).toFixed(2));
|
|
75
|
+
}
|
|
76
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
77
|
+
0 && (module.exports = {
|
|
78
|
+
calculateUsableEnergy,
|
|
79
|
+
getRawBatteryCapacity,
|
|
80
|
+
normalizeRawCapacity,
|
|
81
|
+
resolveBatteryCapacity,
|
|
82
|
+
scaleRawCapacityForDisplay,
|
|
83
|
+
validPositiveCapacity
|
|
84
|
+
});
|
|
85
|
+
//# sourceMappingURL=battery-capacity.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/battery-capacity.ts"],
|
|
4
|
+
"sourcesContent": ["import { resolveBatteryProfile, type BatteryProfile } from './battery-profiles';\nimport type { SaicChargingStatus, SaicVehicle } from './saic-client';\n\nexport type BatteryCapacitySource = 'manual' | 'profile' | 'api' | 'unknown';\n\n/**\n * Read the capacity field wherever the SAIC charging response places it.\n *\n * @param status Parsed SAIC charging response.\n */\nexport function getRawBatteryCapacity(status: SaicChargingStatus): unknown {\n\tconst read = (fields: Record<string, number | string | undefined>): number | string | undefined =>\n\t\tObject.entries(fields).find(([key]) => key.toLowerCase() === 'totalbatterycapacity')?.[1];\n\treturn read(status.rvsChargeStatus) ?? read(status.chrgMgmtData);\n}\n/** Effective capacity and its authority and usable-energy eligibility. */\nexport interface BatteryCapacityResolution {\n\t/** Selected capacity in kWh, or null when unresolved. */\n\tcapacityKwh: number | null;\n\t/** Source of the selected capacity. */\n\tsource: BatteryCapacitySource;\n\t/** Explicit usable capacity, when supported by the evidence. */\n\tusableCapacityKwh?: number;\n\t/** Evidence declaration selected by the profile resolver. */\n\tprofile?: BatteryProfile;\n}\n\n/**\n * Check whether a value is a finite positive capacity.\n *\n * @param value Candidate capacity value.\n */\nexport function validPositiveCapacity(value: unknown): value is number {\n\treturn typeof value === 'number' && Number.isFinite(value) && value > 0;\n}\n\n/**\n * Convert a valid SAIC raw field to kWh.\n *\n * @param value Raw API capacity value.\n */\nexport function scaleRawCapacityForDisplay(value: unknown): number | null {\n\treturn typeof value === 'number' && Number.isFinite(value) ? Number((value * 0.1).toFixed(1)) : null;\n}\n\n/**\n * Validate a raw API value for use as an effective capacity.\n *\n * @param value Raw API capacity value.\n */\nexport function normalizeRawCapacity(value: unknown): number | undefined {\n\tif (typeof value !== 'number' || !Number.isFinite(value) || value <= 0 || value === -128) {\n\t\treturn undefined;\n\t}\n\tconst capacity = value * 0.1;\n\treturn Number.isFinite(capacity) && capacity > 0 ? Number(capacity.toFixed(1)) : undefined;\n}\n\n/**\n * Resolve a vehicle's effective capacity by override, profile, then API priority.\n *\n * @param vehicle Vehicle identity and available model configuration.\n * @param override Persisted per-vehicle manual value; zero selects automatic mode.\n * @param rawApiValue Current raw SAIC capacity value.\n * @param region Adapter backend region, when available.\n */\nexport function resolveBatteryCapacity(\n\tvehicle: SaicVehicle,\n\toverride: unknown,\n\trawApiValue: unknown,\n\tregion?: string,\n): BatteryCapacityResolution {\n\tif (validPositiveCapacity(override)) {\n\t\treturn { capacityKwh: override, source: 'manual', usableCapacityKwh: override };\n\t}\n\tconst profile = resolveBatteryProfile(vehicle, undefined, region);\n\tif (profile) {\n\t\treturn {\n\t\t\tcapacityKwh: profile.capacityKwh,\n\t\t\tsource: 'profile',\n\t\t\t...(profile.usableCapacityKwh === undefined ? {} : { usableCapacityKwh: profile.usableCapacityKwh }),\n\t\t\tprofile,\n\t\t};\n\t}\n\tconst apiCapacity = normalizeRawCapacity(rawApiValue);\n\tif (apiCapacity !== undefined && apiCapacity !== 72.5) {\n\t\treturn { capacityKwh: apiCapacity, source: 'api' };\n\t}\n\treturn { capacityKwh: null, source: 'unknown' };\n}\n\n/**\n * Calculate available energy from an explicitly usable capacity and valid SoC.\n *\n * @param usableCapacityKwh Verified net capacity in kWh.\n * @param socPercent State of charge from 0 to 100.\n */\nexport function calculateUsableEnergy(usableCapacityKwh: unknown, socPercent: unknown): number | undefined {\n\tif (\n\t\t!validPositiveCapacity(usableCapacityKwh) ||\n\t\ttypeof socPercent !== 'number' ||\n\t\t!Number.isFinite(socPercent) ||\n\t\tsocPercent < 0 ||\n\t\tsocPercent > 100\n\t) {\n\t\treturn undefined;\n\t}\n\treturn Number(((usableCapacityKwh * socPercent) / 100).toFixed(2));\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,8BAA2D;AAUpD,SAAS,sBAAsB,QAAqC;AAV3E;AAWC,QAAM,OAAO,CAAC,WAAkF;AAXjG,QAAAA;AAYE,YAAAA,MAAA,OAAO,QAAQ,MAAM,EAAE,KAAK,CAAC,CAAC,GAAG,MAAM,IAAI,YAAY,MAAM,sBAAsB,MAAnF,gBAAAA,IAAuF;AAAA;AACxF,UAAO,UAAK,OAAO,eAAe,MAA3B,YAAgC,KAAK,OAAO,YAAY;AAChE;AAkBO,SAAS,sBAAsB,OAAiC;AACtE,SAAO,OAAO,UAAU,YAAY,OAAO,SAAS,KAAK,KAAK,QAAQ;AACvE;AAOO,SAAS,2BAA2B,OAA+B;AACzE,SAAO,OAAO,UAAU,YAAY,OAAO,SAAS,KAAK,IAAI,QAAQ,QAAQ,KAAK,QAAQ,CAAC,CAAC,IAAI;AACjG;AAOO,SAAS,qBAAqB,OAAoC;AACxE,MAAI,OAAO,UAAU,YAAY,CAAC,OAAO,SAAS,KAAK,KAAK,SAAS,KAAK,UAAU,MAAM;AACzF,WAAO;AAAA,EACR;AACA,QAAM,WAAW,QAAQ;AACzB,SAAO,OAAO,SAAS,QAAQ,KAAK,WAAW,IAAI,OAAO,SAAS,QAAQ,CAAC,CAAC,IAAI;AAClF;AAUO,SAAS,uBACf,SACA,UACA,aACA,QAC4B;AAC5B,MAAI,sBAAsB,QAAQ,GAAG;AACpC,WAAO,EAAE,aAAa,UAAU,QAAQ,UAAU,mBAAmB,SAAS;AAAA,EAC/E;AACA,QAAM,cAAU,+CAAsB,SAAS,QAAW,MAAM;AAChE,MAAI,SAAS;AACZ,WAAO;AAAA,MACN,aAAa,QAAQ;AAAA,MACrB,QAAQ;AAAA,MACR,GAAI,QAAQ,sBAAsB,SAAY,CAAC,IAAI,EAAE,mBAAmB,QAAQ,kBAAkB;AAAA,MAClG;AAAA,IACD;AAAA,EACD;AACA,QAAM,cAAc,qBAAqB,WAAW;AACpD,MAAI,gBAAgB,UAAa,gBAAgB,MAAM;AACtD,WAAO,EAAE,aAAa,aAAa,QAAQ,MAAM;AAAA,EAClD;AACA,SAAO,EAAE,aAAa,MAAM,QAAQ,UAAU;AAC/C;AAQO,SAAS,sBAAsB,mBAA4B,YAAyC;AAC1G,MACC,CAAC,sBAAsB,iBAAiB,KACxC,OAAO,eAAe,YACtB,CAAC,OAAO,SAAS,UAAU,KAC3B,aAAa,KACb,aAAa,KACZ;AACD,WAAO;AAAA,EACR;AACA,SAAO,QAAS,oBAAoB,aAAc,KAAK,QAAQ,CAAC,CAAC;AAClE;",
|
|
6
|
+
"names": ["_a"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var battery_profiles_exports = {};
|
|
20
|
+
__export(battery_profiles_exports, {
|
|
21
|
+
batteryProfiles: () => batteryProfiles,
|
|
22
|
+
resolveBatteryProfile: () => resolveBatteryProfile
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(battery_profiles_exports);
|
|
25
|
+
const normalized = (value) => {
|
|
26
|
+
var _a;
|
|
27
|
+
return (_a = value == null ? void 0 : value.trim().replace(/\s+/g, " ").toLocaleUpperCase("en-US")) != null ? _a : "";
|
|
28
|
+
};
|
|
29
|
+
const configValue = (vehicle, item) => {
|
|
30
|
+
var _a, _b;
|
|
31
|
+
return (_b = (_a = vehicle.vehicleModelConfiguration) == null ? void 0 : _a.find((entry) => normalized(entry.itemCode) === item)) == null ? void 0 : _b.itemValue;
|
|
32
|
+
};
|
|
33
|
+
const bType = (vehicle) => {
|
|
34
|
+
var _a;
|
|
35
|
+
return normalized((_a = configValue(vehicle, "BTYPE")) != null ? _a : vehicle.bType);
|
|
36
|
+
};
|
|
37
|
+
function matches(vehicle, match, region) {
|
|
38
|
+
return (match.seriesExact === void 0 || normalized(vehicle.series) === normalized(match.seriesExact)) && (match.seriesStartsWith === void 0 || normalized(vehicle.series).startsWith(normalized(match.seriesStartsWith))) && (match.modelNameStartsWith === void 0 || normalized(vehicle.modelName).startsWith(normalized(match.modelNameStartsWith))) && (match.bType === void 0 || bType(vehicle) === normalized(match.bType)) && (match.region === void 0 || normalized(region) === normalized(match.region));
|
|
39
|
+
}
|
|
40
|
+
const batteryProfiles = [
|
|
41
|
+
{
|
|
42
|
+
id: "mg4-eh32mce-s",
|
|
43
|
+
match: { seriesExact: "EH32MCE S" },
|
|
44
|
+
priority: 20,
|
|
45
|
+
capacityKwh: 64,
|
|
46
|
+
basis: "gross",
|
|
47
|
+
usableCapacityKwh: 59.5,
|
|
48
|
+
nominalCapacityKwh: 64,
|
|
49
|
+
source: "User-confirmed: 64 kWh gross/nominal, 59.5 kWh usable"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
id: "ep21-eu",
|
|
53
|
+
match: { seriesExact: "EP21", region: "EU" },
|
|
54
|
+
capacityKwh: 69.9,
|
|
55
|
+
basis: "usable",
|
|
56
|
+
usableCapacityKwh: 69.9,
|
|
57
|
+
source: "HA const.py; townsmcp/mg-saic-ha#374; EU owner report"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
id: "mg4-eh32-x3",
|
|
61
|
+
match: { seriesStartsWith: "EH32", modelNameStartsWith: "EH32 X3" },
|
|
62
|
+
priority: 10,
|
|
63
|
+
capacityKwh: 77,
|
|
64
|
+
basis: "unknown",
|
|
65
|
+
source: "SAIC gateway vehicle_info.py, 444b370"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
id: "mg4-eh32-btype-1",
|
|
69
|
+
match: { seriesStartsWith: "EH32", bType: "1" },
|
|
70
|
+
capacityKwh: 64,
|
|
71
|
+
basis: "unknown",
|
|
72
|
+
source: "SAIC gateway vehicle_info.py, 444b370"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
id: "mg4-eh32-btype-0",
|
|
76
|
+
match: { seriesStartsWith: "EH32", bType: "0" },
|
|
77
|
+
capacityKwh: 51,
|
|
78
|
+
basis: "unknown",
|
|
79
|
+
source: "SAIC gateway vehicle_info.py, 444b370"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
id: "mg4-urban-ah4em-l",
|
|
83
|
+
match: { seriesExact: "AH4EM L" },
|
|
84
|
+
capacityKwh: 43,
|
|
85
|
+
basis: "unknown",
|
|
86
|
+
source: "SAIC gateway vehicle_info.py, 444b370"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
id: "mg4-urban-ah4em-s",
|
|
90
|
+
match: { seriesExact: "AH4EM S" },
|
|
91
|
+
capacityKwh: 54,
|
|
92
|
+
basis: "unknown",
|
|
93
|
+
source: "SAIC gateway vehicle_info.py, 444b370"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
id: "mgs5-mzs3e-btype-0",
|
|
97
|
+
match: { seriesStartsWith: "MZS3E", bType: "0" },
|
|
98
|
+
capacityKwh: 49,
|
|
99
|
+
basis: "unknown",
|
|
100
|
+
source: "SAIC gateway vehicle_info.py, 444b370"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
id: "mgs5-mzs3e-btype-1",
|
|
104
|
+
match: { seriesStartsWith: "MZS3E", bType: "1" },
|
|
105
|
+
capacityKwh: 64,
|
|
106
|
+
basis: "gross",
|
|
107
|
+
usableCapacityKwh: 62.1,
|
|
108
|
+
source: "HA const.py/logic.py, ac4ac56"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
id: "mg5-ep2cp3",
|
|
112
|
+
match: { seriesStartsWith: "EP2CP3" },
|
|
113
|
+
capacityKwh: 50.3,
|
|
114
|
+
basis: "unknown",
|
|
115
|
+
source: "SAIC gateway vehicle_info.py, 444b370"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
id: "mg5-ep2dp3",
|
|
119
|
+
match: { seriesStartsWith: "EP2DP3" },
|
|
120
|
+
capacityKwh: 61.1,
|
|
121
|
+
basis: "unknown",
|
|
122
|
+
source: "SAIC gateway vehicle_info.py, 444b370"
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
id: "zs-ev-btype-0",
|
|
126
|
+
match: { seriesExact: "ZS EV", bType: "0" },
|
|
127
|
+
capacityKwh: 49,
|
|
128
|
+
basis: "unknown",
|
|
129
|
+
source: "SAIC gateway vehicle_info.py, 444b370"
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
id: "zs-ev-btype-1",
|
|
133
|
+
match: { seriesExact: "ZS EV", bType: "1" },
|
|
134
|
+
capacityKwh: 68.3,
|
|
135
|
+
basis: "unknown",
|
|
136
|
+
source: "SAIC gateway vehicle_info.py, 444b370"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
id: "cyberster-ec32",
|
|
140
|
+
match: { seriesExact: "EC32" },
|
|
141
|
+
capacityKwh: 72.5,
|
|
142
|
+
basis: "usable",
|
|
143
|
+
usableCapacityKwh: 72.5,
|
|
144
|
+
nominalCapacityKwh: 77,
|
|
145
|
+
source: "HA const.py/logic.py, ac4ac56 (77 kWh nominal noted)"
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
id: "mgs6-mis3e",
|
|
149
|
+
match: { seriesStartsWith: "MIS3E" },
|
|
150
|
+
capacityKwh: 74.3,
|
|
151
|
+
basis: "usable",
|
|
152
|
+
usableCapacityKwh: 74.3,
|
|
153
|
+
source: "HA const.py/logic.py, ac4ac56 (LR/Dual Motor profile)"
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
id: "hs-phev-as33p",
|
|
157
|
+
match: { seriesStartsWith: "AS33P" },
|
|
158
|
+
capacityKwh: 23.2,
|
|
159
|
+
basis: "usable",
|
|
160
|
+
usableCapacityKwh: 23.2,
|
|
161
|
+
nominalCapacityKwh: 24.7,
|
|
162
|
+
source: "HA const.py/logic.py, ac4ac56 (24.7 kWh nominal noted)"
|
|
163
|
+
}
|
|
164
|
+
];
|
|
165
|
+
function resolveBatteryProfile(vehicle, profiles = batteryProfiles, region) {
|
|
166
|
+
const candidates = profiles.filter((profile) => matches(vehicle, profile.match, region));
|
|
167
|
+
if (!candidates.length) {
|
|
168
|
+
return void 0;
|
|
169
|
+
}
|
|
170
|
+
const highestPriority = Math.max(...candidates.map((profile) => {
|
|
171
|
+
var _a;
|
|
172
|
+
return (_a = profile.priority) != null ? _a : 0;
|
|
173
|
+
}));
|
|
174
|
+
const selected = candidates.filter((profile) => {
|
|
175
|
+
var _a;
|
|
176
|
+
return ((_a = profile.priority) != null ? _a : 0) === highestPriority;
|
|
177
|
+
});
|
|
178
|
+
const distinct = new Set(
|
|
179
|
+
selected.map(
|
|
180
|
+
(profile) => {
|
|
181
|
+
var _a, _b;
|
|
182
|
+
return `${profile.capacityKwh}:${profile.basis}:${(_a = profile.usableCapacityKwh) != null ? _a : ""}:${(_b = profile.nominalCapacityKwh) != null ? _b : ""}`;
|
|
183
|
+
}
|
|
184
|
+
)
|
|
185
|
+
);
|
|
186
|
+
return distinct.size === 1 ? selected[0] : void 0;
|
|
187
|
+
}
|
|
188
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
189
|
+
0 && (module.exports = {
|
|
190
|
+
batteryProfiles,
|
|
191
|
+
resolveBatteryProfile
|
|
192
|
+
});
|
|
193
|
+
//# sourceMappingURL=battery-profiles.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/battery-profiles.ts"],
|
|
4
|
+
"sourcesContent": ["import type { SaicVehicle } from './saic-client';\n\nexport type CapacityBasis = 'gross' | 'usable' | 'unknown';\n\n/** Declarative criteria for reliable battery variant identification. */\nexport interface BatteryProfileMatch {\n\t/** Exact vehicle series value, ignoring case and repeated whitespace. */\n\tseriesExact?: string;\n\t/** Required series prefix, ignoring case and repeated whitespace. */\n\tseriesStartsWith?: string;\n\t/** Required model-name prefix, ignoring case and repeated whitespace. */\n\tmodelNameStartsWith?: string;\n\t/** Required battery type from vehicle configuration or the direct field. */\n\tbType?: string;\n\t/** Required adapter backend region, ignoring case and surrounding whitespace. */\n\tregion?: string;\n}\n\n/** Internal battery capacity implementation detail. */\nexport interface BatteryProfile {\n\t/** Stable identifier for this profile. */\n\tid: string;\n\t/** All specified identity fields must match. */\n\tmatch: BatteryProfileMatch;\n\t/** Higher values take precedence over generic matching rules. */\n\tpriority?: number;\n\t/** Profile capacity in kWh. */\n\tcapacityKwh: number;\n\t/** Proven capacity basis; unknown is not presumed usable. */\n\tbasis: CapacityBasis;\n\t/** Explicit net capacity when the source provides it. */\n\tusableCapacityKwh?: number;\n\t/** Documented nominal counterpart that an API may report instead. */\n\tnominalCapacityKwh?: number;\n\t/** Evidence source and commit context. */\n\tsource: string;\n}\n\nconst normalized = (value: string | undefined): string =>\n\tvalue?.trim().replace(/\\s+/g, ' ').toLocaleUpperCase('en-US') ?? '';\nconst configValue = (vehicle: SaicVehicle, item: string): string | undefined =>\n\tvehicle.vehicleModelConfiguration?.find(entry => normalized(entry.itemCode) === item)?.itemValue;\nconst bType = (vehicle: SaicVehicle): string => normalized(configValue(vehicle, 'BTYPE') ?? vehicle.bType);\n\n/**\n * Check all declared profile identity fields without inferring missing values.\n *\n * @param vehicle Vehicle identity and available model configuration.\n * @param match Declarative criteria that must all match.\n * @param region Adapter backend region, when available.\n */\nfunction matches(vehicle: SaicVehicle, match: BatteryProfileMatch, region?: string): boolean {\n\treturn (\n\t\t(match.seriesExact === undefined || normalized(vehicle.series) === normalized(match.seriesExact)) &&\n\t\t(match.seriesStartsWith === undefined ||\n\t\t\tnormalized(vehicle.series).startsWith(normalized(match.seriesStartsWith))) &&\n\t\t(match.modelNameStartsWith === undefined ||\n\t\t\tnormalized(vehicle.modelName).startsWith(normalized(match.modelNameStartsWith))) &&\n\t\t(match.bType === undefined || bType(vehicle) === normalized(match.bType)) &&\n\t\t(match.region === undefined || normalized(region) === normalized(match.region))\n\t);\n}\n\n/**\n * Evidence-backed automatic profiles. Gateway values are not labeled gross/net;\n * HA values are explicitly usable where recorded as such.\n * Sources: https://github.com/SAIC-iSmart-API/saic-python-mqtt-gateway/blob/444b370a6b0eba4ed578535ac789d1d06a6b0c88/src/vehicle_info.py\n * and https://github.com/townsmcp/mg-saic-ha/blob/ac4ac56c25a45cfb106f9df2d9d306f225a4cbbf/custom_components/mg_saic/const.py\n * (with matching model logic in https://github.com/townsmcp/mg-saic-ha/blob/ac4ac56c25a45cfb106f9df2d9d306f225a4cbbf/custom_components/mg_saic/logic.py).\n */\nexport const batteryProfiles: readonly BatteryProfile[] = [\n\t{\n\t\tid: 'mg4-eh32mce-s',\n\t\tmatch: { seriesExact: 'EH32MCE S' },\n\t\tpriority: 20,\n\t\tcapacityKwh: 64,\n\t\tbasis: 'gross',\n\t\tusableCapacityKwh: 59.5,\n\t\tnominalCapacityKwh: 64,\n\t\tsource: 'User-confirmed: 64 kWh gross/nominal, 59.5 kWh usable',\n\t},\n\t{\n\t\tid: 'ep21-eu',\n\t\tmatch: { seriesExact: 'EP21', region: 'EU' },\n\t\tcapacityKwh: 69.9,\n\t\tbasis: 'usable',\n\t\tusableCapacityKwh: 69.9,\n\t\tsource: 'HA const.py; townsmcp/mg-saic-ha#374; EU owner report',\n\t},\n\t{\n\t\tid: 'mg4-eh32-x3',\n\t\tmatch: { seriesStartsWith: 'EH32', modelNameStartsWith: 'EH32 X3' },\n\t\tpriority: 10,\n\t\tcapacityKwh: 77,\n\t\tbasis: 'unknown',\n\t\tsource: 'SAIC gateway vehicle_info.py, 444b370',\n\t},\n\t{\n\t\tid: 'mg4-eh32-btype-1',\n\t\tmatch: { seriesStartsWith: 'EH32', bType: '1' },\n\t\tcapacityKwh: 64,\n\t\tbasis: 'unknown',\n\t\tsource: 'SAIC gateway vehicle_info.py, 444b370',\n\t},\n\t{\n\t\tid: 'mg4-eh32-btype-0',\n\t\tmatch: { seriesStartsWith: 'EH32', bType: '0' },\n\t\tcapacityKwh: 51,\n\t\tbasis: 'unknown',\n\t\tsource: 'SAIC gateway vehicle_info.py, 444b370',\n\t},\n\t{\n\t\tid: 'mg4-urban-ah4em-l',\n\t\tmatch: { seriesExact: 'AH4EM L' },\n\t\tcapacityKwh: 43,\n\t\tbasis: 'unknown',\n\t\tsource: 'SAIC gateway vehicle_info.py, 444b370',\n\t},\n\t{\n\t\tid: 'mg4-urban-ah4em-s',\n\t\tmatch: { seriesExact: 'AH4EM S' },\n\t\tcapacityKwh: 54,\n\t\tbasis: 'unknown',\n\t\tsource: 'SAIC gateway vehicle_info.py, 444b370',\n\t},\n\t{\n\t\tid: 'mgs5-mzs3e-btype-0',\n\t\tmatch: { seriesStartsWith: 'MZS3E', bType: '0' },\n\t\tcapacityKwh: 49,\n\t\tbasis: 'unknown',\n\t\tsource: 'SAIC gateway vehicle_info.py, 444b370',\n\t},\n\t{\n\t\tid: 'mgs5-mzs3e-btype-1',\n\t\tmatch: { seriesStartsWith: 'MZS3E', bType: '1' },\n\t\tcapacityKwh: 64,\n\t\tbasis: 'gross',\n\t\tusableCapacityKwh: 62.1,\n\t\tsource: 'HA const.py/logic.py, ac4ac56',\n\t},\n\t{\n\t\tid: 'mg5-ep2cp3',\n\t\tmatch: { seriesStartsWith: 'EP2CP3' },\n\t\tcapacityKwh: 50.3,\n\t\tbasis: 'unknown',\n\t\tsource: 'SAIC gateway vehicle_info.py, 444b370',\n\t},\n\t{\n\t\tid: 'mg5-ep2dp3',\n\t\tmatch: { seriesStartsWith: 'EP2DP3' },\n\t\tcapacityKwh: 61.1,\n\t\tbasis: 'unknown',\n\t\tsource: 'SAIC gateway vehicle_info.py, 444b370',\n\t},\n\t{\n\t\tid: 'zs-ev-btype-0',\n\t\tmatch: { seriesExact: 'ZS EV', bType: '0' },\n\t\tcapacityKwh: 49,\n\t\tbasis: 'unknown',\n\t\tsource: 'SAIC gateway vehicle_info.py, 444b370',\n\t},\n\t{\n\t\tid: 'zs-ev-btype-1',\n\t\tmatch: { seriesExact: 'ZS EV', bType: '1' },\n\t\tcapacityKwh: 68.3,\n\t\tbasis: 'unknown',\n\t\tsource: 'SAIC gateway vehicle_info.py, 444b370',\n\t},\n\t{\n\t\tid: 'cyberster-ec32',\n\t\tmatch: { seriesExact: 'EC32' },\n\t\tcapacityKwh: 72.5,\n\t\tbasis: 'usable',\n\t\tusableCapacityKwh: 72.5,\n\t\tnominalCapacityKwh: 77,\n\t\tsource: 'HA const.py/logic.py, ac4ac56 (77 kWh nominal noted)',\n\t},\n\t{\n\t\tid: 'mgs6-mis3e',\n\t\tmatch: { seriesStartsWith: 'MIS3E' },\n\t\tcapacityKwh: 74.3,\n\t\tbasis: 'usable',\n\t\tusableCapacityKwh: 74.3,\n\t\tsource: 'HA const.py/logic.py, ac4ac56 (LR/Dual Motor profile)',\n\t},\n\t{\n\t\tid: 'hs-phev-as33p',\n\t\tmatch: { seriesStartsWith: 'AS33P' },\n\t\tcapacityKwh: 23.2,\n\t\tbasis: 'usable',\n\t\tusableCapacityKwh: 23.2,\n\t\tnominalCapacityKwh: 24.7,\n\t\tsource: 'HA const.py/logic.py, ac4ac56 (24.7 kWh nominal noted)',\n\t},\n];\n\n/**\n * Select the highest-priority unambiguous profile for a vehicle.\n *\n * @param vehicle Vehicle identity and available model configuration.\n * @param profiles Candidate profile declarations.\n * @param region Adapter backend region, when available.\n */\nexport function resolveBatteryProfile(\n\tvehicle: SaicVehicle,\n\tprofiles: readonly BatteryProfile[] = batteryProfiles,\n\tregion?: string,\n): BatteryProfile | undefined {\n\tconst candidates = profiles.filter(profile => matches(vehicle, profile.match, region));\n\tif (!candidates.length) {\n\t\treturn undefined;\n\t}\n\tconst highestPriority = Math.max(...candidates.map(profile => profile.priority ?? 0));\n\tconst selected = candidates.filter(profile => (profile.priority ?? 0) === highestPriority);\n\tconst distinct = new Set(\n\t\tselected.map(\n\t\t\tprofile =>\n\t\t\t\t`${profile.capacityKwh}:${profile.basis}:${profile.usableCapacityKwh ?? ''}:${profile.nominalCapacityKwh ?? ''}`,\n\t\t),\n\t);\n\treturn distinct.size === 1 ? selected[0] : undefined;\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAsCA,MAAM,aAAa,CAAC,UAAmC;AAtCvD;AAuCC,8CAAO,OAAO,QAAQ,QAAQ,KAAK,kBAAkB,aAArD,YAAiE;AAAA;AAClE,MAAM,cAAc,CAAC,SAAsB,SAAkC;AAxC7E;AAyCC,6BAAQ,8BAAR,mBAAmC,KAAK,WAAS,WAAW,MAAM,QAAQ,MAAM,UAAhF,mBAAuF;AAAA;AACxF,MAAM,QAAQ,CAAC,YAA8B;AA1C7C;AA0CgD,qBA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