Update inverter and battery values

master
Simon Stürz 2023-10-25 16:00:40 +02:00
parent eae2cbe0ee
commit 6da23c80d6
2 changed files with 7 additions and 4 deletions

View File

@ -251,9 +251,13 @@ void IntegrationPluginSolax::setupThing(ThingSetupInfo *info)
}
// Update inverter states
thing->setStateValue(solaxInverterTcpCurrentPowerStateTypeId, -solaxConnection->inverterPower());
thing->setStateValue(solaxInverterTcpCurrentStateTypeId, -solaxConnection->inverterCurrent());
thing->setStateValue(solaxInverterTcpCurrentVoltageStateTypeId, solaxConnection->inverterVoltage());
int inverterPower = solaxConnection->powerDc1() + solaxConnection->powerDc1();
int inverterVoltage = solaxConnection->pvVoltage1() + solaxConnection->pvVoltage2();
int inverterCurrent = solaxConnection->pvCurrent1() + solaxConnection->pvCurrent2();
thing->setStateValue(solaxInverterTcpCurrentPowerStateTypeId, -inverterPower);
thing->setStateValue(solaxInverterTcpCurrentStateTypeId, -inverterCurrent);
thing->setStateValue(solaxInverterTcpCurrentVoltageStateTypeId, inverterVoltage);
thing->setStateValue(solaxInverterTcpTemperatureStateTypeId, solaxConnection->temperature());
thing->setStateValue(solaxInverterTcpFrequencyStateTypeId, solaxConnection->inverterFrequency());
thing->setStateValue(solaxInverterTcpTotalEnergyProducedStateTypeId, solaxConnection->totalEnergyProduced());

View File

@ -305,7 +305,6 @@
"description": "Battery power (Charge 1)",
"unit": "W",
"defaultValue": "0",
"staticScaleFactor": -1,
"access": "RO"
},
{