Set_music command

from http://www.yeelight.com/download/Yeelight_Inter-Operation_Spec.pdf

Is this the same as setting music mode from the Android app? Reason I ask is that the parameter host is descrived as “the IP address of the music server”. Could someone provide an example of how this would be used?

Thanks,
Corbin

The differences between music mode and normal mode is that there is no command quota and no property change reported.
The set_music command is to enable the music mode, once received the command, the bulb will act as a TCP client to connect to the server specified in the parameter and from then on, the server can send any commands to the bulb. The music-to-light transformation part should be done by music server (normally use FFT).
Our android app just implements the music-to-light transformation algorithm and send the command to the bulb. User’s android phone is acting as the music server.
Under music mode, the bulb acts as the client side because it’s a bit easier for music server to play music to multiple bulbs at the same time.

1 个赞

Excellent explanation, thank you!

Is it possible to implement a strobe effect with this method? I’ve tried but it seems to hit a limit of how fast it can be switched.

You can look into “start_cf” method which should be powerful enough to implement most of the effect.

that works great, thanks. it does seem to be limited to 50ms minimum, is this to protect the light?

We put on a limit to 50ms on purpose, because our color changing timer’s granularity is 10ms, we don’t think color changes in 50ms or less is visible or accurate enough.