From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to monitor a UPS by serial port

Solved!
Go to solution

Hey,

 

I'm working on the exact same problems. Do you mind sharing if you were able to figure this out at all?

 

Thanks

0 Kudos
Message 11 of 16
(1,024 Views)

@Dave_Thomson wrote:

 

I'm assuming (hoping) that this is a standard interface that a lot of UPS's use. Please post here if you find that it is used by other manufacturers.


I"m sure there are other UPSes that may use modem control lines to communicate their state but if you hope that there is any standard, you need to think again. This is definitely a poor man's choice of a low cost interface implementation and highly proprietary in its nature.

 

But don't be sad, even the UPS's that support a real communication link are almost never compatible with each other. There is theoretically a sub standard of the USB-HID class to communicate UPS power information to a computer but implementation of a virtual USB-COMM class interface to be compatible with old RS-232 based interfaces from the same manufacturer are also quite common. And then you have the ones which still use a real RS-232 port, or the PS/2 style keyboard wedge types and the ones with Ethernet SNMP interface for professional data centers etc.

 

Each of them has some advantages and disadvantages. It's just a question of what is weighted the most from a particular manufacturer and that can actually include the requirement to be incompatible to anything but itself and its own highly priced monitor software.

Rolf Kalbermatter
My Blog
0 Kudos
Message 12 of 16
(1,008 Views)

@huyhuynh wrote:

Hey,

 

I'm working on the exact same problems. Do you mind sharing if you were able to figure this out at all?


If you talk about the UPS's from CyberPower in the original post, you may be successful by using the VISA functions in LabVIEW. Dave detailed the functions of the different modem control lines for his type of UPS in his post. Look at the VISA property nodes under "Serial Settings->Modem Line Settings".

 

Of course that post is more than 5 years ago and even if you bought a CyberPower UPS it may be a different model than his, and nowadays use a different interface than the one Dave used back then.

If you talk about any other UPS you have to provide a lot more information about model and manufacturer and the interface connector it provides. Every manufacturer uses their own interface standard and protocol and there is no single standard to follow. Also manufacturers change interfaces over the years for their models to adapt to new connectivity options on modern computers and quite often also for cost saving reason. So even a specific manufacturer is no guarantee that any two different models of their product range can be controlled in the same way.

Rolf Kalbermatter
My Blog
0 Kudos
Message 13 of 16
(1,005 Views)

I think there is some kind of SNMP standard out there that covers most major UPS makers and you can query status and send commands, because there is software out there that can do this.  PowerAlert software from Tripplite can do this, so it is possible.

 

Edit:

Oops, I forgot that the UPS either needs to have an Ethernet adapter (expensive!) or be connected to a computer that has one.  Then you can manage everyone's UPS.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 14 of 16
(965 Views)

@billko wrote:

 

Oops, I forgot that the UPS either needs to have an Ethernet adapter (expensive!) or be connected to a computer that has one.  Then you can manage everyone's UPS.


Actually if it is connected to your computer through USB, RS-232 or whatever, you will need some software that runs in the background and communicates with the UPS and provides an SNMP daemon on your PC for other SNMP clients to be able to query your UPS status. So it quickly ends up being rather specific although I'm sure there are professional software packages that can do that for you.

 

Or you setup a little Linux box and use NUT to communicate to your UPS and then startup some SNMP daemon such as net-snmp with the according configuration.

 

A fairly detailed setup for this is described here: https://raymondjdouglas.com/blog/2018/ups-monitoring/

This could fairly easily be done with a Raspberry Pi or any other similar Linux based SBC.

 

But for use from within LabVIEW you replaced the problem from accessing the UPS directly to having to do SNMP communication. Not impossible but SNMP isn't exactly for the faint hearted as it is a fairly complex communication standard, despite the S in its name which stands for Simple. 😁

Rolf Kalbermatter
My Blog
0 Kudos
Message 15 of 16
(935 Views)

@rolfk wrote:

@billko wrote:

 

Oops, I forgot that the UPS either needs to have an Ethernet adapter (expensive!) or be connected to a computer that has one.  Then you can manage everyone's UPS.


Actually if it is connected to your computer through USB, RS-232 or whatever, you will need some software that runs in the background and communicates with the UPS and provides an SNMP daemon on your PC for other SNMP clients to be able to query your UPS status. So it quickly ends up being rather specific although I'm sure there are professional software packages that can do that for you.

 

Or you setup a little Linux box and use NUT to communicate to your UPS and then startup some SNMP daemon such as net-snmp with the according configuration.

 

A fairly detailed setup for this is described here: https://raymondjdouglas.com/blog/2018/ups-monitoring/

This could fairly easily be done with a Raspberry Pi or any other similar Linux based SBC.

 

But for use from within LabVIEW you replaced the problem from accessing the UPS directly to having to do SNMP communication. Not impossible but SNMP isn't exactly for the faint hearted as it is a fairly complex communication standard, despite the S in its name which stands for Simple. 😁


I tried to do this a couple of years ago, and SNMP was just too confusing for me to implement by myself.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 16 of 16
(926 Views)