Daemon

Thanks, but it wasn't quite what I was looking for... I'd like to be able to control devices such as lights which only use USB ports for drawing power. usbconfig(8) showed no indication that I had a lamp connected to a port.

Aspiring Daemon

If you have a purely passive lamp, which has no electronics that's connected to the two USB data pins, and only uses the two USB power pins to get 5V using at most the minimum unmanaged power (which I think is 100 or 150mA, the details are lost in my brain), then there is nothing you can control. I think such devices do exist; whether they are USB standard conforming would be a question for a USB expert.

If you have USB-conforming devices, they use the data pins to speak some USB protocol which controls power delivery. This is the point where the USB controller (host) can perform power management, and this is the point where programs like usbcontrol can interact with the USB controller.

Daemon

If you have a purely passive lamp, which has no electronics that's connected to the two USB data pins, and only uses the two USB power pins to get 5V using at most the minimum unmanaged power (which I think is 100 or 150mA, the details are lost in my brain), then there is nothing you can control. I think such devices do exist; whether they are USB standard conforming would be a question for a USB expert.

Aspiring Daemon

Actually, on further thinking: I think the USB controller chips may be capable of turning the +5V power completely off. But power management of USB is complicated, and involves the OS, the motherboard's ACPI implementation (for power during sleep and such things), and the controller hardware. You'll either have to rely on trial and error (start with "usbconfig power_off"), or read the whole specification and the interface documents (which sounds like a lot of work).