Class EnergyData
[Obfuscation(Exclude = true, ApplyToMembers = true)]
[Serializable]
public class EnergyData
Inheritance
Inherited Members
Namespace: HomeSeer.PluginSdk.Energy
Assembly: PluginSdk.dll
PLEASE NOTE: Code related to the Energy components in HomeSeer were ported from the HS3 plugin API and have not been fully tested to verify full functionality from the new SDK. The Energy API may undergo significant changes in the near future. Please use with caution.
Constructors
View SourceEnergyData(Constants.enumEnergyDirection)
Declaration
public EnergyData(Constants.enumEnergyDirection consumedOrProduced)
Parameters
Type | Name | Description |
---|---|---|
Constants.enumEnergyDirection | consumedOrProduced |
Fields
View SourceAmount
Always measured in Watts
Declaration
public double Amount
Field Value
Type | Description |
---|---|
System.Double |
Amount_End
The end of the time period this measurement is for.
Declaration
public DateTime Amount_End
Field Value
Type | Description |
---|---|
System.DateTime |
Amount_Start
The start of the time period this measurement is for.
Declaration
public DateTime Amount_Start
Field Value
Type | Description |
---|---|
System.DateTime |
Device
Indicates the type of device.
Declaration
public Constants.enumEnergyDevice Device
Field Value
Type | Description |
---|---|
Constants.enumEnergyDevice |
Direction
Indicates whether the energy was consumed (used) or produced (created).
Declaration
public Constants.enumEnergyDirection Direction
Field Value
Type | Description |
---|---|
Constants.enumEnergyDirection |
Duration
When the data is compacted, time periods missed (perhaps HS was shut down) end up having the actual amounts averaged across the missing time period.
For example, if you log 500W at 1:00PM through 1:05PM, then HS was shut down for 5 minutes, then log 500W from 1:10PM through 1:15PM, then when data compaction happens and the records are consolidated, the only thing that could happen is to show 1000W from 1:00PM through 1:15PM, which is accurate, but does not provide evidence of the fact that there was a 5 minute period when data was not collected. Furthermore, calculations of the COST which must include the time to get to kWh will be adversely affected (more for electricity produced than consumed!). This duration field takes care of that NOT by providing any record of the missing periods, but by at least keeping track of the total time within the consolidated (compacted) record which only reflects the start period and end period.
Declaration
public long Duration
Field Value
Type | Description |
---|---|
System.Int64 |
dvRef
Device reference ID number for the device this energy data is for.
Declaration
public int dvRef
Field Value
Type | Description |
---|---|
System.Int32 |
ID
Declaration
public int ID
Field Value
Type | Description |
---|---|
System.Int32 |
Rate
Always measured in kWH
Declaration
public float Rate
Field Value
Type | Description |
---|---|
System.Single |
UserCode
For the user to indicate something about this reading.
Declaration
public int UserCode
Field Value
Type | Description |
---|---|
System.Int32 |