From b3576ae278bd59f7a54e6c4dd0d64978c4300d13 Mon Sep 17 00:00:00 2001 From: Michael Zanetti Date: Thu, 23 Sep 2021 14:56:15 +0200 Subject: [PATCH] Adjust to latest evcharger and energystorage interfaces --- sunspec/integrationpluginsunspec.json | 4 ++-- sunspec/solaredgebattery.cpp | 2 +- wallbe/integrationpluginwallbe.json | 19 +++++++++++++++++++ 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/sunspec/integrationpluginsunspec.json b/sunspec/integrationpluginsunspec.json index 60cee95..6b54c7f 100644 --- a/sunspec/integrationpluginsunspec.json +++ b/sunspec/integrationpluginsunspec.json @@ -1551,11 +1551,11 @@ }, { "id": "7ac7ccd1-b5d1-488b-a99b-98ef000b7d03", - "name": "availableEnergy", + "name": "capacity", "displayName": "Available energy", "displayNameEvent": "Available energy changed", "type": "double", - "unit": "Watt", + "unit": "KiloWattHour", "defaultValue": 0.00 }, { diff --git a/sunspec/solaredgebattery.cpp b/sunspec/solaredgebattery.cpp index 8b8b113..e0e5441 100644 --- a/sunspec/solaredgebattery.cpp +++ b/sunspec/solaredgebattery.cpp @@ -240,7 +240,7 @@ void SolarEdgeBattery::onBlockDataUpdated() m_thing->setStateValue(solarEdgeBatteryInstantaneousCurrentStateTypeId, m_batteryData.instantaneousCurrent); m_thing->setStateValue(solarEdgeBatteryCurrentPowerStateTypeId, m_batteryData.instantaneousPower); m_thing->setStateValue(solarEdgeBatteryMaxEnergyStateTypeId, m_batteryData.maxEnergy); - m_thing->setStateValue(solarEdgeBatteryAvailableEnergyStateTypeId, m_batteryData.availableEnergy); + m_thing->setStateValue(solarEdgeBatteryCapacityStateTypeId, m_batteryData.availableEnergy); m_thing->setStateValue(solarEdgeBatteryStateOfHealthStateTypeId, m_batteryData.stateOfHealth); m_thing->setStateValue(solarEdgeBatteryVersionStateTypeId, m_batteryData.firmwareVersion); } diff --git a/wallbe/integrationpluginwallbe.json b/wallbe/integrationpluginwallbe.json index 83608f0..e968af2 100644 --- a/wallbe/integrationpluginwallbe.json +++ b/wallbe/integrationpluginwallbe.json @@ -96,6 +96,25 @@ "name": "firmwareVersion", "type": "QString", "defaultValue": "" + }, + { + "id": "9198152b-deb4-413a-86ce-b01231c11d44", + "name": "totalEnergyConsumed", + "displayName": "TODO! Total consumed energy", + "displayNameEvent": "Total consumed energy changed", + "type": "double", + "unit": "KiloWattHour", + "defaultValue": 0 + }, + { + "id": "74523f7e-5d63-4e01-a64d-e3aa35358f6a", + "name": "currentPower", + "displayName": "TODO! Current power usage", + "displayNameEvent": "Current power usage changed", + "type": "double", + "unit": "Watt", + "defaultValue": 0, + "filter": "adaptive" } ] }