PhilWheat / LIFX-Control

C# test project for controlling LIFX bulbs. Not associated with LIFX, using packet information documented by https://github.com/magicmonkey/lifxjs
16 stars 1 forks source link

0 Bulbs found #5

Open adamscho opened 10 years ago

adamscho commented 10 years ago

Just recieved my Lifx, it works like expected but when i run the Lifx Control from this library, it returns "0 bulbs found"

PhilWheat commented 10 years ago

Have you already set them up with one of the mobile apps? I don’t yet have setup implemented in the example. The Control can set the Access Point, but I haven’t put the workflow into the WPF app to attach to the LIFX setup network, assign the new AP and then have you re-connect to your network.

From: adamscho [mailto:notifications@github.com] Sent: Thursday, February 27, 2014 5:45 PM To: PhilWheat/LIFX-Control Subject: [LIFX-Control] 0 Bulbs found (#5)

Just recieved my Lifx, it works like expected but when i run the Lifx Control from this library, it returns "0 bulbs found"

— Reply to this email directly or view it on GitHubhttps://github.com/PhilWheat/LIFX-Control/issues/5.

adamscho commented 10 years ago

Yes i have set it up on the mobile app. Does that make it harder to set up? How exactly should i go about getting it connected? (in noob terms please :))

adamscho commented 10 years ago

btw i have only an intro class to programming worth of experience...

PhilWheat commented 10 years ago

It doesn’t make it harder to set up, you just have to connect it to your network through one of the mobile apps for the moment. After that it should auto connect.

Let me ask – when you run it, it shows 0 bulbs. Can you run the program and let it sit for about 5 minuts? The WPF sample app polls for the bulbs every minute to check for updates, so it should find them after a couple of polls.

If it’s not seeing anything after then, let me know and I’ll see if I can put a check to do additional discovery.

Also, are you compiling the source or are you running the app from the .zip file?

