Closed timothyb89 closed 10 years ago
Possible test build to fix: https://drive.google.com/file/d/0B30rtS9KioFNXzIyMjd5SDJrekk/edit?usp=sharing
Just installed it. Now both bulbs with their correct names are displayed. However, only the first button works, the second one doesn't do anything again. Tapping the first bulb also toggles the power for both bulbs.
Is there any chance you might be able to get logcat output for when you run into the issue? Specifically if you open the app and force close it (to make sure the service is killed) and then try using it - toggling bulbs, using a Tasker action, etc.
I/ActivityManager( 595): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=org.timothyb89.lifx.tasker/.SimpleControlActivity bnds=[364,668][546,859]} from pid 882
I/ActivityManager( 595): Start proc org.timothyb89.lifx.tasker for activity org.timothyb89.lifx.tasker/.SimpleControlActivity: pid=24440 uid=10124 gids={50124, 3003}
I/SimpleControlActivity(24440): Starting service
I/o.t.l.t.LIFXService(24440): Starting gateway discovery...
I/o.t.l.t.LIFXService(24440): LIFX service started
D/dalvikvm(24440): GC_CONCURRENT freed 227K, 3% free 9164K/9424K, paused 3ms+2ms, total 23ms
I/Adreno-EGL(24440):
Pressing the second bulb button didn't produce any output in logcat
I've been able to reproduce this with 2 bulbs on the same gateway in the lifx-java
parent project. I believe it's because it was addressing the bulbs incorrectly (specifically, using the 'site' field incorrectly and not setting the 'bulb address' field when generating packets).
Simple case to reproduce using lifx-java directly: https://gist.github.com/timothyb89/2fdad0f3e1ac1550dbb2 (has been fixed, will only fail on timothyb89/lifx-java@1ba974135c16a0de93f0f4bc903fea5a2495ba7c and before)
Test build with a fix: https://drive.google.com/file/d/0B30rtS9KioFNc0ZVa0tMbFlPQlU/edit?usp=sharing
I'm having good results with my own bulbs so far - let me know if this works for you!
Yes! This works now
I've pushed an update to the Play Store with the fixes - thanks for the feedback!
Currently the discovery thread is killed as soon as the first gateway bulb is found. If multiple gateways exist on the network, they may never be discovered, or could only be discovered intermittently. This was a somewhat intentional TODO while getting the discovery working since there's "perfect" solution.
Possibly one of:
We do need to minimize the time we have the broadcast port held open for to make sure other LIFX apps won't be interfered with.