So the GUI works fine for me, but when trying to connect to my bridge via
the console, I get this:
Rules, sensors, scenes, schedules cannot be created by console. Please
use WinHue 3 desktop application to create them. You need to run the connect command the first time you want to send a
command to the bridge using whc -ip:192.168.x.x -connect (ip and connect
must be in that order)
C:\Program Files (x86)\WinHue 3>whc -ip:192.168.1.144 -connect
The following commands were ignored : -ip:192.168.1.144,-connect
Does anyone have any ideas? I'd LOVE for this to work! I really want a
command line interface to these lights, then I can script away to my hearts
content!
Thanks!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If you are using the latest version of WinHue you do not need to do the connect. Just pair the bridge once with WinHue gui and the console will work after that. I might have forgotten to change the message in the console version of WinHue after changing this.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks! I've just tried it on a 32 bit machine and I had the same results :\ I've paired the hub with the GUI and everything works, but the cli still doesn't do anything.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The good news is that I can now poll groups and lights! :) but I still can't control them. I get this strange message. It's running in the same folder however things
C:\Program Files (x86)\WinHue 3>whc -l=1 --bri=254
Error : Sorry, this program cannot be run alone by itself and require to be located in it's original folder.
Am I doing something wrong?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Weird I can't seem to reproduce that here... I wrote exactly what you have and the command is going to the bridge. Can you try to use : instead of = and only one - for the bri and see if that makes a difference ?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
C:\Program Files (x86)\WinHue 3>whc -light=1 -bri=254
Error : Sorry, this program cannot be run alone by itself and require to be located in it's original folder.
C:\Program Files (x86)\WinHue 3>whc --light=1 -bri=254
Error : Sorry, this program cannot be run alone by itself and require to be located in it's original folder.
C:\Program Files (x86)\WinHue 3>whc -light:1 -bri:254
Error : Sorry, this program cannot be run alone by itself and require to be located in it's original folder.
C:\Program Files (x86)\WinHue 3>whc -light=1 -bri:254
Error : Sorry, this program cannot be run alone by itself and require to be located in it's original folder.
C:\Program Files (x86)\WinHue 3>
I have a gen 1 bridge, does that matter at all?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
most likely not. I have both version at home and my main bridge is a gen 1. I'll try to add something that gives more info about the error give me a few minutes.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
C:\Program Files (x86)\WinHue 3>whc -light=1 -bri=254
Could not load type 'HueLib_base.CommonProperties' from assembly 'HueLib_base, Version=1.0.0.0, Culture=neutral, PublicKeyToken=64b62facfca38583'.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Well, the good news is that the new version can still pull data from the hub, but I still can't send any data to it.
C:\Program Files (x86)\WinHue 3>whc -lg
[ID]=1, Name=Master Bedroom, MembersID=[1,2], Type=Room
[ID]=2, Name=Living Room, MembersID=[], Type=Room
C:\Program Files (x86)\WinHue 3>whc -light=1 -bri=254
An error occured while sending the light state to the bridge.
C:\Program Files (x86)\WinHue 3>whc -light:1 -bri:254
An error occured while sending the light state to the bridge.
C:\Program Files (x86)\WinHue 3>whc -light:1 -bri:254
An error occured while sending the light state to the bridge.
C:\Program Files (x86)\WinHue 3>
That last command was after I copied your extended debug output whc.exe to the folder. I guess there's no debug output on that error :P
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
C:\Program Files (x86)\WinHue 3>whc -light:1 -bri:254
An error occured while sending the light state to the bridge.
Type : 201, parameter, bri, is not modifiable. Device is set to off. at address /lights/1/state/bri.
C:\Program Files (x86)\WinHue 3>whc -light:1 -bri:254 -on:1
Error ON invalid value 1
C:\Program Files (x86)\WinHue 3>whc -g=1 -on=1
ON invalid value 1
C:\Program Files (x86)\WinHue 3>whc -g=1 -on=yes
ON invalid value yes
C:\Program Files (x86)\WinHue 3>whc -g=1 -on=true
Group action sent succesfully to group : 1
C:\Program Files (x86)\WinHue 3>whc -g=1 -on=false
Group action sent succesfully to group : 1
C:\Program Files (x86)\WinHue 3>
I noticed on the wiki it mentions to use true or false, from the help text in the file it didn't mention it. Can I suggest to include it? Also, I like that more talkative error! I didn't realize the light had to be told to go on to set a brightness level. I actually didn't notice that was an option at all!
Thank you!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Well technically true and false should work. But yes I will add this to the help in the file. For the light yes if it is off you need to send a on command otherwise you'll get an error. That's how the bridge works.
Last edit: Hyrules 2016-06-02
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thank you! My only other experience with scripting these lights was with a Tasker plugin. I did not realize that a specific 'on' command needed to be sent before you could start adjusting them.
I seem to have run into another error while exploring all the other commands your program has to offer
C:\Program Files (x86)\WinHue 3>whc -lightstate=1
Object reference not set to an instance of an object.
C:\Program Files (x86)\WinHue 3>whc -lg
[ID]=1, Name=Master Bedroom, MembersID=[1,2], Type=Room
[ID]=2, Name=Living Room, MembersID=[], Type=Room
C:\Program Files (x86)\WinHue 3>whc -groupstate=1
C:\Program Files (x86)\WinHue 3>whc -g=1 -on=true
Group action sent succesfully to group : 1
C:\Program Files (x86)\WinHue 3>whc -groupstate=1
C:\Program Files (x86)\WinHue 3>whc --groupstate=1
C:\Program Files (x86)\WinHue 3>whc --groupstate:1
C:\Program Files (x86)\WinHue 3>whc -groupstate:1
C:\Program Files (x86)\WinHue 3>
I can't seem to get the groupstate or lightstate of anything.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I will issue a new whc tomorrow. The problem is deeper than it appears. It goes all the way to my library that get the states. Normally you cannot ask for a group or light that doesn't exists in WinHue Gui but in the console there is nothing preventing the user from trying to get a group or light that doesn't exists in the bridge thus giving the object not set error.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
So the GUI works fine for me, but when trying to connect to my bridge via
the console, I get this:
Rules, sensors, scenes, schedules cannot be created by console. Please
use WinHue 3 desktop application to create them.
You need to run the connect command the first time you want to send a
command to the bridge using whc -ip:192.168.x.x -connect (ip and connect
must be in that order)
C:\Program Files (x86)\WinHue 3>whc -ip:192.168.1.144 -connect
The following commands were ignored : -ip:192.168.1.144,-connect
Does anyone have any ideas? I'd LOVE for this to work! I really want a
command line interface to these lights, then I can script away to my hearts
content!
Thanks!
If you are using the latest version of WinHue you do not need to do the connect. Just pair the bridge once with WinHue gui and the console will work after that. I might have forgotten to change the message in the console version of WinHue after changing this.
Well, the reason I tried to connect is that none of the console functions work for me.
C:\Program Files (x86)\WinHue 3>whc -ll
An error occured while fetching the list of lights.
C:\Program Files (x86)\WinHue 3>whc -lg
An error occured while fetching the list of groups.
C:\Program Files (x86)\WinHue 3>whc -ls
An error occured while fetching the list of scenes.
C:\Program Files (x86)\WinHue 3>whc -lc
An error occured while fetching the list of schedules.
C:\Program Files (x86)\WinHue 3>whc -lo
An error occured while fetching the list of sensors.
I'm running this on Windows 10. Could that be an isssue?
No windows 10 should work fine. I have it and others reported it works fine under it. I'll take a look to see if I didn't miss something.
Hmm... I'll try it on another machine and see if it makes a difference. Let me know if you find anything! Thanks!
There is definitely a bug here let me fix it and i'll give you a version to try.
Thanks! I've just tried it on a 32 bit machine and I had the same results :\ I've paired the hub with the GUI and everything works, but the cli still doesn't do anything.
Here you go. Just replace the one in WinHue folder with this version. It should now work properly.
Last edit: Hyrules 2016-06-02
The good news is that I can now poll groups and lights! :) but I still can't control them. I get this strange message. It's running in the same folder however things
C:\Program Files (x86)\WinHue 3>whc -lg
[ID]=1, Name=Master Bedroom, MembersID=[1,2], Type=Room
[ID]=2, Name=Living Room, MembersID=[], Type=Room
C:\Program Files (x86)\WinHue 3>whc -l=1 --bri=254
Error : Sorry, this program cannot be run alone by itself and require to be located in it's original folder.
Am I doing something wrong?
Weird I can't seem to reproduce that here... I wrote exactly what you have and the command is going to the bridge. Can you try to use : instead of = and only one - for the bri and see if that makes a difference ?
Damn...
I have a gen 1 bridge, does that matter at all?
most likely not. I have both version at home and my main bridge is a gen 1. I'll try to add something that gives more info about the error give me a few minutes.
Here this version is not fixed but it'll get me an more explicit error.
haha... it's not a bug it's something I changed in the last version. Here is the full lastest version of WinHue.
Well, the good news is that the new version can still pull data from the hub, but I still can't send any data to it.
That last command was after I copied your extended debug output whc.exe to the folder. I guess there's no debug output on that error :P
Ok here is another one with a more talkative error : Again just replace the one in the WinHue folder with this one.
AH HAH!!!! IT WORKS!
I noticed on the wiki it mentions to use true or false, from the help text in the file it didn't mention it. Can I suggest to include it? Also, I like that more talkative error! I didn't realize the light had to be told to go on to set a brightness level. I actually didn't notice that was an option at all!
Thank you!
Well technically true and false should work. But yes I will add this to the help in the file. For the light yes if it is off you need to send a on command otherwise you'll get an error. That's how the bridge works.
Last edit: Hyrules 2016-06-02
Thank you! My only other experience with scripting these lights was with a Tasker plugin. I did not realize that a specific 'on' command needed to be sent before you could start adjusting them.
I seem to have run into another error while exploring all the other commands your program has to offer
I can't seem to get the groupstate or lightstate of anything.
I have fixed the group state showing nothing. Lightstate on the other hand not sure what causes this but I'll add a check to prevent this error.
Anything I can do on my end to get group state to show? Or will you be issuing a patch/file?
I will issue a new whc tomorrow. The problem is deeper than it appears. It goes all the way to my library that get the states. Normally you cannot ask for a group or light that doesn't exists in WinHue Gui but in the console there is nothing preventing the user from trying to get a group or light that doesn't exists in the bridge thus giving the object not set error.
Thanks! Looking forward to the new build!
Here is the latest version. It should be fixed.