Announcement

Collapse
No announcement yet.

CurrentCost HS3 plugin

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    CurrentCost HS3 plugin

    Hi,

    I'm trying to use the currentcost plugin with HS3. I don't have Envi hardware, but i'm importing the powerusage through a script.

    I read in the help I should be able to do it like this:

    Sub Main(ByVal parm As Object)
    Dim plug As Object = Nothing
    Try
    plug = hs.plugin(
    "Current Cost")
    Catch ex As Exception
    plug =
    Nothing
    End Try
    If plug IsNothingThen
    hs.WriteLog(
    "Log Data Error", "The Current Cost plug-in is not installed or enabled - cannot continue.")
    ExitSub
    EndIf
    ' get your data here from your hardware or external file
    Dim my_data As Single = 100
    plug.UpdateSensor(0, my_data, Now, 1)
    EndSub

    But hs.plugin isn't the way to go on HS3. So i tried:

    Dim args() As Object = {1, 0.000}
    args(1) = myValueFromScriptInWatt
    hs.PluginFunction("Current Cost","","UpdateSensor",args)


    But this doesn't work too. Can anybody help me in the right directorion on how to use the HS3 Current Cost plugin together with importing the power values through scripting.


    #2
    Originally posted by arn0 View Post
    Hi,

    I'm trying to use the currentcost plugin with HS3. I don't have Envi hardware, but i'm importing the powerusage through a script.

    I read in the help I should be able to do it like this:

    Sub Main(ByVal parm As Object)
    Dim plug As Object = Nothing
    Try
    plug = hs.plugin(
    "Current Cost")
    Catch ex As Exception
    plug =
    Nothing
    End Try
    If plug IsNothingThen
    hs.WriteLog(
    "Log Data Error", "The Current Cost plug-in is not installed or enabled - cannot continue.")
    ExitSub
    EndIf
    ' get your data here from your hardware or external file
    Dim my_data As Single = 100
    plug.UpdateSensor(0, my_data, Now, 1)
    EndSub

    But hs.plugin isn't the way to go on HS3. So i tried:

    Dim args() As Object = {1, 0.000}
    args(1) = myValueFromScriptInWatt
    hs.PluginFunction("Current Cost","","UpdateSensor",args)


    But this doesn't work too. Can anybody help me in the right directorion on how to use the HS3 Current Cost plugin together with importing the power values through scripting.

    HS will need to tell you the scripting function names, I am unsure whether they have or not for this plugin (check the documentation) so you need to find if that is the new name of the method or not before you know whether it is an issue in your script or an issue with the plugin. If there is nothing in the documentation I would suggest a bugzilla report asking them for it.

    Comment


      #3
      I have been using this plugin with good success for about 1 1/2 months. A few areas that I would like some help with are, the cost. My electric is .23 per kilowatt, but no matter what I put in for the plugin it always reverts to .129 any ideas?

      Also, the graphs for last 12 months don't seem to work, I have two months of data and I still have nothing in that chart.

      Last, the tab for only history data shows no data for sensor 0.

      Comment


        #4
        New User to CurrentCost HS3 Plugin...

        I just acquired a CurrentCost ENVIr device and installed it today... It seems to be pretty neat on what it can do. I've installed the ENVI plug in, and I noticed a few things that I'm not sure are right...

        #1 - The plug-in never asked me which COM port I wanted to use... It appears to have defaulted to COM1, and fortunately, I was able to accommodate the device.

        #2 - I see nowhere to view the charts... is this because I'm running the HS3 plugin, not the HS2?

        #3 - I'm getting one of those blasted "Error: Could not retrieve data : Object reference not set to an instance of an object." errors. My device has 2 CT clamps, so I'm using 2 of the 3 available channels. I've seen this type of error before (specifically with the Virtual Weather Station plugin), and I'm wondering if this happens when the plugin creates devices for elements that don't exist, or have a zero value.

        Any thoughts on this would be greatly appreciated!

        Thanks

        Tony

        Running HS3Pro 3.0.0.81 Beta, Current Cost 3.0.0.10

        Comment

        Working...
        X