Merge PR #145: New plugin: Solax
commit
b260c6d428
|
|
@ -251,9 +251,13 @@ void IntegrationPluginSolax::setupThing(ThingSetupInfo *info)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update inverter states
|
// Update inverter states
|
||||||
thing->setStateValue(solaxInverterTcpCurrentPowerStateTypeId, -solaxConnection->inverterPower());
|
|
||||||
thing->setStateValue(solaxInverterTcpCurrentStateTypeId, -solaxConnection->inverterCurrent());
|
int inverterPower = solaxConnection->powerDc1() + solaxConnection->powerDc1();
|
||||||
thing->setStateValue(solaxInverterTcpCurrentVoltageStateTypeId, solaxConnection->inverterVoltage());
|
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(solaxInverterTcpTemperatureStateTypeId, solaxConnection->temperature());
|
||||||
thing->setStateValue(solaxInverterTcpFrequencyStateTypeId, solaxConnection->inverterFrequency());
|
thing->setStateValue(solaxInverterTcpFrequencyStateTypeId, solaxConnection->inverterFrequency());
|
||||||
thing->setStateValue(solaxInverterTcpTotalEnergyProducedStateTypeId, solaxConnection->totalEnergyProduced());
|
thing->setStateValue(solaxInverterTcpTotalEnergyProducedStateTypeId, solaxConnection->totalEnergyProduced());
|
||||||
|
|
|
||||||
|
|
@ -305,7 +305,6 @@
|
||||||
"description": "Battery power (Charge 1)",
|
"description": "Battery power (Charge 1)",
|
||||||
"unit": "W",
|
"unit": "W",
|
||||||
"defaultValue": "0",
|
"defaultValue": "0",
|
||||||
"staticScaleFactor": -1,
|
|
||||||
"access": "RO"
|
"access": "RO"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue