Merge PR #439: Rework smartmeter interfaces
This commit is contained in:
commit
61b411a180
81
libnymea/interfaces/energymeter.json
Normal file
81
libnymea/interfaces/energymeter.json
Normal file
@ -0,0 +1,81 @@
|
||||
{
|
||||
"description": "Energy meters measure electric power consumption/production on 3 phases. Often used as root measurements.",
|
||||
"extends": [ "smartmeterconsumer", "smartmeterproducer" ],
|
||||
"states": [
|
||||
{
|
||||
"name": "energyConsumedPhaseA",
|
||||
"type": "double",
|
||||
"unit": "KiloWattHour"
|
||||
},
|
||||
{
|
||||
"name": "energyConsumedPhaseB",
|
||||
"type": "double",
|
||||
"unit": "KiloWattHour"
|
||||
},
|
||||
{
|
||||
"name": "energyConsumedPhaseC",
|
||||
"type": "double",
|
||||
"unit": "KiloWattHour"
|
||||
},
|
||||
{
|
||||
"name": "energyProducedPhaseA",
|
||||
"type": "double",
|
||||
"unit": "KiloWattHour"
|
||||
},
|
||||
{
|
||||
"name": "energyProducedPhaseB",
|
||||
"type": "double",
|
||||
"unit": "KiloWattHour"
|
||||
},
|
||||
{
|
||||
"name": "energyProducedPhaseC",
|
||||
"type": "double",
|
||||
"unit": "KiloWattHour"
|
||||
},
|
||||
{
|
||||
"name": "currentPowerPhaseA",
|
||||
"type": "double",
|
||||
"unit": "Watt"
|
||||
},
|
||||
{
|
||||
"name": "currentPowerPhaseB",
|
||||
"type": "double",
|
||||
"unit": "Watt"
|
||||
},
|
||||
{
|
||||
"name": "currentPowerPhaseC",
|
||||
"type": "double",
|
||||
"unit": "Watt"
|
||||
},
|
||||
{
|
||||
"name": "currentPhaseA",
|
||||
"type": "double",
|
||||
"unit": "Ampere"
|
||||
},
|
||||
{
|
||||
"name": "currentPhaseB",
|
||||
"type": "double",
|
||||
"unit": "Ampere"
|
||||
},
|
||||
{
|
||||
"name": "currentPhaseC",
|
||||
"type": "double",
|
||||
"unit": "Ampere"
|
||||
},
|
||||
{
|
||||
"name": "voltagePhaseA",
|
||||
"type": "double",
|
||||
"unit": "Volt"
|
||||
},
|
||||
{
|
||||
"name": "voltagePhaseB",
|
||||
"type": "double",
|
||||
"unit": "Volt"
|
||||
},
|
||||
{
|
||||
"name": "voltagePhaseC",
|
||||
"type": "double",
|
||||
"unit": "Volt"
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -1,12 +0,0 @@
|
||||
{
|
||||
"description": "Like smartmeterconsumer, but instead of only providing total consumed energy, this also supports retrieving the current power demand rate. Note that currentPower is negative for consumers but might also be positive if a device implements consumer and producer and currently produces more than it consumes.",
|
||||
"extends": "smartmeterconsumer",
|
||||
"states": [
|
||||
{
|
||||
"name": "currentPower",
|
||||
"type": "double",
|
||||
"unit": "Watt",
|
||||
"logged": true
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -56,11 +56,10 @@
|
||||
<file>extendedshutter.json</file>
|
||||
<file>smartlock.json</file>
|
||||
<file>system.json</file>
|
||||
<file>smartmeter.json</file>
|
||||
<file>smartmeterconsumer.json</file>
|
||||
<file>smartmeterproducer.json</file>
|
||||
<file>smartmeter.json</file>
|
||||
<file>extendedsmartmeterconsumer.json</file>
|
||||
<file>extendedsmartmeterproducer.json</file>
|
||||
<file>energymeter.json</file>
|
||||
<file>accesscontrol.json</file>
|
||||
<file>fingerprintreader.json</file>
|
||||
<file>useraccesscontrol.json</file>
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
{
|
||||
"description": "This interface is used for things that can monitor energy consumption/production. This interface is the base for smartmeter things. Actual things will most likely want to use one of the extending interfaces like smartmeterconsumer and/or smartmeterproducer instead."
|
||||
"description": "Base interface for things that can monitor energy consumption/production."
|
||||
}
|
||||
|
||||
@ -1,11 +1,18 @@
|
||||
{
|
||||
"description": "A smartmeterproducer can monitor total energy consumed by this thing.",
|
||||
"description": "This interface is used for things that can monitor energy consumption. At least the grand total of the consumer energy is provided, optionally live monitoring of the current usage may be available.",
|
||||
"extends": "smartmeter",
|
||||
"states": [
|
||||
{
|
||||
"name": "totalEnergyConsumed",
|
||||
"type": "double",
|
||||
"unit": "KiloWattHour"
|
||||
},
|
||||
{
|
||||
"name": "currentPower",
|
||||
"type": "double",
|
||||
"unit": "Watt",
|
||||
"optional": true,
|
||||
"logged": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@ -1,10 +1,18 @@
|
||||
{
|
||||
"description": "A smartmeterproducer can monitor total energy produced by this thing.",
|
||||
"description": "This interface is used for things that can monitor energy production. At least the grand total of the returned energy is provided, optionally live monitoring of the current production may be available. Please note that currentPower is always from a consumer perspective. Thus it will be a negative value for producing devices.",
|
||||
"extends": "smartmeter",
|
||||
"states": [
|
||||
{
|
||||
"name": "totalEnergyProduced",
|
||||
"type": "double"
|
||||
"type": "double",
|
||||
"unit": "KiloWattHour"
|
||||
},
|
||||
{
|
||||
"name": "currentPower",
|
||||
"type": "double",
|
||||
"unit": "Watt",
|
||||
"optional": true,
|
||||
"logged": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user