Skip to content

Commit

Permalink
Process "FWE" and use "mdi:electric-switch" for relay state
Browse files Browse the repository at this point in the history
  • Loading branch information
SW-Niko committed Nov 18, 2024
1 parent dfb9edd commit 48c00d9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions lib/VeDirectFrameHandler/VeDirectFrameHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,13 @@ void VeDirectFrameHandler<T>::processTextData(std::string const& name, std::stri
return;
}

// According "VE.Direct-Protocol-3.33.pdf" for "Phoenix Charger" and "Smart BuckBoost".
// But it seems also some MPPT deliver FWE.
if (name == "FWE") {
_msgOut->printf("%s FWE ignored. We use FE to process the firmware version (value '%s')\r\n", _logId, value.c_str());
return;
}

if (name == "V") {
_tmpFrame.batteryVoltage_V_mV = atol(value.c_str());
return;
Expand Down
2 changes: 1 addition & 1 deletion src/MqttHandleVedirectHass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ void MqttHandleVedirectHassClass::publishConfig()

// optional info, provided only if the charge controller delivers the information
if (optMpptData->relayState_RELAY.first != 0) {
publishBinarySensor("MPPT error relay state", "mdi:export", "RELAY", "ON", "OFF", *optMpptData);
publishBinarySensor("MPPT error relay state", "mdi:electric-switch", "RELAY", "ON", "OFF", *optMpptData);
}
if (optMpptData->loadOutputState_LOAD.first != 0) {
publishBinarySensor("MPPT load output state", "mdi:export", "LOAD", "ON", "OFF", *optMpptData);
Expand Down

0 comments on commit 48c00d9

Please sign in to comment.