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.
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.
Comment