Hi;
I am using the following script (run every 2 minutes) to populate some virtual devices so that MCStemperature can log the data.
Every now and then (6-12 times a day) the values that get populated into the devices are like 9999.99 or 99.9.
I have monitored the system and confirmed the wrong data get's populated into the devices as opposed to MCSTemp reading it wrong
As you can tell I am not a programmer but I modified the HAI_System_Ceck.txt for my use. Maybe it is not done properly?
I have tryed hs.devicevaluechange also and ended up with the same results
Any help would appreciated!
AndyM
Sub Main()
Dim iStatus
iStatus = 999
iStatus = hs.plugin("HAI_System").InterfaceStatus
if iStatus = 0 then
hs.setdevicestring "w30", hs.plugin("HAI_System").HAI_WhatIsTemp(1)
hs.setdevicestring "w31", hs.plugin("HAI_System").HAI_WhatIsTemp(2)
hs.setdevicestring "w32", hs.plugin("HAI_System").GetAuxTemp_Temp(14)
hs.setdevicestring "w33", hs.plugin("HAI_System").GetAuxTemp_Temp(15)
hs.setdevicestring "w34", hs.plugin("HAI_System").GetAuxTemp_Temp(13)
hs.setdevicevalue "w30", now
hs.setdevicevalue "w31", now
hs.setdevicevalue "w32", now
hs.setdevicevalue "w33", now
hs.setdevicevalue "w34", now
else
WriteLog "HAI CHECK","Interface Status is " & CStr(iStatus)
end if
End Sub
I am using the following script (run every 2 minutes) to populate some virtual devices so that MCStemperature can log the data.
Every now and then (6-12 times a day) the values that get populated into the devices are like 9999.99 or 99.9.
I have monitored the system and confirmed the wrong data get's populated into the devices as opposed to MCSTemp reading it wrong
As you can tell I am not a programmer but I modified the HAI_System_Ceck.txt for my use. Maybe it is not done properly?
I have tryed hs.devicevaluechange also and ended up with the same results
Any help would appreciated!
AndyM
Sub Main()
Dim iStatus
iStatus = 999
iStatus = hs.plugin("HAI_System").InterfaceStatus
if iStatus = 0 then
hs.setdevicestring "w30", hs.plugin("HAI_System").HAI_WhatIsTemp(1)
hs.setdevicestring "w31", hs.plugin("HAI_System").HAI_WhatIsTemp(2)
hs.setdevicestring "w32", hs.plugin("HAI_System").GetAuxTemp_Temp(14)
hs.setdevicestring "w33", hs.plugin("HAI_System").GetAuxTemp_Temp(15)
hs.setdevicestring "w34", hs.plugin("HAI_System").GetAuxTemp_Temp(13)
hs.setdevicevalue "w30", now
hs.setdevicevalue "w31", now
hs.setdevicevalue "w32", now
hs.setdevicevalue "w33", now
hs.setdevicevalue "w34", now
else
WriteLog "HAI CHECK","Interface Status is " & CStr(iStatus)
end if
End Sub
Comment