sahilchaddha / homebridge-yeelight-platform

Homebridge plugin for Yeelight Lights supporting Scenes/Moods/Color Flow/Custom Presets/Music Flow/Night Mode
MIT License
58 stars 7 forks source link

Why is the Command id = -1 ? #23

Closed derkomissarr closed 2 years ago

derkomissarr commented 4 years ago

Hej sahilchaddha

I really appreciate your work on this yeelight project and use your plugin daily to control an yeelight strip in my kitchen.
Today I wanted to integrate a newly bought yeelight strip which has the firmware 2.0.6_0063. Hardware ID: YLD004YL

The one in the Kitchen still has 1.4.2_0049 but has the same Hardware ID. This one works just fine. The "newer" one just wouldn’t work so I started debugging and stuff. The discovery worked fine, but turning on wasn’t possible – the response of the lightbulb was always an error “invalid command” grafik

I noticed that the message id in lightBulb.js (Line 110) is set to -1. The API docs from yeelight tells us that there is an int value necessary (see page 8). Do you know why -1 is applied to this value?

I changed it to 1. And now I’m able to turn them on or off. grafik

I don’t know if that is the path to absolute happiness. But maybe there are some changes in the firmware 2.0.6 that have an impact on your plugin.

Do you know anything about it?

Greets from Switzerland theInspector

sahilchaddha commented 4 years ago

-1 was set to support for older mono devices. What issue are you facing ?

derkomissarr commented 4 years ago

With "-1" turning the yeelight on wasn’t possible – the response of the yeelight device was always an error “invalid command” (see pictures)

With "1" it worked.

howyawn commented 2 years ago

hi, how did you change the ID to 1?