miio icon indicating copy to clipboard operation
miio copied to clipboard

zimi-powerstrip-v2 - connect to my network but not visible in mi home

Open mohyat opened this issue 6 years ago • 13 comments

Hi

When I try to connect from mi home powerstrip connects to my network but not visible in mi home.

When I try to run command: miio discover

I get no output? Why?

I can ping the device.

thx in advance

mohyat avatar Mar 06 '18 17:03 mohyat

If I debug command I get error: Invalid JSON SyntaxError: Unexpected token , in JSON at position 390

mohyat avatar Mar 06 '18 17:03 mohyat

If you are restricting its access to the mi cloud, this is caused by a missing entry in the JSON payload which renders it invalid. In python-miio we fix that by cutting off the double-comma: https://github.com/rytilahti/python-miio/blob/master/miio/protocol.py#L167 . This does not however should not affect its functionality otherwise, you can do the discovery before linking it with mi home app and it keeps the token the same after it has been bound with the app.

rytilahti avatar Mar 06 '18 18:03 rytilahti

I don't need mi cloud? Can I somehow configure it manually? I just need to connect it to my home wifi and retrieve token from it to use it in my home automation.

mohyat avatar Mar 06 '18 18:03 mohyat

Oh, so you haven't bound it yet.. Okay, then it may be a different problem, but it's hard to say without seeing the JSON it responds with. I'm not well versed with how it works with miio, but there's a command called miIO.config_router which allows the configuration when you are connected to the wifi network of the device: https://github.com/OpenMiHome/mihome-binary-protocol/blob/master/doc/PROTOCOL.md#payloads

rytilahti avatar Mar 06 '18 18:03 rytilahti

Is this command the same: miio configure id-or-address --ssid network-ssid --passwd network-password

mohyat avatar Mar 06 '18 19:03 mohyat

I reset the device and try to reconnect using this manual: Configuring a new device

If you have gotten a new device the --configure flag can also be used to configure this new device without using the Mi Home app.

The Mi Home device will create a wireless network, connect your computer to this network. Your device model will be included in the name such as: zhimi-airpurifier-m1_miapdf91. Run miio discover to make sure you can see your device. Make a note of the address (IP) or id. Configure the WiFi: miio id-or-address configure --ssid ssid-of-network --passwd password-of-network. See above for details about the flags. After the device has been configured the token is saved locally and made available to on your current machine. If you don't need the token locally you can also now copy the token and transfer it to where it is needed. Reconnect to your regular network. Optional: Run miio discover again to make sure the device actually connected to the network. If the device does not show up on your main network the problem is probably one of:

Wrong SSID - check that the SSID you gave the --configure command is correct. Wrong password - check that the password is correct for the WiFi network. Not a 2.4 GHz network - make sure to use a 2.4 GHz network as 5 GHz networks are not supported. You will need to reset the device to try another connection.

but still the same error.

Is this firmware problem? My device firmware is: 1.2.4_42. Can I update it? How?

mohyat avatar Mar 06 '18 20:03 mohyat

There is a mistake in this file: Link to File Under "Configuring a new device" wrong command: miio id-or-address configure --ssid ssid-of-network --passwd password-of-network correct command: miio configure id-or-address --ssid ssid-of-network --passwd password-of-network

Now I have error: Could not find device

I try with ID and IP ADDRESS? Any idea?

mohyat avatar Mar 06 '18 20:03 mohyat

Nobody have problem like mine?

I can ping and see ID of device in debug but when I tray to configure it to my wifi network with command: miio configure id-or-address --ssid ssid-of-network --passwd password-of-network

I get error "Could not find device"

mohyat avatar Mar 08 '18 18:03 mohyat

Nobody have this problem?

mohyat avatar Mar 14 '18 20:03 mohyat

Thanks for reporting this!

Which version of miio are you using? Could you provide the full log for the JSON error you encountered?

aholstenson avatar Mar 15 '18 07:03 aholstenson

How to check witch version is? How to get log?

mohyat avatar Mar 16 '18 19:03 mohyat

hello, I have the same issue. Just bought a MI Power Strip from Aliexpress. Android Xiaomi Home sees the device only if I switch to mainland China (If I try Europe is does not appear there) but when I try to connect it to the app it says: Device connected Message sent to device Connecting device to network ... I receive: Connecting to network timed out ... I installed nodejs latest v11. Ran npm install -g miio ...all went well, connect to WIFI: zimi-powerstrip-v2-miap8294 (the led on the power strip is blinking yellow) Run miio discover and all it says is INFO Discovering devices. Press Ctrl+c to stop and nothing happens. Is there any way to debug ?

screwyy avatar Nov 01 '19 08:11 screwyy

Hi guys,

i had exactly the same problem when recently my 3 Qingmi Power strips arrived. I could connect with my phone during mi home setup but at the third step it always timed out. I saw that during the setup all 3 of my power strips were properly connected to my wifi but had issues with the connection to mi home and the setup wasnt finished. I had a german account that was setup for chinese mainland server. All of my devices are connected without any problems. Only the strips didnt appear in my account. My account number start with 6xxxxxxxxx. A chinese account start with a number less than 42xxxxxxxx (32 bit). It looks like the strips are only wokring with chinese accounts and not other countries account set to use chinese mainland server. I created a new account choose china, than a phone number and my account got number 2xxxxxxxxxx. Than i tried to setup the strips and it instantly worked. After this i simply shared the devices with my mine account to have everything in one app.

I am sharing this cuz i saw many people with this issue and none really having an answer except "go closer to the router". It will never work with an account from another country. Setting it to chinese mainland aferwards is not enough.

xezna avatar Dec 01 '19 20:12 xezna