New Yeelight iOS App

The app is now online on the App Store. Link

Please report all bugs in this topic. I am already working on a color flow editor and some connectivity issues i’ve found.

Great news!!! We will try it today.

Hi weiwei,

Please tell me how it behaves with more than 3 bulbs (assuming you have more than 3).

Also, don’t forget that this is the first version and the only tester so far was myself. With your help we can make this app better.

Thanks

Hi Kostas,

I just tried your App, it’s really amazing!! We will definitely learn a lot from your design! It’s responding fast and the UI is also very intuitive! Thank you!

Let me know if you need more programming interface on the bulb from a App developer’s perspective.

Thanks,
Wilson

Thanks for you good words,

Does the app plays well with other devices than LED Color and LED White bulbs? I am planning to buy a Mi LED Desk Lamp, a LED Ceiling Light and a LED stripe to make the app compatible with them.

By the way, already working on an update. It will contain small bugfixes and UI adjustments.The color flow editor to follow afterwards:

Love the app!

I have found it very fast and responsive and looks good with a clear ui. Can’t wait for further updates!

I already tried all our WiFi products, all of them work properly although some type of devices report “unsupported type”. Two minor issues you may need to consider:

  1. After the device is powered off, the App takes a very long time to detect “offline”, please shorten that time through TCP keep alive mechanism.
  2. When the App is switched to background, all TCP connection between App and devices seems to be lost and it will take some time to recover, which impact the user experience a bit.

Thanks,
Wilson

Hey Wilson,

Regarding to your first point: I’ve tried the setsockopt playing around with different parameters:

[sock performBlock:^{
    int fd = [sock socketFD];
    int on = 1, interval = 5, retries = 3;

    if (setsockopt(fd, SOL_SOCKET,  SO_KEEPALIVE, &on, sizeof(on)) == -1) {
        NSLog(@"err");
    }
    if (setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, (char*)&on, sizeof(on)) == -1) {
        NSLog(@"err1");
    }
    if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPINTVL, &interval, sizeof(interval)) == -1) {
        NSLog(@"err2");
    }
    if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPCNT, &retries, sizeof(retries)) == -1) {
        NSLog(@"err3");
    }
}];

Seems that they have no effect even though the calls does not return -1.

I probably have to dig deeper in the socket programming to achieve this. I am using GCDAsyncSocket, the same library you have on your iOS example.

Regarding your second point: When the app goes to sleep (you lock the screen) all the sockets are getting disconnected. Thats an iOS thing again. I am not sure if i can do anything to keep them connected. To solve this i have a timer for each connection that attempts to reconnect every 10 seconds. In the next update it will restore the connection almost instantly once you get back in the app.This update is already under review from apple. So this is already solved.

Thanks for your info!
I just googled iOS TCP keepalive, seems this is the correct solution: http://stackoverflow.com/questions/25665837/is-it-possible-to-activate-tcp-keepalive-on-apple-ios-devices

I just did what the second answer on stackOverflow said. It works!

Thanks a lot. I will include this on the 1.2 update. (1.1 is under review now)

One thing that i will love to see implemented from your side is a reset_to_default command. Having this, a user can reset its device back on the config that he set as default (instead of switching the bulb on/off physically). Or even with a group command you can reset the state for all your devices.

OK, we will consider add this interface.

Hi everyone,

I am working on a color flow editor. Hopefully i will have time to finish it soon. Here is a demo:

https://youtu.be/beMaAeI6q8U

:+1:

Hi Kostas,
It’s a great app. Firstly, it’s lightning fast compares to the official app. Secondly, the color adjustment UI is much easier to use.
The big bonus is it doesn’t rely on the internet to operate so I can still control my bulbs when I get disconnected.
But I think the app name isn’t good at all. I discover this app by reading this topic. Searching for “Yeelight” in appstore doesn’t suggest your app in the results so I don’t think people will know about it.

Hey longnd,

Thank you very much for your feedback! Apparently Apple didn’t allow me to use anything that contains YeeLight in the name :

Your app or its metadata appears to contain misleading content. Specifically, your app title generates a misleading association with Yeelight.

So even though i’ve got permission from weiwei to use the name “YeeLight Wifi”, Apple doesn’t allow it.:unamused:

I think there must be a workaround. Let’s take Phillip hue as an example. If you try to search for “hue” in the AppStore, there are a lot of apps listed out beside the official app.
I think if you name the app “Yeelight wifi”, it makes sense if Apple considers it misleading - since it quickly makes people believe that it’s an official Yeelight app (for wifi bulbs).
I don’t know how the AppStore suggest the apps based on the keyword; maybe it relies on the app title or description.
In the worst case, I think even “Kostas control - for Yeelight” could be better than the current name since it suggests the app’s purpose for the user.

Would it possible to show the RGB values for any colour chosen in the app?

I love your app also, as it is much quicker than the official one. Thanks for the great work.

Sorry for the delayed response. I’ve been a busy lately. I will probably adopt your title. It will be something like “LightYeear - Control your yeelight”. Thanks for the suggestion!

Thanks for your comments ndionisio! I think by adding RGB numbers you increasing the complexity. I wanted the app to be easy to use.

@weiwei,

Do you have an 128 byte limitation on the strings of the responses?

Try to play this tuple:

{"id":999,"method":"start_cf","params":[16,1,"500,2,6500,50,500,2,6100,50,500,2,6100,50,500,2,5300,50,500,2,4900,50,500,2,4500,50,500,2,4100,50,500,2,3300,50,500,2,2900,50,500,2,2500,50,500,2,2100,50,500,2,1700,10"]}

It looks like the bulb plays the tuple normally, but the notification that comes on my telnet looks like this:

{"flow_params":"0,1,500,2,6500,50,500,2,6100,50,500,2,6100,50,500,2,5300,50,500,2,4900,50,500,2,4500,50,500,2,4100,50,500,2,3300,50,500,2,2900,"}}

…which is a broken JSON string.