I want to switch either a standard AC socket or a USB outlet on and off on a programmed cycle. But although there are many consumer-ready timers available to do this at set times of day, programmable to the minute, I want to be able to randomize the cycles and have it programmable to the second, or even the millisecond. I think either a device that I can program with a computer or something I could trigger remotely with a programmable app would work. Maybe there's an open source home automation system that would let me do this? Any ideas on what might work for me, half-baked or not, would be greatly appreciated.