Welcome to the new Schneider Electric Community

It's your place to connect with experts and peers, get continuous support, and share knowledge.

  • Explore the new navigation for even easier access to your community.
  • Bookmark and use our new, easy-to-remember address (community.se.com).
  • Get ready for more content and an improved experience.

Contact SchneiderCommunity.Support@se.com if you have any questions.

Close
Invite a Co-worker
Send a co-worker an invite to the Exchange portal.Just enter their email address and we’ll connect them to register. After joining, they will belong to the same company.
Send Invite Cancel
84704members
354081posts

Writing own C++ program for monitoring.

APC UPS Data Center & Enterprise Solutions Forum

Schneider Electric support forum for our Data Center and Business Power UPS, UPS Accessories, Software, Services, and associated commercial products designed to share knowledge, installation, and configuration.

Solved
aconway_apc
Crewman
Crewman
0 Likes
1
189

Writing own C++ program for monitoring.

This was originally posted on APC forums on 2/2/2021


I'm writing my own program for monitoring an APC UPS (model SMT3000RM2UC) and I'd like to do it via WMI SNMP. I've followed both a tutorial and the Microsoft documentation to connect to the WMI namespace and get my locator object but I'm a bit unsure as to how or if I can proceed from here. The one tutorial shows using a context object would be needed to connect to the UPS, while the Microsoft docs sort of leave me hanging. It's possible that my answer is somewhere buried in the documentation but I'm at a loss.

So my questions are this:

Does APC have any documentation or support on getting connected to your UPS via the windows SNMP API?
Is there a way to turn on SNMPv1 or v3 without installing Powerchute? 
Will windows SNMP queries work with Powerchute installed?

I realize that there are existing pieces of software to do the kind of monitoring I'm interested in doing but my work task is to write a program. I also know that it would be a lot easier to use some third party libraries for this but most of those are Linux based with poor to no Windows support and it must run on Windows 10.

The tutorial I mention: https://blog.mikejmcguire.com/2013/10/14/its-a-trap-sending-snmp-queries-from-cc-on-windows/
The Microsoft documentation with an open gap on how to talk to anything once you're connected: https://docs.microsoft.com/en-us/windows/win32/wmisdk/creating-a-wmi-application-using-c-

Any help or additional guidance would be greatly appreciated.


Accepted Solutions
BillP
Administrator Administrator
Administrator
0 Likes
0
190

Re: Writing own C++ program for monitoring.

This reply was originally posted by Gavan on APC forums on 2/5/2021


Hi Alex,

I don't believe there is any documentation on WMI but there wouldn't be anything APC specific, if your using the default UPS HID driver then it would be the same WMI commands as if it was a laptop with a battery.

If you'd like the UPS to have SNMPv1/3 functionality without installing PowerChute Business edition you can install a network management card into the UPS.

No, Windows will no longer "see" the UPS it will pass off all control to PowerChute.

- Gavan

See Answer In Context

1 Reply 1
BillP
Administrator Administrator
Administrator
0 Likes
0
191

Re: Writing own C++ program for monitoring.

This reply was originally posted by Gavan on APC forums on 2/5/2021


Hi Alex,

I don't believe there is any documentation on WMI but there wouldn't be anything APC specific, if your using the default UPS HID driver then it would be the same WMI commands as if it was a laptop with a battery.

If you'd like the UPS to have SNMPv1/3 functionality without installing PowerChute Business edition you can install a network management card into the UPS.

No, Windows will no longer "see" the UPS it will pass off all control to PowerChute.

- Gavan