In my experience, the UPS will be a downstream device (think printer, thumbstick, etc.) and you will optionally have some software (usually built into the OS) that detects the change in power source from the UPS and displays that to the user or logged somewhere.
The NAS doesn't talk to the UPS, it's the other way around. The UPS does all the talking, the attached NAS/PC/whatever just listens and reacts to whatever the UPS is telling it. On USB. That's why I suppose a hub might work.
“This Rat Covers Itself With Poison That Can Take Out an Elephant”
Much like a flatbed scanner talks to a computer and sends the image to the computer and not the other way around, you can't connect the scanner to two computers simultaneously.
Or a mouse, or a keyboard.
It'll still be two way communication. Host (NAS) and Device (UPS).
I'd love to see it work, but my guess is it won't.
I don't know, I guess whatever bus is in use or it blindly fires away on them all. There might be a way to do what you suggest (chain the devices via usb), but the custom code angle would be beyond my ken. I'll sniff around here http://www.apcupsd.org
“This Rat Covers Itself With Poison That Can Take Out an Elephant”
Indeed, but the USB spec doesn't allow what you want to do, even with a hub which itself counts as being a downstream device.
While you can have multiple downstream devices connected to one upstream you cannot have multiple upstream devices connected to one downstream. There are workarounds to this, like USB switches but these still only allow one upstream device. Pushing a button on the switch disconnects one upstream device and connects the other. The two upstream devices are never connected at the same time.
I wouldn't pursue what you're thinking. But what I would look into is having something as an intermediary device (think Raspberry Pi) that can be connected to the NAS and receive it's notifications and then communicate them over ethernet to the two or more upstream devices.