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

Transport Not Ready #24

Open
shaharwie opened this issue May 15, 2019 · 1 comment
Open

Transport Not Ready #24

shaharwie opened this issue May 15, 2019 · 1 comment

Comments

@shaharwie
Copy link

shaharwie commented May 15, 2019

Everytime I try to setColorCommand fireAndForget I get error: TransportNotReady
Any ideas why do I get this error?

Thanks!

@flowsprenger
Copy link
Owner

To send a command the SDK needs a connected UdpSocket, which is maintained while a LightService is started (let lightService = LightService(lightsChangeDispatcher: changeDispatcher)
lightService.start()) or a subscription exists on UdpTransport (if you are maintaining your own Transport).
If no open UdpSocket exists, all commands will throw an TransportNotReady exception until a socket has been opened.
Another reason (apart from being disposed or not subscribed) would that the phone is not connected to a wifi network.

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