Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Public Refresh method #15

Open
kylehowells opened this issue Oct 15, 2014 · 1 comment
Open

Public Refresh method #15

kylehowells opened this issue Oct 15, 2014 · 1 comment

Comments

@kylehowells
Copy link

As far as I can tell there there is no API to refresh for more lights, it is just expected the API will continue to work.

I have noticed that in practice it loses lights after long periods of time. My OSX menu bar app starts with the computer and then sits there all day and night. Eventually I've noticed it will think there are 0 lights available and sending the -allLightCollection a set power ON or OFF message does nothing.

However, opening the iOS LIFX app on my phone causes a fresh to occur and everything to suddenly be seen again. The app also has a refresh button in the left side panel at the bottom. I presume this button is calling -[LFXNetworkContext scanNetworkForLightStates] which is marked as private.

That method, or simply a stub -refresh method that just calls that method as an internal implementation detail if you wish to abstract it, needs to be made public so that 3rd party apps are capable of providing the user with a 'refresh' button if the application falls out of sync with reality.

@frakman1
Copy link

Agreed. I did NSTimer loop with the following:

    LFXNetworkContext *localNetworkContext = [[LFXClient sharedClient] localNetworkContext];

    for (LFXLight *aLight in localNetworkContext.allLightsCollection)
    {
         NSLog(@"%@",aLight);
    }

and it lists the same 3 bulbs forever even AFTER I've disconnected one from power!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants