-
Notifications
You must be signed in to change notification settings - Fork 354
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
Device can not be discovered #92
Comments
I just tested CLI-tool version 0.15.1. It's not discovering my Mi Robot Vacuum Cleaner (first gen) anymore. On 0.14.1 I was having issues with timeouts trying to control the robot through miio but on this latest version the device isnt even discovered (and also times one when trying to control). I also noticed it's not consistent in discovering my Yeelight. Sometimes it doesnt show up during discovery. Is there something I can do to help troubleshoot? |
My Vacuum V1 is discovered every time I run the Anyone got a hint to give? |
@circuuz |
@jghaanstra Thanks for testing! Could you run the miio-command with debug, something like this: @circuuz |
Unfortunately neither of your suggestions seems correct :( @jghaanstra When running
@aholstenson When running
It seems like neither of your suggested commands have the correct format I guess. |
@circuuz Sorry, got the command a bit wrong there. The syntax is |
When using the debug command (for reference, on Windows it's set DEBUG=* & miio discover) I'm getting different results but was eventually able to track it down. I deleted the miio directory under my profile folder which holds the tokens.xml. It was added when manually updating the token on 0.14.1 for a device that is not able to auto-discover the token. After deleting |
Hi,
PCAP attached. Any ideas? |
@pkol How many active network interfaces does your machine have? For me, |
Indeed, in
instead of
which led to a successful discovery of my Xiaomi device (Mijia bedside lamp). I also tried to hardcode My environment:
|
@thorn0 I have 10 active interfaces (wifi, ethernet, lot of dockers). |
I have a chuangmi plug v1 that was already configured. It can't be discovered by "miio discover" but if can be discovered normally with python-miio (https://github.com/rytilahti/python-miio) by "mirobo discover". The versions are
Actually, if I add the "DEBUG=thing*", it seems that the device is found correctly. I don't quite understand why it was not returned normally. Debug output like this: |
If you are using |
Hi there, I'm unable to get the token with mio 0.15.6 can somebody kindly advise? Thank you. iMac:miio $ DEBUG=* miio discover th:discovery:miio Searching every 100000 ms +0ms miio:packet <- <Buffer 21 31 00 20 00 00 00 00 03 4d 6d a6 5a e3 ea 82 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff> +484ms |
OK I think I got it figured out. First, the rockrobo F/W I'm using is not giving away the TOKEN to miio AFTER having setup the device. I had RESET the rockrobo (WIFI-reset) and then call miio discover. So this worked for me - getting the correct TOKEN - using the method for iOS: After the very tedious process of extracting the TOKEN and running it through a decryption command -- I finally got the 32 char TOKEN string that works with [nicoh88/homebridge-xiaomi-roborock-vacuum]. |
Hi to everyone, When comparing JSON payloads: , We can see that, in the last two examples ,"ot":"ott", filed is empty: ",,". In the python-miio library this issue was solved: Is there, a chance, that similar solution could be implemented in the miio library? I use miio v0.15.6 installed on RPi 3B+ with Raspbian Stretch Lite, node v6.14.2, node-red v0.18.6. Edit: I found that adding this, in file: safeishJSON.js, have fixed all my issues with miio discover / inspect / configure:
Internet-on:
Internet-off:
Device-after-reset:
|
Does anyone have an update on this? I am unable to discover the xiaomi roborock too, even after a wifi reset. It can be discovered after I set it up in the Mi Home app though. |
That worked for me. |
|
Hi. I have a light strip and a color globe. The miio discover tool finds them both but only shows the token for one. Enabling debug shows one device (the light strip) has non-zero buffer:
I tried deleting and re-adding in Mi Home app. I tried resetting the light by powering off/on 5 times. I checked that it's in developer mode. Perhaps this is a new firmware that is not leaking the token? I also tried getting the token from the Mi Home app, by backing up and extracting the miio2 database, and both devices are there but the token field is blank for both. I'm guessing a recent up date to the Mi Home app now hides the token? |
you can try to use this app instead http://www.kapiba.ru/2017/11/mi-home.html (is russian, but has all device tokens right in app) |
I tried to install that, but my phone starts to install and then says "App not installed". Isn't this the standard Mi Home app, but with Russian translation? How would this be any different in terms of storing the tokens in the database? |
Have you tried to delete the original app before? |
Thanks, worked!
No I hadn't. Logcat confirmed this was the problem:
I uninstalled the official app, and then the sideload install worked. The vevs version managed to download my existing light settings, so when I get a minute, I'll see if the database has the tokens. If not, I'll try deleting and re-adding them |
Alas, that didn't work. I even deleted the miio2.db* files, and when they were re-created, and the two devices added back (from the cloud) the token field was blank. I even deleted the color bulb and added it back with a different name. The new name showed in the database but the token was blank. I installed an old version (v5.0.31) of MiHome from apkmirror, but got the same result. |
@jezzaaa didn't work what exaclty? |
Didn't work in that the tokens were still empty. However, I tried once more, but before uninstalling the latest genuine app, I removed the color bulb. I checked that the /data/data/com.xiaomi.smarthome/ directory was removed. Then I installed the old version of the app from apkmirror, added back the bulb. When I checked the database it now had the tokens. So now, all good, I manually added the token with CLI tool, and can now correctly access the device. Thankyou! |
@jezzaaa not sure why you use the database. You had to see the token information on each device like this in the app: |
Wow, that would have been great. However, I don't know where I can see the screen with the tokens that you showed. The link to Vev's version of MiHome seemed to be just with Russian translation and that's all. I re-installed it now to check, but still can't see anywhere with the tokens. I thought you were just sending me to an old version of the app that still stored the token in the database. I didn't realise Vev's version had more info on the "Network info" screen. It's also in English. So perhaps your link sent me to a different app? I downloaded the file MiHome_5.4.57_vevs.apk |
Sorry, I didn't look hard enough. Now I found the screen. On my phone it was all in English. For anyone else trying to find this, go to the main app screen then:
|
how to get "ID" of window/door sensor, when i launch
and... nothing else. Why i don't see all items ? |
@smotx have you tried the app I described above? |
Hello,
Did anyone have this problem? How to solve that? Is there a way to decode the messages that are sent back to miio? @edit
|
@studentIvan Does the app you describe work for iPhone as well or is there an alternative? I can't seem to download it and AFAIK iPhones do not support .apk files. I have no Android phone nearby to use. Also the token does not show in the regular Mi Home app, is that correct? Edit: I have managed to get the tokens of my devices now, but when I try to update them for the devices I get the following error: Edit 2: After some more looking around, I have found a solution that works for me. Perhaps it'll be useful to anyone who stumbles upon this in the future. The idea is: we need to get the token of the device, but it is hidden in a database file. Once we get this token, we can manually set it using the miio protocol. Hope it helps!
|
Update... by checking the italian version of the MIUI forums, I found a testimony where enabling the GPS allowed for device discovery. I disable GPS for every app by default. |
So, last (maybe) update: I did find the older versions... I was using google translator on the whole webpage, and the link the the old versions didn't work, probably because of that. Clicking the link in the original russian page led me to the past versions, where I downloaded 5.4.57, installed it, and surely enough the token was visible. |
Just in case anyone else needs it, this is (AFAIK) about the easiest way to get your chuangmi plug's token. Worked for me! |
I have a very very very old chuangmi.plug.v1, which can not be discovered. {
"result": {
"life": 864464,
"cfg_time": 0,
"token": "*********",
"mac": "8C:BE:**********",
"fw_ver": "1.2.4_7",
"hw_ver": "MC200",
"model": "chuangmi.plug.v1",
"wifi_fw_ver": "SD878x-14.76.36.p79-702.1.0-WM",
"ap": {
"rssi": -40,
"ssid": "****",
"bssid": "F4*****"
},
"netif": {
"localIp": "192.168.3.69",
"mask": "255.255.255.0",
"gw": "192.168.3.1"
},
"mmfree": 24888,
"ot": "otu",
"otu_stat": [
66,
56,
410,
1,
409,
780
],
"ott_stat": [
14,
17,
17,
1038
]
},
"id": 1
} Compare it with another chuangmi.plug.m1 and chuangmi.plug.v3, uid was missing in this device's response. I haven't read codes about discover devices, but maybe this is the reason of device can not be discovered? By the way, most device in my home ( > 15 devices) except this will hide their token after connected to a WiFI / connected to Mi Home app. |
you saved me man. thanks. I searched for this token 4 hours. |
I'm having trouble connecting to my Aqara hub. I have model number AG005, but whatever I try, I can't seem to connect with it. |
same problem. Have been successfully before in Homebridge ran in Synology docker, but I uninstall the container, and remake one, now it's unable to discover the miio devices. |
This issue is here to track issues with device discovery, both via
miio.devices()
and themiio
CLI-tool. The network discovery was rewritten in 0.15.0 making it a bit more resilient.Feel free to add a comment to this issue if you have a device that does not show up when using
miio discover
.This issue covers the following old issues: #31, #40 (partially), #84
The text was updated successfully, but these errors were encountered: