The UK Home Automation Archive

Archive Home
Group Home
Search Archive


Advanced Search

The UKHA-ARCHIVE IS CEASING OPERATIONS 31 DEC 2024


[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&nbsp; but I think&nbsp; you might be able to send a
xAP
message to a PC saying 'shutdown' using one of James'&nbsp;&nbsp;
(mi4) xAP
apps, and then add just a&nbsp; bit of programming to recognise the UPS
reporting to trigger the message.&nbsp; Are you familiar with writing
code in any language ?<br>
<br>
But there maybe an easier alternative...&nbsp; I wonder... are the
UPS's
using two way RS232 communications or do they just send/report data
to your PC ?&nbsp;&nbsp;&nbsp;&nbsp; If they do only send,
or they would work with just
one PC sending data to them, ....&nbsp; then you could just feed the
UPS
serial output into each/all your PC's using a&nbsp; splitter cable and
then each one would go through the shutdown process .&nbsp;&nbsp;
<br>
<br>
Alternatively I would expect one of the APC software offerings....
'parachute' or whatever it's called&nbsp; - 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>
&nbsp;&nbsp; K<br>
<br>
&nbsp;On 27/10/2010 03:49, Neil Wrightson wrote:
<blockquote
cite="mid:FE82BDFD41394E29A0661C58724906BB@xxxxxxx"
type="cite">
<span style="display: none;">&nbsp;</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>&nbsp;</div>
<div><span class="125203902-27102010"><font
size="2"
face="Arial">Does a xAP UPS monitor exist at
all?</font></span></div>
<div>&nbsp;</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>&nbsp;</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>&nbsp;</div>
<div><span
class="125203902-27102010"></span>&nbsp;</div>
<div><span class="125203902-27102010"><font
size="2"
face="Arial">I found this code in a Google&nbsp;search but
do not know any VB programming.</font></span></div>
<div><span
class="125203902-27102010"></span>&nbsp;</div>
<div><span
class="125203902-27102010"></span>&nbsp;</div>
<div><span
class="125203902-27102010">'***********************************************************************<br>
' -- VBScript Source File <br>
' -- NAME: UPS Check<br>
' -- AUTHOR: Dan<br>
' -- DATE&nbsp; : 6/23/2007<br>
' -- VERSION: 1.0<br>
' -- COMMENTS: Uses WMI to poll UPS. Returns Null if no
UPS attached. <br>
'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
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: " &amp;
objItem.ActiveInputVoltage<br>
WScript.Echo "Availability: " &amp;
objItem.Availability<br>
WScript.Echo "BatteryInstalled: " &amp;
objItem.BatteryInstalled<br>
WScript.Echo "CanTurnOffRemotely: " &amp;
objItem.CanTurnOffRemotely<br>
WScript.Echo "Caption: " &amp; objItem.Caption<br>
WScript.Echo "CommandFile: " &amp;
objItem.CommandFile<br>
WScript.Echo "ConfigManagerErrorCode: " &amp;
objItem.ConfigManagerErrorCode<br>
WScript.Echo "ConfigManagerUserConfig: " &amp;
objItem.ConfigManagerUserConfig<br>
WScript.Echo "CreationClassName: " &amp;
objItem.CreationClassName<br>
WScript.Echo "Description: " &amp;
objItem.Description<br>
WScript.Echo "DeviceID: " &amp; objItem.DeviceID<br>
WScript.Echo "ErrorCleared: " &amp;
objItem.ErrorCleared<br>
WScript.Echo "ErrorDescription: " &amp;
objItem.ErrorDescription<br>
WScript.Echo "EstimatedChargeRemaining: " &amp;
objItem.EstimatedChargeRemaining<br>
WScript.Echo "EstimatedRunTime: " &amp;
objItem.EstimatedRunTime<br>
WScript.Echo "FirstMessageDelay: " &amp;
objItem.FirstMessageDelay<br>
WScript.Echo "InstallDate: " &amp;
objItem.InstallDate<br>
WScript.Echo "IsSwitchingSupply: " &amp;
objItem.IsSwitchingSupply<br>
WScript.Echo "LastErrorCode: " &amp;
objItem.LastErrorCode<br>
WScript.Echo "LowBatterySignal: " &amp;
objItem.LowBatterySignal<br>
WScript.Echo "MessageInterval: " &amp;
objItem.MessageInterval<br>
WScript.Echo "Name: " &amp; objItem.Name<br>
WScript.Echo "PNPDeviceID: " &amp;
objItem.PNPDeviceID<br>
WScript.Echo "PowerFailSignal: " &amp;
objItem.PowerFailSignal<br>
for each propValue in
objItem.PowerManagementCapabilities<br>
&nbsp; WScript.Echo "PowerManagementCapabilities: " &amp;
propValue<br>
Next<br>
WScript.Echo "PowerManagementSupported: " &amp;
objItem.PowerManagementSupported<br>
WScript.Echo "Range1InputFrequencyHigh: " &amp;
objItem.Range1InputFrequencyHigh<br>
WScript.Echo "Range1InputFrequencyLow: " &amp;
objItem.Range1InputFrequencyLow<br>
WScript.Echo "Range1InputVoltageHigh: " &amp;
objItem.Range1InputVoltageHigh<br>
WScript.Echo "Range1InputVoltageLow: " &amp;
objItem.Range1InputVoltageLow<br>
WScript.Echo "Range2InputFrequencyHigh: " &amp;
objItem.Range2InputFrequencyHigh<br>
WScript.Echo "Range2InputFrequencyLow: " &amp;
objItem.Range2InputFrequencyLow<br>
WScript.Echo "Range2InputVoltageHigh: " &amp;
objItem.Range2InputVoltageHigh<br>
WScript.Echo "Range2InputVoltageLow: " &amp;
objItem.Range2InputVoltageLow<br>
WScript.Echo "RemainingCapacityStatus: " &amp;
objItem.RemainingCapacityStatus<br>
WScript.Echo "Status: " &amp; objItem.Status<br>
WScript.Echo "StatusInfo: " &amp;
objItem.StatusInfo<br>
WScript.Echo "SystemCreationClassName: " &amp;
objItem.SystemCreationClassName<br>
WScript.Echo "SystemName: " &amp;
objItem.SystemName<br>
WScript.Echo "TimeOnBackup: " &amp;
objItem.TimeOnBackup<br>
WScript.Echo "TotalOutputPower: " &amp;
objItem.TotalOutputPower<br>
WScript.Echo "TypeOfRangeSwitching: " &amp;
objItem.TypeOfRangeSwitching<br>
WScript.Echo "UPSPort: " &amp; 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

Comments to the Webmaster are always welcomed, please use this contact form . Note that as this site is a mailing list archive, the Webmaster has no control over the contents of the messages. Comments about message content should be directed to the relevant mailing list.