mirror of
https://github.com/UtilitechAS/amsreader-firmware.git
synced 2026-01-16 08:43:13 +00:00
Fixing missing OBIS in enum, adding clock to test project
This commit is contained in:
parent
dfb80cfc65
commit
7e697f27bb
@ -71,12 +71,16 @@ enum class Kamstrup_List2
|
||||
VoltageL2,
|
||||
VoltageL3_OBIS,
|
||||
VoltageL3,
|
||||
MeterClock_OBIS,
|
||||
MeterClock,
|
||||
CumulativeActiveImportEnergy_OBIS,
|
||||
CumulativeActiveImportEnergy,
|
||||
CumulativeActiveExportEnergy_OBIS,
|
||||
CumulativeActiveExportEnergy,
|
||||
CumulativeReactiveImportEnergy_OBIS,
|
||||
CumulativeReactiveImportEnergy,
|
||||
CumulativeReactiveExportEnergy_OBIS,
|
||||
CumulativeReactiveExportEnergy
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -71,15 +71,15 @@ void loop() {
|
||||
if (hanReader.read(samples[sampleIndex++]))
|
||||
{
|
||||
// Get the list identifier
|
||||
int list = hanReader.getList();
|
||||
int listSize = hanReader.getListSize();
|
||||
|
||||
Serial.println("");
|
||||
Serial.print("List #");
|
||||
Serial.print((byte)list, HEX);
|
||||
Serial.print("List size: ");
|
||||
Serial.print(listSize);
|
||||
Serial.print(": ");
|
||||
|
||||
// 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);
|
||||
Serial.println(id);
|
||||
@ -114,6 +114,12 @@ void loop() {
|
||||
Serial.println(" A)");
|
||||
}
|
||||
|
||||
if (listSize == (int)Kamstrup::List2)
|
||||
{
|
||||
time_t clock = hanReader.getTime((int)Kamstrup_List2::MeterClock);
|
||||
Serial.print("Clock is: ");
|
||||
Serial.println(clock);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user