Re: Python USB control on Windows 7?

Discussion in 'Python' started by Chris Angelico, Dec 23, 2012.

  1. On Sun, Dec 23, 2012 at 6:28 PM, Tim Roberts <> wrote:
    > Duncan Booth <> wrote:
    >>
    >>In this year's Christmas Raffle at work I won a 'party-in-a-box' including
    >>USB fairy lights.
    >>
    >>They sit boringly on all the time, so does anyone know if I can toggle the
    >>power easily from a script? My work PC is running Win7.

    >
    > Not easily, no. It's not really a USB device -- I'm betting it doesn't
    > even enumerate. It's just sucking power from the USB wires. There's
    > nothing to control.


    Hmm. Can you control whether a particular port is on or off? (I have
    no idea what's possible with the underlying API, much less whether
    it's exposed.) It should in theory be possible - disable the
    appropriate USB port and the device loses power.

    ChrisA
    Chris Angelico, Dec 23, 2012
    #1
    1. Advertising

  2. On 12/23/2012 11:11 AM, Duncan Booth wrote:
    > So far as I can tell Windows doesn't let you turn the ports on and off. I
    > found some suggestion that by connecting it to a powered hub it may be
    > possible to toggle the hub power on and off but that many hubs don't bother
    > implementing the functionality.
    >
    > Thanks anyway.


    Or you might have more fun if you cut off the USB plug, and drive the
    thing directly using an Arduino board. You can use the USB serial port
    on it to prgrammatically turn the thing on and off from your computer,
    or a billion other possible things.
    Michael Torrie, Dec 23, 2012
    #2
    1. Advertising

  3. On Sun, 23 Dec 2012 14:14:08 -0700, Michael Torrie <>
    declaimed the following in gmane.comp.python.general:

    > On 12/23/2012 11:11 AM, Duncan Booth wrote:
    > > So far as I can tell Windows doesn't let you turn the ports on and off. I
    > > found some suggestion that by connecting it to a powered hub it may be
    > > possible to toggle the hub power on and off but that many hubs don't bother
    > > implementing the functionality.
    > >
    > > Thanks anyway.

    >
    > Or you might have more fun if you cut off the USB plug, and drive the
    > thing directly using an Arduino board. You can use the USB serial port
    > on it to prgrammatically turn the thing on and off from your computer,
    > or a billion other possible things.


    Hook up a USB > X-10 controller, plug an X-10 switchable outlet
    module somewhere, plug-in a USB charger unit, and plug the lights into
    the USB charger... Then use the computer to command the outlet module
    on/off...
    --
    Wulfraed Dennis Lee Bieber AF6VN
    HTTP://wlfraed.home.netcom.com/
    Dennis Lee Bieber, Dec 23, 2012
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Dan
    Replies:
    1
    Views:
    6,058
  2. galapogos
    Replies:
    4
    Views:
    352
    Kenny McCormack
    May 11, 2007
  3. LittleAlex
    Replies:
    0
    Views:
    414
    LittleAlex
    Sep 15, 2008
  4. dq
    Replies:
    11
    Views:
    372
  5. Michael Brock

    Ruby, USB, and Windows

    Michael Brock, Jun 17, 2005, in forum: Ruby
    Replies:
    1
    Views:
    129
    Luke Graham
    Jun 17, 2005
Loading...

Share This Page