Table of Contents

Method StartDiscovery

Namespace
Yeelight
Assembly
YeelightClient.dll

StartDiscovery(TimeSpan?)

Searches for lights now and every interval, on every network that this computer is on, and takes over the answers. A search goes out as a multicast and as a broadcast, and is sent three times (see SearchBurst), because UDP over WiFi loses packets. Calling it again starts anew (to change the interval, for example).

public void StartDiscovery(TimeSpan? interval = null)

Parameters

interval TimeSpan?

The time between two searches, from a second to 24 days; null is a minute.

Exceptions

ArgumentOutOfRangeException

The interval cannot be used.

ObjectDisposedException

The client is disposed.