Skip to content

Commit e4baf94

Browse files
author
dingo35
committed
Add Schneider kWh meter
1 parent 6e39730 commit e4baf94

File tree

6 files changed

+16
-5
lines changed

6 files changed

+16
-5
lines changed

SmartEVSE-3/src/glcd.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1227,13 +1227,13 @@ void GLCDMenu(uint8_t Buttons) {
12271227
case MENU_MAINSMETER:
12281228
do {
12291229
value = MenuNavInt(Buttons, value, MenuStr[LCDNav].Min, MenuStr[LCDNav].Max);
1230-
} while (value >= EM_UNUSED_SLOT2 && value <= EM_UNUSED_SLOT4);
1230+
} while (value >= EM_UNUSED_SLOT3 && value <= EM_UNUSED_SLOT4);
12311231
setItemValue(LCDNav, value);
12321232
break;
12331233
case MENU_EVMETER: // do not display the Sensorbox, HomeWizard P1 or unused slots here
12341234
do {
12351235
value = MenuNavInt(Buttons, value, MenuStr[LCDNav].Min, MenuStr[LCDNav].Max);
1236-
} while (value == EM_SENSORBOX || value == EM_HOMEWIZARD_P1 || (value >= EM_UNUSED_SLOT2 && value <= EM_UNUSED_SLOT4));
1236+
} while (value == EM_SENSORBOX || value == EM_HOMEWIZARD_P1 || (value >= EM_UNUSED_SLOT3 && value <= EM_UNUSED_SLOT4));
12371237
setItemValue(LCDNav, value);
12381238
break;
12391239
case MENU_WIFI:

SmartEVSE-3/src/main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2269,6 +2269,7 @@ void ModbusRequestLoop() {
22692269
case EM_EASTRON3P_INV:
22702270
case EM_ABB:
22712271
case EM_FINDER_7M:
2272+
case EM_SCHNEIDER:
22722273
updated = 0;
22732274
break;
22742275
default:

SmartEVSE-3/src/meter.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,14 @@ struct EMstruct EMConfig[EM_CUSTOM + 1] = {
2222
{"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
2323
{"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
2424
{"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))
25-
{"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
25+
{"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
2626
{"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)
2727
{"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
2828
{"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
2929
{"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))
3030
{"HmWzrd P1", ENDIANESS_HBF_HWF, 0, MB_DATATYPE_INT16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, // Homewizard P1 - network connected
31-
{"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
31+
32+
{"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
3233
{"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
3334
{"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
3435
{"Custom", ENDIANESS_LBF_LWF, 4, MB_DATATYPE_INT32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} // Last entry!
@@ -267,6 +268,9 @@ uint8_t Meter::receiveCurrentMeasurement(ModBus MB) {
267268
case EM_FINDER_7M:
268269
offset = 7u;
269270
break;
271+
case EM_SCHNEIDER:
272+
offset = 27u;
273+
break;
270274
}
271275
if (offset) { // this is one of the meters that has to measure power to determine current direction
272276
PowerMeasured = 0; // so we calculate PowerMeasured so we dont have to poll for this again

SmartEVSE-3/src/meter.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
#define EM_FINDER_7M 11
4646
#define EM_SINOTIMER 12
4747
#define EM_HOMEWIZARD_P1 13
48-
#define EM_UNUSED_SLOT2 14
48+
#define EM_SCHNEIDER 14
4949
#define EM_UNUSED_SLOT3 15
5050
#define EM_UNUSED_SLOT4 16
5151
#define EM_CUSTOM 17

SmartEVSE-3/src/modbus.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -512,6 +512,11 @@ void requestCurrentMeasurement(uint8_t Meter, uint8_t Address) {
512512
// Phase 1-3 power: Register 2530 - 2535 (signed)
513513
ModbusReadInputRequest(Address, 4, 2516, 20);
514514
break;
515+
case EM_SCHNEIDER:
516+
// Phase 1-3 current: Register 0x0BB7 - 0x0BBC (unsigned)
517+
// Phase 1-3 power: Register 0x0BED - 0x0BF2 (signed)
518+
ModbusReadInputRequest(Address, 3, 0x0BB7, 60);
519+
break;
515520
default:
516521
// Read 3 Current values
517522
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)