diff --git a/libnymea/interfaces/charger.json b/libnymea/interfaces/charger.json new file mode 100644 index 00000000..8f08d687 --- /dev/null +++ b/libnymea/interfaces/charger.json @@ -0,0 +1,11 @@ +{ + "description": "An interface for chargers such as AC / DC electrical vehicle chargers. Extends the power interface for charging/not charging an electric vehicle.", + "extends": ["power"], + "states": [ + { + "name": "pluggedIn", + "type": "bool", + "optional": true + } + ] +} diff --git a/libnymea/interfaces/energystorage.json b/libnymea/interfaces/energystorage.json index 1670e974..fa17d8f8 100644 --- a/libnymea/interfaces/energystorage.json +++ b/libnymea/interfaces/energystorage.json @@ -1,5 +1,5 @@ { - "description": "Interfaces for devices that store electrical energy and can return it at a later point, such as batteries. The currentPower state follows the usual convention that positive is 'consumed' energy and negative values represent 'produced' or in this case 'returned' energy.", + "description": "Interfaces for devices that store electrical energy such as batteries. The 'currentPower' state represents the AC measurement and follows the usual convention that positive is 'consumed' energy and negative values represent 'produced' or in this case 'returned' energy.", "extends": ["battery", "smartmeter"], "states": [ { @@ -11,7 +11,8 @@ { "name": "capacity", "type": "double", - "unit": "KiloWattHour" + "unit": "KiloWattHour", + "optional": true } ] } diff --git a/libnymea/interfaces/evcharger.json b/libnymea/interfaces/evcharger.json index 680f166b..80375886 100644 --- a/libnymea/interfaces/evcharger.json +++ b/libnymea/interfaces/evcharger.json @@ -1,6 +1,6 @@ { - "description": "An EV-charger. Extends the power interface for charging/not charging an electric vehicle. Supports regulation of the max. charging current in addition to be powered on or off.", - "extends": ["power"], + "description": "An AC electrical vehicle charger. Supports regulation of the max. charging current in addition to be powered on or off. Phase switching, if available, can be performed by setting the desired phase count. The session energy can provide information how much energy has been charged since the car has been plugged in.", + "extends": ["charger"], "states": [ { "name": "maxChargingCurrent", @@ -10,11 +10,6 @@ "minValue": "any", "maxValue": "any" }, - { - "name": "pluggedIn", - "type": "bool", - "optional": true - }, { "name": "charging", "type": "bool", diff --git a/libnymea/interfaces/evchargerdc.json b/libnymea/interfaces/evchargerdc.json new file mode 100644 index 00000000..483ac77a --- /dev/null +++ b/libnymea/interfaces/evchargerdc.json @@ -0,0 +1,4 @@ +{ + "description": "A DC electrical vehicle charger. .", + "extends": ["charger", "extendedenergystorage"] +} diff --git a/libnymea/interfaces/extendedenergystorage.json b/libnymea/interfaces/extendedenergystorage.json new file mode 100644 index 00000000..27ec7374 --- /dev/null +++ b/libnymea/interfaces/extendedenergystorage.json @@ -0,0 +1,56 @@ +{ + "description": "An extended energy storage can be controlled using the charging power. The 'chargingPower' state follows the usual convention that a positive value is charging (consuming) energy and a negative value discharging (returning) energy. Usualy there are limits for min/max charging and discharging. The limit values must have the same sign as the charging/discharging signs (+ charging, - discharging). The 'chargingCapabilities' indicate how the energystorage can be used and must be set.", + "extends": ["energystorage"], + "states": [ + { + "name": "chargingPower", + "type": "double", + "unit": "Watt", + "writable": true, + "logged": true + }, + { + "name": "chargingCapabilities", + "type": "QString", + "allowedValues": ["charging", "discharging", "bidirectional"] + }, + { + "name": "maxChargingPower", + "type": "double", + "unit": "Watt", + "logged": false + }, + { + "name": "minChargingPower", + "type": "double", + "unit": "Watt", + "logged": false + }, + { + "name": "maxDischargingPower", + "type": "double", + "unit": "Watt", + "logged": false + }, + { + "name": "minDischargingPower", + "type": "double", + "unit": "Watt", + "logged": false + }, + { + "name": "totalEnergyConsumed", + "type": "double", + "unit": "KiloWattHour", + "optional": true, + "logged": true + }, + { + "name": "totalEnergyProduced", + "type": "double", + "unit": "KiloWattHour", + "optional": true, + "logged": true + } + ] +} diff --git a/libnymea/interfaces/interfaces.qrc b/libnymea/interfaces/interfaces.qrc index 562fc4ce..cbad80b9 100644 --- a/libnymea/interfaces/interfaces.qrc +++ b/libnymea/interfaces/interfaces.qrc @@ -101,5 +101,8 @@ firesensor.json childlock.json networkdevice.json + extendedenergystorage.json + charger.json + evchargerdc.json