janstol / yeedart Goto Github PK
View Code? Open in Web Editor NEWSimple Dart library that lets you control Yeelight devices over LAN.
License: MIT License
Simple Dart library that lets you control Yeelight devices over LAN.
License: MIT License
Hello!
First of all thank you for making this package!
I'm not sure why but I can't find any lights, they have LAN control on. Checked on android and windows. Played around with different timeout settings but I can't seem to find the problem.
This is the code I'm using right now: final response = await Yeelight.discover(timeout: Duration(seconds: 10));
Hope you can help me!
In the documentation of the code it is written that
/// * [colorTemperature] - target color temperature (1700 - 6500 K).
What will happen if I will execute setColorTemperature
with color temperature smaller than 1700 or bigger than 6500?.
Will it round it to the closes similar value or the request will fail to change the color temperature at all?.
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 ?
when send any command (like on/off') i get next error
Error : SocketException: Broken pipe (OS Error: Broken pipe, errno = 32)
I'm checking bulb.isConnected before sending command and its true
I have Yeelink (not Yeelight) bulb and the discover function can't find it.
I can see and control this bulb using the official Yeelight app.
Is adding Yeelink support something that we are thinking of adding to this package or is it a different thing that does not belong under yeedart vision?
Lets update all packages to the last version
While using the Yeelight.discover
function I am getting
Null check operator used on a null value
Crash.
I have several smart devices in my home but currently it does not include any Yeelight devices.
The code is crashing inside
factory DiscoveryResponse.fromRawResponse(String rawResponse) {
and
rawResponse
Value is
M-SEARCH * HTTP/1.1
HOST: 239.255.255.250:1982
MAN: \"ssdp:discover\"
ST: wifi_bulb
Crashes on line 173
final match = regExp.firstMatch(rawResponse)!;
I think the titel says it all. Code is the same of course and I am finding 3 devices on android.
I have 4 bulbs, but when running the discovery, the list always contains only one element.
Initially, I thought that perhaps these are different models using a modified protocol.
After a brief search, I discovered the following: for your device to be visible during scanning, it MUST
be enabled in the official Yeeligh application. The option is called Lan Control
, and such an option is not available in the Xiaomi SmartHome application, for example. You can read more about it here, https://getyeti.webflow.io/posts/how-to-control-yeelight-and-your-smarthome-with-yeti, but I'll duplicate it because links on the internet are not always reliable.
Immediately after enabling this option, the device will be detected.
Hello,
I am trying to listen to state changes, to automatically update the app, but I get no events.
This is the used code
streamListener() { log("listening"); device.notificationMessageStream.listen((event) { log("received event"); event.params?.forEach( (key, value) { switch (key) { case 'power': properties['power'] = value; } }, ); notifyListeners(); }); }
First log is showing up. Received event is not when changing device state from the same device or e.g. Google home.
Sometimes when calling await device.turnOn(); I am getting this error
I/flutter (13754): Error : FormatException: Unexpected character (at line 2, character 1)
I/flutter (13754): {"id":969402310,"result":["ok"]}
Hacktoberfest 2022 has just started.
I was wondering if this repo will support Hacktoberfest, for that to happen it should just add hacktoberfest
Topic
And add the label hacktoberfest-accepted
to accepted pull requests.
The device from Yeelight.discover() return with an empty name ''
although the name appears in the Yeelight app.
Device type: yeelight 1SE
Other params seem correct.
Whenever my program is starting to search devices using yeedart without an internet connection I am getting this error
SocketException: Send failed (OS Error: Network is unreachable, errno = 101), address = 0.0.0.0, port = 1982
Not sure what is the expected behavior but let's discuss it.
I think it will be more appropriate to return empty results as if the package didn't find any device.
I think it will be good to have Tested devices/supported devices list in the readme.
I want to buy a new yeelight product and I am not sure how to check if this is compatible with this device.
As I am creating smart Hub in dart I will definitely try this package and probably (if it is working) include it to add support for Yeelight devices.
It will save me a lot of work so first of all many thanks.
Would love to hear why did you started this package.
What devices where tested.
If you know other dart packages to control smart devices products please let me know.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.