How To Detect UPS shutdown command, over USB?

If you have a question or need help, this is the place to be.
Post Reply
User avatar
Livin
Experienced User
Posts: 792
Joined: Wed Oct 08, 2008 4:56 am

How To Detect UPS shutdown command, over USB?

Post by Livin » Sun Dec 25, 2011 5:10 pm

I'd like to run an EG Macro when the UPS sends a shutdown command via the UPS.

Anyone know if/how EG can detect this?

thx
setup... XBMC, W7MC for DVR & Live OTA TV, JRMC for multi-zone audio, EG, MiCasaVerde Vera3, USB-UIRT IR receiver, Harmony remote, 5.2 home theater system

kkl
Experienced User
Posts: 306
Joined: Wed May 04, 2011 9:32 pm

Re: How To Detect UPS shutdown command, over USB?

Post by kkl » Mon Dec 26, 2011 7:20 pm

Assuming you have the UPS USB driver installed, have you tried pulling the power plug to see if it sends an Event to EG? If it does, you can trigger you Action off of the Event.

Dragon470
Experienced User
Posts: 203
Joined: Thu Feb 10, 2011 2:16 am

Re: How To Detect UPS shutdown command, over USB?

Post by Dragon470 » Wed Dec 28, 2011 12:44 am

I have a ups (cyberpower) and I can get the events from it via the generic HID plugin. This will be different for many models, but it should be there as HID was the adopted standard for usb communication for ups on windows.

kkl
Experienced User
Posts: 306
Joined: Wed May 04, 2011 9:32 pm

Re: How To Detect UPS shutdown command, over USB?

Post by kkl » Wed Dec 28, 2011 5:59 am

I just tried what I suggested and it does work. When I pull the USB cable on my UPS, I see two events in EG:

System.DeviceRemoved [u'\\\\?\\HID#VID_0764&PID_0501#6&a0f2497&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}']
System.DeviceRemoved [u'\\\\?\\USB#VID_0764&PID_0501#CPS#{a5dcbf10-6530-11d2-901f-00c04fb951ed}']

As you mentioned, each device will generate a variation of this. Create a Macro with an Action that you want to use. Drag one of these Events from the left pane of EG to the top of that Macro. It worked for me.

EDIT: I read back through the original question and realize that my response was for a little bit different scenario. I'm not able to simulate a shutdown right now.

Post Reply