Dave's video prompted me to fix a couple of bugs in the Arduino code used to gather my import/export/solar inverter data..............narrowed it down to the following snippet......can spot the two typos?....DUH!
// Determine Import / Export Power / Consumption
// Importing
if ( DataMeterPwr > 0) { // If > 0 then must be importing from grid
DataImportPwr = DataMeterPwr;
DataExportPwr = 0; // Force to zero
DataConsumptionPwr = DataGenPwr + DataImportPwr; // Actual consumption when importing is generation power + import power
}
// Exporting
if ( DataMeterPwr < 0) { // If < 0 then must be exporting to grid
DataExportPwr = DataMeterPwr * -1; // make positive - could use ABS() function I suppose
DataImportPwr = 0; // Force to zero
DataConsumptionPwr = DataGenPwr = DataExportPwr; // Actual consumption when exporting is generation power - export power
}
// Neither Importing or Exporting
if ( DataMeterPwr = 0) { // If neither exporting or importing then either house consuming nothing, or the solar gen power is exactly matching what is being consumed (highly doubtful)
DataImportPwr = 0; // Force to zero
DataExportPwr = 0; // Force to zero
if (DataGenPwr == 0) {
DataConsumptionPwr = 0; // Solar gen is zero also so consumption must be zero
} else {
DataConsumptionPwr = DataGenPwr; // Consumption must be exactly matching generation
}
}