Adaptations for new sensors

This commit is contained in:
Gunnar Skjold
2024-01-06 20:10:33 +01:00
parent 333169ef8f
commit 8a59fcb89a
7 changed files with 52 additions and 22 deletions

View File

@@ -107,22 +107,22 @@ bool RawMqttHandler::publishList4(AmsData* data, AmsData* meterState) {
mqtt.publish(topic + "/meter/export/l3", String(data->getL3ActiveExportPower(), 2));
}
if(full || meterState->getL1ActiveImportCounter() != data->getL1ActiveImportCounter()) {
mqtt->publish(topic + "/meter/import/l1/accumulated", String(data->getL1ActiveImportCounter(), 2));
mqtt.publish(topic + "/meter/import/l1/accumulated", String(data->getL1ActiveImportCounter(), 2));
}
if(full || meterState->getL2ActiveImportCounter() != data->getL2ActiveImportCounter()) {
mqtt->publish(topic + "/meter/import/l2/accumulated", String(data->getL2ActiveImportCounter(), 2));
mqtt.publish(topic + "/meter/import/l2/accumulated", String(data->getL2ActiveImportCounter(), 2));
}
if(full || meterState->getL3ActiveImportCounter() != data->getL3ActiveImportCounter()) {
mqtt->publish(topic + "/meter/import/l3/accumulated", String(data->getL3ActiveImportCounter(), 2));
mqtt.publish(topic + "/meter/import/l3/accumulated", String(data->getL3ActiveImportCounter(), 2));
}
if(full || meterState->getL1ActiveExportCounter() != data->getL1ActiveExportCounter()) {
mqtt->publish(topic + "/meter/export/l1/accumulated", String(data->getL1ActiveExportCounter(), 2));
mqtt.publish(topic + "/meter/export/l1/accumulated", String(data->getL1ActiveExportCounter(), 2));
}
if(full || meterState->getL2ActiveExportCounter() != data->getL2ActiveExportCounter()) {
mqtt->publish(topic + "/meter/export/l2/accumulated", String(data->getL2ActiveExportCounter(), 2));
mqtt.publish(topic + "/meter/export/l2/accumulated", String(data->getL2ActiveExportCounter(), 2));
}
if(full || meterState->getL3ActiveExportCounter() != data->getL3ActiveExportCounter()) {
mqtt->publish(topic + "/meter/export/l3/accumulated", String(data->getL3ActiveExportCounter(), 2));
mqtt.publish(topic + "/meter/export/l3/accumulated", String(data->getL3ActiveExportCounter(), 2));
}
if(full || meterState->getPowerFactor() != data->getPowerFactor()) {
mqtt.publish(topic + "/meter/powerfactor", String(data->getPowerFactor(), 2));