Skip to content

Commit c53cf55

Browse files
committed
Add Schneider kWh meter
1 parent ae26c5a commit c53cf55

File tree

6 files changed

+15
-5
lines changed

6 files changed

+15
-5
lines changed

SmartEVSE-3/include/main.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@
361361
#define EM_EASTRON1P 10
362362
#define EM_FINDER_7M 11
363363
#define EM_SINOTIMER 12
364-
#define EM_UNUSED_SLOT1 13
364+
#define EM_SCHNEIDER 13
365365
#define EM_UNUSED_SLOT2 14
366366
#define EM_UNUSED_SLOT3 15
367367
#define EM_UNUSED_SLOT4 16

SmartEVSE-3/src/glcd.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1225,13 +1225,13 @@ void GLCDMenu(uint8_t Buttons) {
12251225
case MENU_MAINSMETER:
12261226
do {
12271227
value = MenuNavInt(Buttons, value, MenuStr[LCDNav].Min, MenuStr[LCDNav].Max);
1228-
} while (value >= EM_UNUSED_SLOT1 && value <= EM_UNUSED_SLOT4);
1228+
} while (value >= EM_UNUSED_SLOT2 && value <= EM_UNUSED_SLOT4);
12291229
setItemValue(LCDNav, value);
12301230
break;
12311231
case MENU_EVMETER: // do not display the Sensorbox or unused slots here
12321232
do {
12331233
value = MenuNavInt(Buttons, value, MenuStr[LCDNav].Min, MenuStr[LCDNav].Max);
1234-
} while (value == EM_SENSORBOX || (value >= EM_UNUSED_SLOT1 && value <= EM_UNUSED_SLOT4));
1234+
} while (value == EM_SENSORBOX || (value >= EM_UNUSED_SLOT2 && value <= EM_UNUSED_SLOT4));
12351235
setItemValue(LCDNav, value);
12361236
break;
12371237
case MENU_WIFI:

