kinu-garage / hut_10sqft

Computer setup tools for my own environment, and public discussion place holder.
Apache License 2.0
2 stars 1 forks source link

xiaomi / smart xi fan not connected to any home automation network #682

Open 130s opened 2 years ago

130s commented 2 years ago

Back in https://github.com/130s/hut_10sqft/issues/466 it was connected to wifi, then some sort of app (likely Tuya? I forgot), Google Home, and openHAB. Now after switching routers to a new one, , it is not connected.

130s commented 2 years ago

Manual.

I actually found it connected to Mi Home app.

130s commented 2 years ago

Looking at https://www.home-assistant.io/integrations/xiaomi_miio/#linux-and-rooted-android, I jumped to Manual run in python (PiotrMachowski/Xiaomi-cloud-tokens-extractor). Running Python version, I was able to pull the info:

root@98f6b1d751b0:/token_extractor# python3 token_extractor.py
Username (email or user ID):
xxxxxxxxxxx
Password:
ppppppppppp
Server (one of: cn, de, us, ru, tw, sg, in, i2) Leave empty to check all available:
us

Logging in...
Logged in.

Devices found for server "us":
   ---------
   NAME:     Fan_SmartMi
   ID:       iiiiidddddd
   MAC:      macmacmacmacmac
   IP:       ip.ip.ad.addr
   TOKEN:    tokentokentokentokentokentoken
   MODEL:    zhimi.fan.za3
   ---------

But this info is not what HASS was looking for. It needs an account info for Xiaomi Miio Cloud (i.mi.com). Turned out I can log on with the same email I use for mobile app. Looks like I've created an account more than a year ago so my webbrowser remembered creds. The website complained that I haven't logged in for more than an year, so I have to come back to the same website 1 day later.

BUT, using the email and pw, I was able to log on to Xioami Miio integration.

130s commented 1 year ago

It's now an issue again inhttps://github.com/130s/hut_10sqft/issues/644

130s commented 1 year ago

Getting more concerned with them requiring cloud accounts credentials.