Skip to content

Commit

Permalink
VE.Direct MPPT MQTT: publish P, IPV and E to MQTT
Browse files Browse the repository at this point in the history
those values are calculated by OpenDTU-OnBatery and are part of the web
application live view, but were previously not published through MQTT.

closes hoylabs#376.
  • Loading branch information
schlimmchen committed Oct 3, 2023
1 parent 244df6f commit 56276b6
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/MqttHandleVedirect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,26 @@ void MqttHandleVedirectClass::loop()
value = VeDirectMppt.veFrame.I;
MqttSettings.publish(topic + "I", value);
}
if (_PublishFull || VeDirectMppt.veFrame.P != _kvFrame.P) {
value = VeDirectMppt.veFrame.P;
MqttSettings.publish(topic + "P", value);
}
if (_PublishFull || VeDirectMppt.veFrame.VPV != _kvFrame.VPV) {
value = VeDirectMppt.veFrame.VPV;
MqttSettings.publish(topic + "VPV", value);
}
if (_PublishFull || VeDirectMppt.veFrame.IPV != _kvFrame.IPV) {
value = VeDirectMppt.veFrame.IPV;
MqttSettings.publish(topic + "IPV", value);
}
if (_PublishFull || VeDirectMppt.veFrame.PPV != _kvFrame.PPV) {
value = VeDirectMppt.veFrame.PPV;
MqttSettings.publish(topic + "PPV", value);
}
if (_PublishFull || VeDirectMppt.veFrame.E != _kvFrame.E) {
value = VeDirectMppt.veFrame.E;
MqttSettings.publish(topic + "E", value);
}
if (_PublishFull || VeDirectMppt.veFrame.H19 != _kvFrame.H19) {
value = VeDirectMppt.veFrame.H19;
MqttSettings.publish(topic + "H19", value);
Expand Down

0 comments on commit 56276b6

Please sign in to comment.