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



------=_NextPart_000_0050_01CB762A.0033CD50
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit

Hi K,

Thanks for the response.
I primarily program embedded devices but have done Pascal (from Turbo
Pascal..Delphi), some GWBasic and very early VB. As well as a 12 month part
time 'C' course.
I even did some Forth but took a big disliking to it.

The built in native windows service, polls the UPS's for the information.
A good reason for picking the APC brand of UPS is that it has the APC
drivers built in already. So you don't need the parachute software.

The basic parachute software does not do network broadcasts.


Regards,

Neil Wrightson.



_____

From: xap_automation@xxxxxxx [mailto:xap_automation@xxxxxxx]
On Behalf Of Kevin Hawkins
Sent: Wednesday, 27 October 2010 9:57 PM
To: xap_automation@xxxxxxx
Subject: Re: [xap_automation] Wanted - xAP UPS Monitor




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.







------=_NextPart_000_0050_01CB762A.0033CD50
Content-Type: text/html; charset=US-ASCII
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.0
Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii"
http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML
8.00.6001.18975"></HEAD>
<BODY style="BACKGROUND-COLOR: #fff">


<!-- **begin egp html banner** -->

<br><br>

<!-- **end egp html banner** -->



<DIV dir=ltr align=left><SPAN class=814144711-27102010><FONT
color=#0000ff
size=2 face=Arial>Hi K,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=814144711-27102010><FONT
color=#0000ff
size=2 face=Arial></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=814144711-27102010><FONT
color=#0000ff
size=2 face=Arial>Thanks for the
response.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=814144711-27102010><FONT
color=#0000ff
size=2 face=Arial>I primarily program embedded devices but have
done&nbsp;Pascal
(from Turbo Pascal..Delphi), some GWBasic and very early VB. As well as a
12
month part time 'C' course.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=814144711-27102010><FONT
color=#0000ff
size=2 face=Arial>I even did some Forth but took a big disliking to
it.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=814144711-27102010><FONT
color=#0000ff
size=2 face=Arial></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=814144711-27102010><FONT
color=#0000ff
size=2 face=Arial>The built in native windows service, polls the
UPS's&nbsp;for
the information. </FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=814144711-27102010><FONT
color=#0000ff
size=2 face=Arial>A good reason for picking the APC brand of UPS is that
it has
the APC drivers built in already. So you don't need the parachute
software.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=814144711-27102010><FONT
color=#0000ff
size=2 face=Arial></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=814144711-27102010><FONT
color=#0000ff
size=2 face=Arial>The basic parachute software does not do network
broadcasts.
</FONT></SPAN></DIV>
<DIV><FONT color=#0000ff size=2
face=Arial></FONT>&nbsp;</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>
<BR></P></DIV><BR>
<BLOCKQUOTE
style="BORDER-LEFT: #0000ff 2px solid; PADDING-LEFT: 5px; MARGIN-LEFT:
5px; MARGIN-RIGHT: 0px">
<DIV dir=ltr lang=en-us class=OutlookMessageHeader align=left>
<HR tabIndex=-1>
<FONT size=2 face=Tahoma><B>From:</B>
xap_automation@xxxxxxx
[mailto:xap_automation@xxxxxxx]
<B>On Behalf Of </B>Kevin
Hawkins<BR><B>Sent:</B> Wednesday, 27 October 2010 9:57
PM<BR><B>To:</B>
xap_automation@xxxxxxx<BR><B>Subject:</B> Re:
[xap_automation] Wanted
- xAP UPS Monitor<BR></FONT><BR></DIV>
<DIV></DIV><SPAN style="DISPLAY:
none">&nbsp;</SPAN>
<DIV id=ygrp-text>
<P>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>&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><FONT color=#0000ff
face=Arial></FONT>&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>
<P></P></DIV><!-- end group email -->



<!-- **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=4706/stime=1288221152";
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=X3oDMTJmampvdjBuBF9TAzk3NDc2NTkwBGdycElkAzk2NzQzNDMEZ3Jwc3BJZAMxNzA1MDA3NzA5BHNlYwNmdHIEc2xrA3N0bmdzBHN0aW1lAzEyODgyMjExNTI-";>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=X3oDMTJkMG8zbHJsBF9TAzk3NDc2NTkwBGdycElkAzk2NzQzNDMEZ3Jwc3BJZAMxNzA1MDA3NzA5BHNlYwNmdHIEc2xrA2hwZgRzdGltZQMxMjg4MjIxMTUy";>
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>

------=_NextPart_000_0050_01CB762A.0033CD50--

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.