janstol / yeedart

Simple Dart library that lets you control Yeelight devices over LAN.
MIT License
10 stars 4 forks source link

Empty result from .discover() #1

Closed fmichenaud closed 4 years ago

fmichenaud commented 4 years ago

Hi.

I'm relatively new to Dart so it might be just me, but i can't get the .discover() method to work correctly.

For instance:

Future<void> _fetchLights() async { List<DiscoveryResponse> devices = await Yeelight.discover(); print(devices); }

always shows an empty array, even with a 30s timeout. All of my lights have LAN control enabled and I can control them with the library through their IPs, but I can't discover them through my Flutter app.

Am i doing something wrong, or maybe it is a dev environment issue ?

fmichenaud commented 4 years ago

2 has solved my issue.