[Message Prev][Message
Next][Thread Prev][Thread Next][Message
Index][Thread Index]
Re: Wanted - xAP UPS Monitor
--------------000707060302090203010706
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
I don't know of a complete xAP app that would do this along with the UPS
interaction but I think you might be able to send a xAP message to a
PC saying 'shutdown' using one of James' (mi4) xAP apps, and then add
just a bit of programming to recognise the UPS reporting to trigger the
message. Are you familiar with writing code in any language ?
But there maybe an easier alternative... I wonder... are the UPS's
using two way RS232 communications or do they just send/report data to
your PC ? If they do only send, or they would work with just one PC
sending data to them, .... then you could just feed the UPS serial
output into each/all your PC's using a splitter cable and then each one
would go through the shutdown process .
Alternatively I would expect one of the APC software offerings....
'parachute' or whatever it's called - would support network
notifications to shut down a group of PC's - but that might be
chargeable software or only included with some UPS models.
Andy - the UKHA UPS man should know...
K
On 27/10/2010 03:49, Neil Wrightson wrote:
>
> Hi All,
> Does a xAP UPS monitor exist at all?
> I have a few UPS's (APC SmartUPS) and some that are powering multiple
> PC's.
> None of the UPS's have a network interface, only serial interfaces.
> I connect the serial(or USB) interface to one of the PC's and this
> looks after (shuts down etc) this PC but the other PC on the same UPS
> has the equivalent of the PLUG being ripped out, when ultimately the
> batteries have gone flat. That is, it is not shut down in a normal
manner.
> So an xAP server app that monitored the UPS connected to it's PC and
> did appropriate broadcasts and a client xAP app on other PC's could
> monitor these messages and do appropriate things.
> Does anything like this exist?
> I found this code in a Google search but do not know any VB
programming.
>
'***********************************************************************
> ' -- VBScript Source File
> ' -- NAME: UPS Check
> ' -- AUTHOR: Dan
> ' -- DATE : 6/23/2007
> ' -- VERSION: 1.0
> ' -- COMMENTS: Uses WMI to poll UPS. Returns Null if no UPS attached.
> ' This example shows all Win32 UPS Objects
>
'***********************************************************************
> On Error Resume Next
> Dim strComputer
> Dim objWMIService
> Dim propValue
> Dim objItem
> Dim SWBemlocator
> Dim UserName
> Dim Password
> Dim colItems
> strComputer = "."
> UserName = ""
> Password = ""
> Set SWBemlocator =
CreateObject("WbemScripting.SWbemLocator")
> Set objWMIService =
>
SWBemlocator.ConnectServer(strComputer,"root\CIMV2",UserName,Password)
> Set colItems = objWMIService.ExecQuery("Select * from
> Win32_UninterruptiblePowerSupply",,48)
> For Each objItem in colItems
> WScript.Echo "ActiveInputVoltage: " &
objItem.ActiveInputVoltage
> WScript.Echo "Availability: " & objItem.Availability
> WScript.Echo "BatteryInstalled: " &
objItem.BatteryInstalled
> WScript.Echo "CanTurnOffRemotely: " &
objItem.CanTurnOffRemotely
> WScript.Echo "Caption: " & objItem.Caption
> WScript.Echo "CommandFile: " & objItem.CommandFile
> WScript.Echo "ConfigManagerErrorCode: " &
objItem.ConfigManagerErrorCode
> WScript.Echo "ConfigManagerUserConfig: " &
objItem.ConfigManagerUserConfig
> WScript.Echo "CreationClassName: " &
objItem.CreationClassName
> WScript.Echo "Description: " & objItem.Description
> WScript.Echo "DeviceID: " & objItem.DeviceID
> WScript.Echo "ErrorCleared: " & objItem.ErrorCleared
> WScript.Echo "ErrorDescription: " &
objItem.ErrorDescription
> WScript.Echo "EstimatedChargeRemaining: " &
> objItem.EstimatedChargeRemaining
> WScript.Echo "EstimatedRunTime: " &
objItem.EstimatedRunTime
> WScript.Echo "FirstMessageDelay: " &
objItem.FirstMessageDelay
> WScript.Echo "InstallDate: " & objItem.InstallDate
> WScript.Echo "IsSwitchingSupply: " &
objItem.IsSwitchingSupply
> WScript.Echo "LastErrorCode: " & objItem.LastErrorCode
> WScript.Echo "LowBatterySignal: " &
objItem.LowBatterySignal
> WScript.Echo "MessageInterval: " &
objItem.MessageInterval
> WScript.Echo "Name: " & objItem.Name
> WScript.Echo "PNPDeviceID: " & objItem.PNPDeviceID
> WScript.Echo "PowerFailSignal: " &
objItem.PowerFailSignal
> for each propValue in objItem.PowerManagementCapabilities
> WScript.Echo "PowerManagementCapabilities: " &
propValue
> Next
> WScript.Echo "PowerManagementSupported: " &
> objItem.PowerManagementSupported
> WScript.Echo "Range1InputFrequencyHigh: " &
> objItem.Range1InputFrequencyHigh
> WScript.Echo "Range1InputFrequencyLow: " &
objItem.Range1InputFrequencyLow
> WScript.Echo "Range1InputVoltageHigh: " &
objItem.Range1InputVoltageHigh
> WScript.Echo "Range1InputVoltageLow: " &
objItem.Range1InputVoltageLow
> WScript.Echo "Range2InputFrequencyHigh: " &
> objItem.Range2InputFrequencyHigh
> WScript.Echo "Range2InputFrequencyLow: " &
objItem.Range2InputFrequencyLow
> WScript.Echo "Range2InputVoltageHigh: " &
objItem.Range2InputVoltageHigh
> WScript.Echo "Range2InputVoltageLow: " &
objItem.Range2InputVoltageLow
> WScript.Echo "RemainingCapacityStatus: " &
objItem.RemainingCapacityStatus
> WScript.Echo "Status: " & objItem.Status
> WScript.Echo "StatusInfo: " & objItem.StatusInfo
> WScript.Echo "SystemCreationClassName: " &
objItem.SystemCreationClassName
> WScript.Echo "SystemName: " & objItem.SystemName
> WScript.Echo "TimeOnBackup: " & objItem.TimeOnBackup
> WScript.Echo "TotalOutputPower: " &
objItem.TotalOutputPower
> WScript.Echo "TypeOfRangeSwitching: " &
objItem.TypeOfRangeSwitching
> WScript.Echo "UPSPort: " & objItem.UPSPort
> Next
>
> Regards,
>
> *Neil Wrightson.*
>
>
--------------000707060302090203010706
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
<head>
<style type="text/css">
<!--
/* start of attachment style */
.ygrp-photo-title{
clear: both;
font-size: smaller;
height: 15px;
overflow: hidden;
text-align: center;
width: 75px;
}
div.ygrp-photo{
background-position: center;
background-repeat: no-repeat;
background-color: white;
border: 1px solid black;
height: 62px;
width: 62px;
}
div.photo-title
a,
div.photo-title a:active,
div.photo-title a:hover,
div.photo-title a:visited {
text-decoration: none;
}
div.attach-table div.attach-row {
clear: both;
}
div.attach-table div.attach-row div {
float: left;
/* margin: 2px;*/
}
p {
clear: both;
padding: 15px 0 3px 0;
overflow: hidden;
}
div.ygrp-file {
width: 30px;
valign: middle;
}
div.attach-table div.attach-row div div a {
text-decoration: none;
}
div.attach-table div.attach-row div div span {
font-weight: normal;
}
div.ygrp-file-title {
font-weight: bold;
}
/* end of attachment style */
-->
</style>
</head>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<!-- **begin egp html banner** -->
<br><br>
<!-- **end egp html banner** -->
I don't know of a complete xAP app that would do this along with the
UPS interaction but I think you might be able to send a
xAP
message to a PC saying 'shutdown' using one of James'
(mi4) xAP
apps, and then add just a bit of programming to recognise the UPS
reporting to trigger the message. Are you familiar with writing
code in any language ?<br>
<br>
But there maybe an easier alternative... I wonder... are the
UPS's
using two way RS232 communications or do they just send/report data
to your PC ? If they do only send,
or they would work with just
one PC sending data to them, .... then you could just feed the
UPS
serial output into each/all your PC's using a splitter cable and
then each one would go through the shutdown process .
<br>
<br>
Alternatively I would expect one of the APC software offerings....
'parachute' or whatever it's called - would support network
notifications to shut down a group of PC's - but that might be
chargeable software or only included with some UPS models.<br>
<br>
Andy - the UKHA UPS man should know...<br>
<br>
<br>
K<br>
<br>
On 27/10/2010 03:49, Neil Wrightson wrote:
<blockquote
cite="mid:FE82BDFD41394E29A0661C58724906BB@xxxxxxx"
type="cite">
<span style="display: none;"> </span>
<div id="ygrp-text">
<p>
</p>
<div><span class="125203902-27102010"><font
size="2"
face="Arial">Hi All,</font></span></div>
<div><span
class="125203902-27102010"></span> </div>
<div><span class="125203902-27102010"><font
size="2"
face="Arial">Does a xAP UPS monitor exist at
all?</font></span></div>
<div> </div>
<div><span class="125203902-27102010"><font
size="2"
face="Arial">I have a few UPS's (APC SmartUPS) and
some that are powering multiple PC's.</font></span></div>
<div><span class="125203902-27102010"><font
size="2"
face="Arial">None of the UPS's have a network
interface, only serial interfaces. </font></span></div>
<div><span class="125203902-27102010"><font
size="2"
face="Arial">I connect the serial(or USB) interface to
one of the PC's and this looks after (shuts down etc)
this PC but the other PC on the same UPS has the
equivalent of the PLUG being ripped out, when
ultimately the batteries have gone flat. That is, it
is not shut down in a normal manner.</font></span></div>
<div><span class="125203902-27102010"><font
size="2"
face="Arial">So an xAP server app that monitored the
UPS connected to it's PC and did appropriate
broadcasts and a client xAP app on other PC's could
monitor these messages and do appropriate
things.</font></span></div>
<div><span
class="125203902-27102010"></span> </div>
<div><span class="125203902-27102010"><font
size="2"
face="Arial">Does anything like this
exist?</font></span></div>
<div><span
class="125203902-27102010"></span> </div>
<div><span
class="125203902-27102010"></span> </div>
<div><span class="125203902-27102010"><font
size="2"
face="Arial">I found this code in a Google search but
do not know any VB programming.</font></span></div>
<div><span
class="125203902-27102010"></span> </div>
<div><span
class="125203902-27102010"></span> </div>
<div><span
class="125203902-27102010">'***********************************************************************<br>
' -- VBScript Source File <br>
' -- NAME: UPS Check<br>
' -- AUTHOR: Dan<br>
' -- DATE : 6/23/2007<br>
' -- VERSION: 1.0<br>
' -- COMMENTS: Uses WMI to poll UPS. Returns Null if no
UPS attached. <br>
'
This example shows all Win32 UPS Objects<br>
'***********************************************************************<br>
On Error Resume Next<br>
Dim strComputer<br>
Dim objWMIService<br>
Dim propValue<br>
Dim objItem<br>
Dim SWBemlocator<br>
Dim UserName<br>
Dim Password<br>
Dim colItems<br>
strComputer = "."<br>
UserName = ""<br>
Password = ""<br>
Set SWBemlocator =
CreateObject("WbemScripting.SWbemLocator")<br>
Set objWMIService =
SWBemlocator.ConnectServer(strComputer,"root\CIMV2",UserName,Password)<br>
Set colItems = objWMIService.ExecQuery("Select * from
Win32_UninterruptiblePowerSupply",,48)<br>
For Each objItem in colItems<br>
WScript.Echo "ActiveInputVoltage: " &
objItem.ActiveInputVoltage<br>
WScript.Echo "Availability: " &
objItem.Availability<br>
WScript.Echo "BatteryInstalled: " &
objItem.BatteryInstalled<br>
WScript.Echo "CanTurnOffRemotely: " &
objItem.CanTurnOffRemotely<br>
WScript.Echo "Caption: " & objItem.Caption<br>
WScript.Echo "CommandFile: " &
objItem.CommandFile<br>
WScript.Echo "ConfigManagerErrorCode: " &
objItem.ConfigManagerErrorCode<br>
WScript.Echo "ConfigManagerUserConfig: " &
objItem.ConfigManagerUserConfig<br>
WScript.Echo "CreationClassName: " &
objItem.CreationClassName<br>
WScript.Echo "Description: " &
objItem.Description<br>
WScript.Echo "DeviceID: " & objItem.DeviceID<br>
WScript.Echo "ErrorCleared: " &
objItem.ErrorCleared<br>
WScript.Echo "ErrorDescription: " &
objItem.ErrorDescription<br>
WScript.Echo "EstimatedChargeRemaining: " &
objItem.EstimatedChargeRemaining<br>
WScript.Echo "EstimatedRunTime: " &
objItem.EstimatedRunTime<br>
WScript.Echo "FirstMessageDelay: " &
objItem.FirstMessageDelay<br>
WScript.Echo "InstallDate: " &
objItem.InstallDate<br>
WScript.Echo "IsSwitchingSupply: " &
objItem.IsSwitchingSupply<br>
WScript.Echo "LastErrorCode: " &
objItem.LastErrorCode<br>
WScript.Echo "LowBatterySignal: " &
objItem.LowBatterySignal<br>
WScript.Echo "MessageInterval: " &
objItem.MessageInterval<br>
WScript.Echo "Name: " & objItem.Name<br>
WScript.Echo "PNPDeviceID: " &
objItem.PNPDeviceID<br>
WScript.Echo "PowerFailSignal: " &
objItem.PowerFailSignal<br>
for each propValue in
objItem.PowerManagementCapabilities<br>
WScript.Echo "PowerManagementCapabilities: " &
propValue<br>
Next<br>
WScript.Echo "PowerManagementSupported: " &
objItem.PowerManagementSupported<br>
WScript.Echo "Range1InputFrequencyHigh: " &
objItem.Range1InputFrequencyHigh<br>
WScript.Echo "Range1InputFrequencyLow: " &
objItem.Range1InputFrequencyLow<br>
WScript.Echo "Range1InputVoltageHigh: " &
objItem.Range1InputVoltageHigh<br>
WScript.Echo "Range1InputVoltageLow: " &
objItem.Range1InputVoltageLow<br>
WScript.Echo "Range2InputFrequencyHigh: " &
objItem.Range2InputFrequencyHigh<br>
WScript.Echo "Range2InputFrequencyLow: " &
objItem.Range2InputFrequencyLow<br>
WScript.Echo "Range2InputVoltageHigh: " &
objItem.Range2InputVoltageHigh<br>
WScript.Echo "Range2InputVoltageLow: " &
objItem.Range2InputVoltageLow<br>
WScript.Echo "RemainingCapacityStatus: " &
objItem.RemainingCapacityStatus<br>
WScript.Echo "Status: " & objItem.Status<br>
WScript.Echo "StatusInfo: " &
objItem.StatusInfo<br>
WScript.Echo "SystemCreationClassName: " &
objItem.SystemCreationClassName<br>
WScript.Echo "SystemName: " &
objItem.SystemName<br>
WScript.Echo "TimeOnBackup: " &
objItem.TimeOnBackup<br>
WScript.Echo "TotalOutputPower: " &
objItem.TotalOutputPower<br>
WScript.Echo "TypeOfRangeSwitching: " &
objItem.TypeOfRangeSwitching<br>
WScript.Echo "UPSPort: " & objItem.UPSPort<br>
Next</span></div>
<div class="Section1">
<p><span style="font-family: Arial; font-size:
10pt;">Regards,</span>
</p>
<p><b><span style="font-size: 13.5pt;">Neil
Wrightson.</span></b>
</p>
</div>
</div>
<!-- end group email -->
</blockquote>
<br>
<!-- **begin egp html banner** -->
<br>
<br>
<!-- **end egp html banner** -->
<div width="1" style="color: white; clear:
both;"/>__._,_.___</div>
<!-- Start Recommendations -->
<!-- End Recommendations -->
<!-- **begin egp html banner** -->
<img src="http://geo.yahoo.com/serv?s=97476590/grpId=9674343/grpspId=1705007709/msgId=4704/stime=1288177350"
width="1" height="1"> <br>
<!-- **end egp html banner** -->
<!-- **begin egp html banner** -->
<br>
<div style="font-family: verdana; font-size: 77%; border-top: 1px
solid #666; padding: 5px 0;" >
Your email settings: Individual EmailTraditional <br>
<a href="http://groups.yahoo.com/group/xap_automation/join;_ylc=X3oDMTJmbzl0bmQ1BF9TAzk3NDc2NTkwBGdycElkAzk2NzQzNDMEZ3Jwc3BJZAMxNzA1MDA3NzA5BHNlYwNmdHIEc2xrA3N0bmdzBHN0aW1lAzEyODgxNzczNTA-">Change
settings via the Web</a> (Yahoo! ID required) <br>
Change settings via email: <a href="mailto:xap_automation-digest@xxxxxxx?subject=Email
Delivery: Digest">Switch delivery to Daily Digest</a> <a
href = "mailto:xap_automation-fullfeatured@xxxxxxx?subject=Change
Delivery Format: Fully Featured">Switch to Fully Featured</a>
<br>
<a href="http://groups.yahoo.com/group/xap_automation;_ylc=X3oDMTJkZWdwbWIzBF9TAzk3NDc2NTkwBGdycElkAzk2NzQzNDMEZ3Jwc3BJZAMxNzA1MDA3NzA5BHNlYwNmdHIEc2xrA2hwZgRzdGltZQMxMjg4MTc3MzUw">
Visit Your Group
</a>
<a href="http://docs.yahoo.com/info/terms/">
Yahoo! Groups Terms of Use
</a>
<a href="mailto:xap_automation-unsubscribe@xxxxxxx?subject=Unsubscribe">
Unsubscribe
</a>
<br>
</div>
<br>
<!-- **end egp html banner** -->
<div style="color: white; clear:
both;"/>__,_._,___</div>
</body>
</html>
--------------000707060302090203010706--
xAP_Automation Main Index |
xAP_Automation Thread Index |
xAP_Automation Home |
Archives Home
|