Search Results for

    Show / Hide Table of Contents

    Class EnergyData

    • C#
    • Visual Basic
    [Obfuscation(Exclude = true, ApplyToMembers = true)]
    [Serializable]
    public class EnergyData
    <Obfuscation(Exclude:=True, ApplyToMembers:=True)>
    <Serializable>
    Public Class EnergyData
    Inheritance
    System.Object
    EnergyData
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    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 Source

    EnergyData(Constants.enumEnergyDirection)

    Declaration
    • C#
    • Visual Basic
    public EnergyData(Constants.enumEnergyDirection consumedOrProduced)
    Public Sub New(consumedOrProduced As Constants.enumEnergyDirection)
    Parameters
    Type Name Description
    Constants.enumEnergyDirection consumedOrProduced

    Fields

    View Source

    Amount

    Always measured in Watts

    Declaration
    • C#
    • Visual Basic
    public double Amount
    Public Amount As Double
    Field Value
    Type Description
    System.Double
    View Source

    Amount_End

    The end of the time period this measurement is for.

    Declaration
    • C#
    • Visual Basic
    public DateTime Amount_End
    Public Amount_End As Date
    Field Value
    Type Description
    System.DateTime
    View Source

    Amount_Start

    The start of the time period this measurement is for.

    Declaration
    • C#
    • Visual Basic
    public DateTime Amount_Start
    Public Amount_Start As Date
    Field Value
    Type Description
    System.DateTime
    View Source

    Device

    Indicates the type of device.

    Declaration
    • C#
    • Visual Basic
    public Constants.enumEnergyDevice Device
    Public Device As Constants.enumEnergyDevice
    Field Value
    Type Description
    Constants.enumEnergyDevice
    View Source

    Direction

    Indicates whether the energy was consumed (used) or produced (created).

    Declaration
    • C#
    • Visual Basic
    public Constants.enumEnergyDirection Direction
    Public Direction As Constants.enumEnergyDirection
    Field Value
    Type Description
    Constants.enumEnergyDirection
    View Source

    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
    • C#
    • Visual Basic
    public long Duration
    Public Duration As Long
    Field Value
    Type Description
    System.Int64
    View Source

    dvRef

    Device reference ID number for the device this energy data is for.

    Declaration
    • C#
    • Visual Basic
    public int dvRef
    Public dvRef As Integer
    Field Value
    Type Description
    System.Int32
    View Source

    ID

    Declaration
    • C#
    • Visual Basic
    public int ID
    Public ID As Integer
    Field Value
    Type Description
    System.Int32
    View Source

    Rate

    Always measured in kWH

    Declaration
    • C#
    • Visual Basic
    public float Rate
    Public Rate As Single
    Field Value
    Type Description
    System.Single
    View Source

    UserCode

    For the user to indicate something about this reading.

    Declaration
    • C#
    • Visual Basic
    public int UserCode
    Public UserCode As Integer
    Field Value
    Type Description
    System.Int32
    • View Source
    In This Article
    Back to top HomeSeer Technologies