mirror of
https://github.com/UtilitechAS/amsreader-firmware.git
synced 2026-05-01 05:59:24 +00:00
Fixing missing OBIS in enum, adding clock to test project
This commit is contained in:
@@ -71,12 +71,16 @@ enum class Kamstrup_List2
|
|||||||
VoltageL2,
|
VoltageL2,
|
||||||
VoltageL3_OBIS,
|
VoltageL3_OBIS,
|
||||||
VoltageL3,
|
VoltageL3,
|
||||||
|
MeterClock_OBIS,
|
||||||
MeterClock,
|
MeterClock,
|
||||||
|
CumulativeActiveImportEnergy_OBIS,
|
||||||
CumulativeActiveImportEnergy,
|
CumulativeActiveImportEnergy,
|
||||||
|
CumulativeActiveExportEnergy_OBIS,
|
||||||
CumulativeActiveExportEnergy,
|
CumulativeActiveExportEnergy,
|
||||||
|
CumulativeReactiveImportEnergy_OBIS,
|
||||||
CumulativeReactiveImportEnergy,
|
CumulativeReactiveImportEnergy,
|
||||||
|
CumulativeReactiveExportEnergy_OBIS,
|
||||||
CumulativeReactiveExportEnergy
|
CumulativeReactiveExportEnergy
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -71,15 +71,15 @@ void loop() {
|
|||||||
if (hanReader.read(samples[sampleIndex++]))
|
if (hanReader.read(samples[sampleIndex++]))
|
||||||
{
|
{
|
||||||
// Get the list identifier
|
// Get the list identifier
|
||||||
int list = hanReader.getList();
|
int listSize = hanReader.getListSize();
|
||||||
|
|
||||||
Serial.println("");
|
Serial.println("");
|
||||||
Serial.print("List #");
|
Serial.print("List size: ");
|
||||||
Serial.print((byte)list, HEX);
|
Serial.print(listSize);
|
||||||
Serial.print(": ");
|
Serial.print(": ");
|
||||||
|
|
||||||
// Only care for the ACtive Power Imported, which is found in the first list
|
// Only care for the ACtive Power Imported, which is found in the first list
|
||||||
if (list == (int)Kamstrup::List1 || list == (int)Kamstrup::List2)
|
if (listSize == (int)Kamstrup::List1 || listSize == (int)Kamstrup::List2)
|
||||||
{
|
{
|
||||||
String id = hanReader.getString((int)Kamstrup_List1::ListVersionIdentifier);
|
String id = hanReader.getString((int)Kamstrup_List1::ListVersionIdentifier);
|
||||||
Serial.println(id);
|
Serial.println(id);
|
||||||
@@ -114,6 +114,12 @@ void loop() {
|
|||||||
Serial.println(" A)");
|
Serial.println(" A)");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (listSize == (int)Kamstrup::List2)
|
||||||
|
{
|
||||||
|
time_t clock = hanReader.getTime((int)Kamstrup_List2::MeterClock);
|
||||||
|
Serial.print("Clock is: ");
|
||||||
|
Serial.println(clock);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user