No announcement yet.

Has anybody had sucess with the hs energy functions

  • Filter
  • Time
  • Show
Clear All
new posts

  • Has anybody had sucess with the hs energy functions

    This procedure is used to set the type of energy consumption or energy producing device for the reference ID dvRef in the energy database. This procedure is also used to create an initial energy object in the system if one does not exist. The energy object's device name, location, and location2 properties will also be updated whenever this procedure is called.

    Public Function Energy_SetEnergyDevice(ByVal dvRef As Integer, _
    ByVal DeviceType As enumEnergyDevice) As Boolean

    I can't get the following to return true using an existing device or a ne devref what am I doing wrong? any help would be gratefully received.

    Sub Main(ByVal Parms As Object)

    Dim a as boolean
    a = hs.Energy_SetEnergyDevice(147,62)
    hs.writelog ("Power Now", a) 'write power
    End Sub