Menu

whc error "Program cannot be run alone"

Rottnroll
2016-03-08
2016-03-11
  • Rottnroll

    Rottnroll - 2016-03-08

    when using whc.exe to switch lights it keeps saying "Error : Sorry, this program cannot be run alone by itself..." Im running the program from an admin shell in its install dir. I could connect to the bridge and list lights/ groups but cannot set states. I have read about an error causing such problem in an earlier version, is this a bug or am I doing somthing wrong?

    Using WinHue beta 10 btw.

     
  • Hyrules

    Hyrules - 2016-03-08

    Yes there seems to be a bug with the latest version of whc. it's has not been updated for a while. I will try to update it soon.Even if you try previous version of whc with the latest WinHue, it won't work. Alot has changed in WinHue since I've updated whc. I will adapt whc to use WinHue settings.

     
  • Rottnroll

    Rottnroll - 2016-03-08

    Okay, looking forward to an update. Thanks for your effort!

     
  • Hyrules

    Hyrules - 2016-03-09

    Here you can try this version. Note that with the new version of WinHue, the ip and connect options are not available and needed anymore. whc will use the settings of WinHue so first you need to have WinHue paired with a bridge. Just replace the whc in the WinHue folder with the one in this zip file.

     
  • Rottnroll

    Rottnroll - 2016-03-09

    Ah, great. That sounds like a reasonable change. It was rather annoying to pair both programs separately. Im gonna give it a shot later tonight when im back home.

     
  • Rottnroll

    Rottnroll - 2016-03-09

    Dosent help. I see, the -ip option is no longer required. Still it keeps giving the error "Program cannot be run alone" when setting lightstates. Only listing the available lights is possible.

     
  • Hyrules

    Hyrules - 2016-03-09

    What command exactly are you entering ?

     
  • Rottnroll

    Rottnroll - 2016-03-10

    It's "whc.exe -l=1 -on" or maybe "--on" not sure, ain't at home to check exactly.

    "whc.exe --ll" did work and gave a list of available lights.

     
  • Rottnroll

    Rottnroll - 2016-03-10

    Had a quick peek at the source code and couldnt see any problems from it- if it helps i could offer to debug the issue this weekend.

     
  • Hyrules

    Hyrules - 2016-03-10

    Sure go ahead if you like. I know where it crashes I just don't know why. It throws an exception at the function which set the light state for some reason (SetLightState). I will take at look at it tomorrow

     
  • Hyrules

    Hyrules - 2016-03-10

    Ok got it. I was passing a dynamic value which in the end was a format not accepted by SetLightState. I changed the id type from byte to string in a later version of Huelib. Here this one should work. Tried it myself

     

    Last edit: Hyrules 2016-03-10
  • Rottnroll

    Rottnroll - 2016-03-11

    Works perfectly. thanks!

     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.