Closed szupi-ipuzs closed 8 months ago
HI,
I would sugest to start debuggin in https://github.com/hencou/esphome_components/blob/main/components/mi/mi.cpp, in the function "Mi::handleListen()" starting from line 215. In that function, every configured "bulbId" is applied, and the ESP will listen to received commands then. I expect the ESP module can only accept commands from one configured bulbId, and the others will be ignored but I am no sure.
I am looking forward to your test results!
Hi, I now the following setup:
The MiLight hub (nodemcu + nrf24) flashed with esphome + your mi component is supposed to intercept the keypresses from the first S2, but is also paired with the FUT038s and can control the light. Here's the yaml I use (part of it):
The problem is: If I have only the "fake" light enabled (the other is commented out) then all the keypresses from the first S2 are received correctly. But as soon as I enable the "miboxer" light the keypresses from the first S2 are very rarely received. And sometimes even the wifi connection is dropped and I need to reset the hub. However sending the commands to FUT038s works fine. I've noticed that the first keypress always gets through, but later - very rarely. It's almost as if the receiver does not get cpu time to do the detection. The logs (VERY_VERBOSE) don't show anything interesting, but I can attach them if needed.
I can try debugging this, but don't really know where to start. Is there any particular place I where should add traces to see what's going on?