-
-
Notifications
You must be signed in to change notification settings - Fork 31.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Xiaomi Mi Bedside Lamp 2 - MJCTD02YL - socket error #46997
Comments
Hey there @rytilahti, @zewelor, @shenxn, mind taking a look at this issue as its been labeled with an integration ( |
Seems LAN control option is removed in latest versions of the Yeelight app. Try using an earlier version of the app. I tried 3.1.98 on Android and that works. |
I have LAN control option in Yeelight app, but only to YLDP23YL. Not in Bedside Lamp :< #EDIT |
I have been able to get it to work with: Indeed the button for the lan integration has been removed but it worked fine after i toggled it in the old version. config:
One full day lost in this mess it's just ridiculous xiaomi need to get their shit together. Edit: |
If you are able to obtain the xiaomi token (e.g., from the yeelight backup on android: https://python-miio.readthedocs.io/en/latest/yeelight.html#token-extraction), you can enable the lan mode using |
We just received a report on Twitter of this issue so I thought I’d dig a bit. I’ll leave it to @balloob to see if we want to make a big stink about this publicly to try to pressure Xiaomi (who forced Yeelight to remove local control according to Yeelight on Twitter) to re-add local control but did want to point people of this issue to this thread on our forums where @mmakaay has done a great job of documenting his work to reverse engineer his Yeelight bedside lamp to install ESPHome on it. That may be your best bet for now instead of trying to maintain LAN control on a product whose creator doesn’t want it maintained. |
Well, this explains why I can't get a Yeelight bulb I've had for years working with HA again, after it conveniently messed up. I'll see if I can get ESPHome on it, if not it can go in the bin. |
Has anyone noticed this? |
Interesting statement. Seeing the LAN support disappear from my lamps and app does not match this statement, but it would be great if they changed their mind and brought back the support (without having to jump hoops like having devices whitelisted to receive working firmware). What this does not change, are my efforts to come up with my own firmware for the BS2. It likely will bring me more options than the original firmware, and I am really looking forward to those, amongst which:
|
Can you explain how I runt that command from my HA? |
Usage |
I think you can do that using this addon to access the shell: https://github.com/hassio-addons/addon-ssh You can first verify the current settings by executing:
And the full command to change the developer mode is (use 0 to disable):
|
The addon didn't accept the tokens I got from my night lamp 2 and desk lamp 1s |
Do your lamps have the name Xiaomi in their product name? I read that only products with the Xiaomi branding will no longer have LAN control, so "Pure" Yeelight products such as the bulbs and ceiling lights won't be affected. |
Yes, these lamps are Xiaomi Mijia lamps, which are produced by Yeelight. |
It seems products starting with MJC are affected while YLD retains local control. The question is, should these products have a separate integration in Home Assistant? |
Without LAN control, there's not much you can do, except for using a separate integration, right? Personally, I don't mind having separate integrations where needed. The fact that I can switch an integration, while the front end end automations remain intact, is one of the beauties of Home Assistant. I can use the integration that best fits my needs. |
The devices that are controlled with mi home app are using either miio or miot for communication. The library implementing support for such devices is python-miio, which is used by the Also, there is a custom component using the miio protocol that is separate from the lan mode, I have asked if its author has interest in adding support for that to |
So, if I bought a Yeelight Color bulb today, I wouldn't be able to use it with Home Assistant, or has the change been reverted? |
the yeelight bulbs should be unaffected from the problem - only xiaomi branded products |
I was able to turn the developer mode on, thanks to @rytilahti tip. It also worked for my yeelight ceiling light. I have obtained my tokens for the device that are needed for miiocli. Here are a few ways listed to get the tokens. https://github.com/Maxmudjon/com.xiaomi-miio/blob/master/docs/obtain_token.md After that I could activate the developer mode via miiocli (https://python-miio.readthedocs.io/en/latest/).
|
@chriss158 glad you got yours working! If you don't mind, please feel free to create a PR to improve the python-miio docs on obtaining the tokens /assuming that was the tricky part, iirc the developer mode is already documented) :-) |
Just lost control of all of my Yeelight Color2 bulbs. All at once. All other devices remain unaffected. Firmware update hit these as well? |
I'm going to close this out as we can't do anything about lan support being removed from the firmware. The yeelight integration has been significant refactored in 2021.9 to use local push which addresses a whole class of connectivity issues. If there is still a problem after updating to 2021.9 and its not because lan support is missing, please open a new issue as previous logs and troubleshooting will not longer be relevant. |
The problem
I have problem with adding my Xiaomi Mi Bedside Lamp 2. After I installed HA OS it automatically discovered another Yeelight Bulb that I have: YLDP23YL, but it has problems with my bedside lamp. In integration description there is a hint that I should enable LAN control in Yeelight app. Unfortunately I don't have this option in my app, even after updating bedside lamp firmware to the latest. Maybe that's the problem? Maybe there is different option to add Bedside Lamp 2 to HA? Please help :<
What is version of Home Assistant Core has the issue?
core-2021.2.3
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Yeelight
Link to integration documentation on our website
https://www.home-assistant.io/integrations/yeelight/
Example YAML snippet
Anything in the logs that might be useful for us?
# Put your logs below this line 2021-02-24 10:58:05 ERROR (MainThread) [homeassistant.components.yeelight.config_flow] Failed to get properties from 192.168.1.27: A socket error occurred when sending the command. 2021-02-24 10:58:05 ERROR (MainThread) [homeassistant.components.yeelight.config_flow] Failed to import 192.168.1.27: cannot connect
The text was updated successfully, but these errors were encountered: