Giter Club home page Giter Club logo

Comments (4)

aholstenson avatar aholstenson commented on July 16, 2024

Hi. All Yeelights become devices of type light.

In addition some lights can have an undocumented capability called color:rgb which has a setRGB method that takes a color in hex-format or as an object with the properties red, green, blue with values between 0 and 255. The code for the color bulb can be found in the file yeelight.color.js.

This is experimental and will probably change in the next few releases as I haven't had time to add proper support for all Yeelight features yet, for example #30 is an issue about adding support for hue and saturation.

from miio.

rench avatar rench commented on July 16, 2024

Ok. I know that.
I don't have any yeelight device,i want to know is these methods in this document ·https://www.yeelight.com/download/Yeelight_Inter-Operation_Spec.pdf· whether could be called in miio project?

if can, can i add method directly.
i have a project with mijia,https://github.com/rench/homebridge-smarthome/blob/master/kit/mijia/yeelight.js, i use some method to covert hsv to rgb . i think it work correctly. but some other method can't be invoke like set_mode,set_ct methods in pdf document.

from miio.

aholstenson avatar aholstenson commented on July 16, 2024

The ambition is to support most of that in the end, but everything is not supported yet. And those that are supported may be named differently, an example would be set_ct which is available if a light has the capability color:temperature in which case the method setColorTemperature is available.

And if something is missing you can always call any method on the device directly with call, which is how all the upper-level methods such as setRGB and setPower are implemented anyways. It's possible to do something like this device.call('set_power', [ 'off' ]), but then you are communicating directly with the device and other implemented behaviour for the device might break.

from miio.

rench avatar rench commented on July 16, 2024

Ok, I see.
Some lighting equipment does not support the property, if I call the method certainly does not take effect. Because I do not have Yeelight's device, do not know if you can call the advanced method directly.

Since I saw Yeelight's PDF document, I thought that only way through the way that SSDP was called.
Do you use miio's command line to set some other properties of Yeelight, such as start_cf, because I do not know if the method of the PDF document is the same method name in the MIIO protocol.

from miio.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.