SmartEVSE-3/src/main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2771,6 +2771,7 @@ void ModbusRequestLoop() {
27712771
case EM_EASTRON3P_INV:
27722772
case EM_ABB:
27732773
case EM_FINDER_7M:
2774+
case EM_SCHNEIDER:
27742775
updated = 0;
27752776
break;
27762777
default:

SmartEVSE-3/src/meter.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ struct EMstruct EMConfig[EM_CUSTOM + 1] = {
2020
{"InvEastrn", ENDIANESS_HBF_HWF, 4, MB_DATATYPE_FLOAT32, 0x0, 0, 0x6, 0, 0x34, 0, 0x48 , 0,0x4A , 0}, // Since Eastron SDM series are bidirectional, sometimes they are connected upsidedown, so positive current becomes negative etc.; Eastron SDM630 (V / A / W / kWh) max read count 80
2121
{"ABB", ENDIANESS_HBF_HWF, 3, MB_DATATYPE_INT32, 0x5B00, 1, 0x5B0C, 2, 0x5B14, 2, 0x5000, 2,0x5004, 2}, // ABB B23 212-100 (0.1V / 0.01A / 0.01W / 0.01kWh) RS485 wiring reversed / max read count 125
2222
{"SolarEdge", ENDIANESS_HBF_HWF, 3, MB_DATATYPE_INT16, 40196, 0, 40191, 0, 40206, 0, 40234, 3, 40226, 3}, // SolarEdge SunSpec (0.01V (16bit) / 0.1A (16bit) / 1W (16bit) / 1 Wh (32bit))
23-
{"WAGO", ENDIANESS_HBF_HWF, 3, MB_DATATYPE_FLOAT32, 0x5002, 0, 0x500C, 0, 0x5012, -3, 0x600C, 0,0x6018, 0}, // WAGO 879-30x0 (V / A / kW / kWh)//TODO maar WAGO heeft ook totaal
23+
{"WAGO", ENDIANESS_HBF_HWF, 3, MB_DATATYPE_FLOAT32, 0x5002, 0, 0x500C, 0, 0x5012,-3, 0x600C, 0,0x6018, 0}, // WAGO 879-30x0 (V / A / kW / kWh)//TODO maar WAGO heeft ook totaal
2424
{"API", ENDIANESS_HBF_HWF, 3, MB_DATATYPE_FLOAT32, 0x5002, 0, 0x500C, 0, 0x5012, 3, 0x6000, 0,0x6018, 0}, // WAGO 879-30x0 (V / A / kW / kWh)
2525
{"Eastron1P", ENDIANESS_HBF_HWF, 4, MB_DATATYPE_FLOAT32, 0x0, 0, 0x6, 0, 0x0C, 0, 0x48 , 0,0x4A , 0}, // Eastron SDM630 (V / A / W / kWh) max read count 80
2626
{"Finder 7M", ENDIANESS_HBF_HWF, 4, MB_DATATYPE_FLOAT32, 2500, 0, 2516, 0, 2536, 0, 2638, 3, 0, 0}, // Finder 7M.38.8.400.0212 (V / A / W / Wh) / Backlight 10173
2727
{"Sinotimer", ENDIANESS_HBF_HWF, 4, MB_DATATYPE_INT16, 0x0, 1, 0x3, 2, 0x8, 0, 0x0027, 2,0x0031, 2}, // Sinotimer DTS6619 (0.1V (16bit) / 0.01A (16bit) / 1W (16bit) / 1 Wh (32bit))
28-
{"Unused 1", ENDIANESS_LBF_LWF, 4, MB_DATATYPE_INT32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, // unused slot for future new meters
28+
{"Schneider", ENDIANESS_HBF_HWF, 3, MB_DATATYPE_FLOAT32, 0x0BD3, 0, 0x0BB7, 0, 0x0BF3,-3, 0xB02B, 0,0xB02D, 0}, // Schneider iEM3x5x series (V / A / kW / kWh) iEM3x50 counts only Energy Import, no Export
2929
{"Unused 2", ENDIANESS_LBF_LWF, 4, MB_DATATYPE_INT32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, // unused slot for future new meters
3030
{"Unused 3", ENDIANESS_LBF_LWF, 4, MB_DATATYPE_INT32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, // unused slot for future new meters
3131
{"Unused 4", ENDIANESS_LBF_LWF, 4, MB_DATATYPE_INT32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, // unused slot for future new meters
@@ -254,6 +254,9 @@ uint8_t Meter::receiveCurrentMeasurement(uint8_t *buf) {
254254
case EM_FINDER_7M:
255255
offset = 7u;
256256
break;
257+
case EM_SCHNEIDER:
258+
offset = 27u;
259+
break;
257260
}
258261
if (offset) { // this is one of the meters that has to measure power to determine current direction
259262
PowerMeasured = 0; // so we calculate PowerMeasured so we dont have to poll for this again

SmartEVSE-3/src/modbus.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,11 @@ void requestCurrentMeasurement(uint8_t Meter, uint8_t Address) {
363363
// Phase 1-3 power: Register 2530 - 2535 (signed)
364364
ModbusReadInputRequest(Address, 4, 2516, 20);
365365
break;
366+
case EM_SCHNEIDER:
367+
// Phase 1-3 current: Register 0x0BB7 - 0x0BBC (unsigned)
368+
// Phase 1-3 power: Register 0x0BED - 0x0BF2 (signed)
369+
ModbusReadInputRequest(Address, 3, 0x0BB7, 60);
370+
break;
366371
default:
367372
// Read 3 Current values
368373
requestMeasurement(Meter, Address, EMConfig[Meter].IRegister, 3);

docs/installation.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ The following meters are directly supported as Mains or EV meter:
1111
- ABB B23 212-100
1212
- Sinotimer DTS6619
1313
- WAGO 879-30x0
14+
- Schneider iEM3x5x
1415

1516
If your meter is not listed, you might be able to use the Custom option in the menu, that let's you enter each register manually.<br>
1617
Connect the A and B of your meter to the A and B terminals of the SmartEVSE.<br>

0 commit comments

Comments
 (0)