From: adamscho [mailto:notifications@github.com] Sent: Thursday, February 27, 2014 6:18 PM To: PhilWheat/LIFX-Control Cc: Philip Wheat Subject: Re: [LIFX-Control] 0 Bulbs found (#5)

btw i have only an intro class to programming worth of experience...

— Reply to this email directly or view it on GitHubhttps://github.com/PhilWheat/LIFX-Control/issues/5#issuecomment-36308620.

adamscho commented 10 years ago

I am running Lifxcontroller.exe. When i run this it says "no bulbs found, scanning anyway..." then flashes something along the lines of "none found" for a split second, then closes. Now for some reason when i run it, it just closes immediately.

adamscho commented 10 years ago

I am now letting Lifxcontroltest.exe run for a few minutes

PhilWheat commented 10 years ago

Oh – you’re running the command line tool. Let me see if Shane can answer that question – he did the command tool, I did the WPF application.

From: adamscho [mailto:notifications@github.com] Sent: Thursday, February 27, 2014 6:54 PM To: PhilWheat/LIFX-Control Cc: Philip Wheat Subject: Re: [LIFX-Control] 0 Bulbs found (#5)

I am running Lifxcontroller.exe. When i run this it says "no bulbs found, scanning anyway..." then flashes something along the lines of "none found" for a split second, then closes. Now for some reason when i run it, it just closes immediately.

— Reply to this email directly or view it on GitHubhttps://github.com/PhilWheat/LIFX-Control/issues/5#issuecomment-36310982.

adamscho commented 10 years ago

Excuse my incompetence but what exactly is the difference?

codemonkey76 commented 10 years ago

Hi adamscho, The command line tool is used to control your bulbs via a scipt or batch file, the reason it took longer to run the first time than the subsequent times is because it stores what bulbs it finds in a file, and uses that for future runs.

You probably want to run the windows version of the app, unless you have experience on the command line.

If you do intend to use the command line app you can get a list of options with LIFXController.exe -help

here is an example of usage: LIFXController.exe -b=60000 -l=Lounge

this set's the bulb named "Lounge" to brightness 60000 (range is from 0 to 65,536)

adamscho commented 10 years ago

Have been running the WPF application for a while now and it still says 0 bulbs. I have the bulb on and presumably connected to the network considering i have control of it over the mobile app. I think i will stick to the windows application which i assume is the WPF that you made?

PhilWheat commented 10 years ago

Yes - Shane did the Command line app, I did the WPF app (we're splitting scenarios.)

Look in the directory where you ran the command line app (LIFXController.exe) and see if you have a text file - that should show the IP address if it found one for your bulbs.

For troubleshooting, are you connected to the same wireless network with your phone and your PC? The apps look on the local subnet for the bulbs (basically the first 3 sets of numbers have to be the same in the IP for the app and the bulb, ie (192.168.1.xxx))

adamscho commented 10 years ago

I have values for Bulbmac, bulbgateway, and gatewaymac. Lifxcontroller.exe is detecting a bulb but i cant find an ip for it. The bulb is on the same network as my computer, but my computer is via LAN. All of a sudden i just ran the windows app and it connected and i have control...not sure why it suddenly started working. Thanks for all your help. While I have you, is there any feature that allows for timing controls such as the light fading on at a specific time every morning?

PhilWheat commented 10 years ago

That’s in the framework (as a matter of fact if you click the “Read Test” button in the test app it sets up a pre-programmed sequence of packets. To be honest, I just need to find a good date/time control to set the duration to do a “Do later” button in the app to schedule actions. I won’t be able to get to it tonight, but hopefully over the weekend.

Just got my Myo in and I’m trying to put together some sample applications for that as well.

From: adamscho [mailto:notifications@github.com] Sent: Thursday, February 27, 2014 7:29 PM To: PhilWheat/LIFX-Control Cc: Philip Wheat Subject: Re: [LIFX-Control] 0 Bulbs found (#5)

I have values for Bulbmac, bulbgateway, and gatewaymac. Lifxcontroller.exe is detecting a bulb but i cant find an ip for it. The bulb is on the same network as my computer, but my computer is via LAN. All of a sudden i just ran the windows app and it connected and i have control...not sure why it suddenly started working. Thanks for all your help. While I have you, is there any feature that allows for timing controls such as the light fading on at a specific time every morning?

— Reply to this email directly or view it on GitHubhttps://github.com/PhilWheat/LIFX-Control/issues/5#issuecomment-36313128.

adamscho commented 10 years ago

Oh awesome Ive never seen that before. Ill check back next week and update if its available. Thanks for the help and contribution!

adamscho commented 10 years ago

Hate to bother again with such a simple problem but i cant seem to find this "read test" button in LIFXControlTest.exe window

PhilWheat commented 10 years ago

I hadn’t updated the .zip to keep it in synch with the app. Updated now (that part is manual, I need to figure out how to automate it.)

From: adamscho [mailto:notifications@github.com] Sent: Thursday, February 27, 2014 7:43 PM To: PhilWheat/LIFX-Control Cc: Philip Wheat Subject: Re: [LIFX-Control] 0 Bulbs found (#5)

Hate to bother again with such a simple problem but i cant seem to find this "read test" button in LIFXControlTest.exe window

— Reply to this email directly or view it on GitHubhttps://github.com/PhilWheat/LIFX-Control/issues/5#issuecomment-36313977.

adamscho commented 10 years ago

Works perfectly, thank you!

PhilWheat commented 10 years ago

I probably should have mentioned what the Read Test does. It originally went through all the read packets (now commented out while I put some more handling of edge cases in.) But it also sets up a delayed packet sequence.

Starts with setting brightness and color. Changes the color every minute for 4 minutes. After 10 minutes it turns the bulb brightness off and sets it to turn on at 8am the next morning.

The app needs to be left running for the events to fire, it does the scheduling internally. You can send to multiple bulbs separately to test the difference in timing.