Multiple meter
jsim20 opened this issue · 1 comments
I know this has been covered before, however it doesn't seem to be working in my case.
I'm trying to wire 3 meters in series. I've given the meters the addresses 001, 002, 003.
I've adapted the code to suit as per the guidance:
` Serial.print("Total usage 1: ");
Serial.print(sdm.readVal(SDM_TOTAL_ACTIVE_ENERGY), 0x01);
Serial.println("kWh");
Serial.print("Total usage 2: ");
Serial.print(sdm.readVal(SDM_TOTAL_ACTIVE_ENERGY), 0x02);
Serial.println("kWh");
Serial.print("Total usage 3: ");
Serial.print(sdm.readVal(SDM_TOTAL_ACTIVE_ENERGY), 0x03);
Serial.println("kWh");`
What's very strange is that it just seems to be taking the reading off meter 1. However changing the meter address from 1, 2, 3, instead just seems to be changing the precision of the meter reading of meter 1....!
08:23:14.456 -> Total usage 1: 4.9kWh
08:23:14.951 -> Total usage 2: 4.85kWh
08:23:15.479 -> Total usage 3: 4.853kWh
Can anyone help?
....complete rooky mistake my apologies:
Serial.print("Total usage 1: ");
Serial.print(sdm.readVal(SDM_TOTAL_ACTIVE_ENERGY, 0x01), 1);
Serial.println("kWh");