Skip to content
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

Fix support Xiaomi Multimode Gateway 2 on firmware 1.0.7 #1166

Closed
rumianoesa opened this issue Oct 13, 2023 · 149 comments
Closed

Fix support Xiaomi Multimode Gateway 2 on firmware 1.0.7 #1166

rumianoesa opened this issue Oct 13, 2023 · 149 comments
Labels
question Further information is requested

Comments

@rumianoesa
Copy link

Is it supported?

@simkcy
Copy link

simkcy commented Oct 13, 2023

waiting for update

@isilcala
Copy link

I just upgraded and the telnet stopped working, therefore I lost all the zigbee devices in HA.

@AlexxIT AlexxIT added the question Further information is requested label Oct 14, 2023
@AlexxIT
Copy link
Owner

AlexxIT commented Oct 14, 2023

Theoretically it can be supported via key. But only for users who has key for gateway

@isilcala
Copy link

I do have a key and it was working fine, until the upgrade. Did you mean the key might have changed during the upgrade?

@AlexxIT
Copy link
Owner

AlexxIT commented Oct 14, 2023

Key and token are different things. Key never changes, token changes with every new setup

@YikLiu93
Copy link

I woke up this morning and found that the automatic update was updated, and now all Bluetooth mesh devices are no longer available, I don't know when there will be an update, or is there a way to downgrade?

@wittyfilter
Copy link

I woke up this morning and found that the automatic update was updated, and now all Bluetooth mesh devices are no longer available, I don't know when there will be an update, or is there a way to downgrade?

Same here, and I didn't find a way to downgrade it.

@billwong1113
Copy link

I woke up this morning and found that the automatic update was updated, and now all Bluetooth mesh devices are no longer available, I don't know when there will be an update, or is there a way to downgrade?

Same here, and I didn't find a way to downgrade it.

我马上去买了一个备用,怕以后买不到1.0.6的版本了

@YikLiu93
Copy link

这么卷吗,大佬们应该会更新吧

@rickyho1555
Copy link

全部用不了,希望大佬们更新吧

@izonekers
Copy link

话说那个KEY是怎么来的?现在还能获取吗?上面不是说有key就能连?

@YikLiu93
Copy link

话说那个KEY是怎么来的?现在还能获取吗?上面不是说有key就能连?

点开之前配置里面喔发现有key,但是也没有效果,还是提示telnet的问题

@YikLiu93
Copy link

话说那个KEY是怎么来的?现在还能获取吗?上面不是说有key就能连?

提示错误的打开telnet的命令

@GanChangAn
Copy link

I woke up this morning and found that the automatic update was updated, and now all Bluetooth mesh devices are no longer available, I don't know when there will be an update, or is there a way to downgrade?

Same here, and I didn't find a way to downgrade it.

我马上去买了一个备用,怕以后买不到1.0.6的版本了

哈哈~~~销量+1

@bingoscc
Copy link

狗东重新买了一个拿出来 把之前的装进去七天无理由了 刚用了一个来月就赶上这波更新T^T
新的到手1.03 暂时对新设备没需求就这这么提心吊胆的用着先。。。

@0v3rW4tch
Copy link

啥时候能有更新呢?或者说解决方案?

@YikLiu93
Copy link

狗东重新买了一个拿出来 把之前的装进去七天无理由了 刚用了一个来月就赶上这波更新T^T
新的到手1.03 暂时对新设备没需求就这这么提心吊胆的用着先。。。

啊你这。。。。。。

@z799631318
Copy link

唉,啥时候才能跟新啊,我的蓝牙按钮一直在失控状态

@ghggn
Copy link

ghggn commented Oct 27, 2023

Theoretically it can be supported via key. But only for users who has key for gateway

i seen it support 1.0.7 version now in commit list, but i have no key to submit in config dailog, it still show "wrong telnet"
is that mean if i have no key , i can't add gateway 2 to HA anymore?
is it possible to add gateway 2 to HA without a key in future?

thank for your work, it's great.

@zhcong
Copy link

zhcong commented Oct 27, 2023

Theoretically it can be supported via key. But only for users who has key for gateway

i seen it support 1.0.7 version now in commit list, but i have no key to submit in config dailog, it still show "wrong telnet" is that mean if i have no key , i can't add gateway 2 to HA anymore? is it possible to add gateway 2 to HA without a key in future?

thank for your work, it's great.

1.0.7 version closed telnet? is that mean no way to gain token?

@zhcong
Copy link

zhcong commented Oct 27, 2023

other way for control ble/zigbee device is xiaomi_miot. But device switch slow because in cloud model.

@z799631318
Copy link

控制 ble/zigbee 设备的另一种方式是 xiaomi_miot。但设备切换速度较慢,因为在云模型中。

我就是用的这种方法但是蓝牙mash的开关不能用

@AlexxIT
Copy link
Owner

AlexxIT commented Oct 27, 2023

If you has gateway previously in Hass, than you should have a key in config folder. If you doesn't have a key - there is no known method to open telnet.

@zhcong
Copy link

zhcong commented Oct 28, 2023

控制 ble/zigbee 设备的另一种方式是 xiaomi_miot。但设备切换速度较慢,因为在云模型中。

我就是用的这种方法但是蓝牙mash的开关不能用

我也有一个人体感应开关,走米家的智能场景了。后面打算换掉这个,都用以使用mqtt。

@maodun96
Copy link

Theoretically it can be supported via key. But only for users who has key for gateway理论上可以通过key支持。但仅适用于拥有网关密钥的用户

i seen it support 1.0.7 version now in commit list, but i have no key to submit in config dailog, it still show "wrong telnet"我在提交列表中看到它现在支持 1.0.7 版本,但我没有在配置日志中提交的密钥,它仍然显示“错误的 telnet” is that mean if i have no key , i can't add gateway 2 to HA anymore? 这是否意味着如果我没有密钥,我就无法再将网关 2 添加到 HA 了? is it possible to add gateway 2 to HA without a key in future? 将来是否可以在没有密钥的情况下将网关 2 添加到 HA?

thank for your work, it's great.谢谢你的工作,太棒了。

Theoretically it can be supported via key. But only for users who has key for gateway

i seen it support 1.0.7 version now in commit list, but i have no key to submit in config dailog, it still show "wrong telnet" is that mean if i have no key , i can't add gateway 2 to HA anymore? is it possible to add gateway 2 to HA without a key in future?

thank for your work, it's great.

The integration also automatically saves the key to the following places:
集成还会自动将密钥保存到以下位置:

/config/.storage/core.config_entries
/config/.storage/xiaomi_gateway3/keys.json

AlexxIT/Blog#13

@maodun96
Copy link

有没有已经升上去的兄弟试试,密钥路径在
/config/.storage/core.config_entries
/config/.storage/xiaomi_gateway3/keys.json

我是在第一个文件里找到,搜你原来设定成功时网关的IP。
按作者说的,这个密钥是永不改变的。如果有人重新连上了麻烦回复下我。我想升级又有点怂。

@maodun96
Copy link

@z799631318
Copy link

@zhcong @rickyho1555 @z799631318 @0v3rW4tch @YikLiu93 @izonekers
我key和token都获取到了Add Gateway using Token里填完之后还是报错误的打开telnet命令

@maodun96
Copy link

@zhcong @rickyho1555 @z799631318 @0v3rW4tch @YikLiu93 @izonekers
我key和token都获取到了Add Gateway using Token里填完之后还是报错误的打开telnet命令

谢谢老哥,我赶紧停下了升级的想法!

@ymj0424
Copy link

ymj0424 commented Feb 18, 2024

However, the output stuck at the last line. What should I do?

Check the UART connection rx of the gateway.

I re-soldered the UART cable agian, changed another UART cable, but it still stuck at the last line.

Success! The root cause why it stuck at the last line is that the USB to TTL module have different mode. After I switch it to the correct mode, it worked.

Hello @ymj0424 , I have the same problem, please tell me what does switching to another mode mean? Which USB to TTL do you use?

tb_image_share_1708221238755 jpg
This is the USB to TTL module I used. You can see the switch on the module, which refers to the different mode(This module has three modes, USB to TTL, USB to 485 and USB to 232).

@roseybear098765
Copy link

@niceboygithub @AlexxIT

I don't know what did you do before using gw_global_tool. You made the all partitions of the flash was REMOVED. The gw_global_tool won't cause the all partitions removed. And please use gw_global_tool on a good gateway.

I re-soldered the UART with another programmer and everything worked. This is a 100% method to get the key for version 1.0.7_0019.

  1. Solder the wires for the UART.
    288732383-a4a1acfe-3a71-435f-b0c6-23adfe63e0f9
  2. Download gw_global_tool. Read the instructions, get the key.
  3. Add via XiaomiGateway3 to Home Assistant.
    need help
    11
    12

@ww5vca
Copy link

ww5vca commented Mar 7, 2024

@niceboygithub @AlexxIT

I don't know what did you do before using gw_global_tool. You made the all partitions of the flash was REMOVED. The gw_global_tool won't cause the all partitions removed. And please use gw_global_tool on a good gateway.

I re-soldered the UART with another programmer and everything worked. This is a 100% method to get the key for version 1.0.7_0019.

  1. Solder the wires for the UART.
    288732383-a4a1acfe-3a71-435f-b0c6-23adfe63e0f9
  2. Download gw_global_tool. Read the instructions, get the key.
  3. Add via XiaomiGateway3 to Home Assistant.
    need help
    11
    12

I have the same problem and try to open the ttl file with notepad. Then I looks like a html file (about 181KB)...... I don't know what happend. Then I download it again and it is correct(about 9KB).

If it still error. Maybe you can try with an old Tera Term like 4.1x. 这里讲的:https://www.bilibili.com/read/cv27175398/?jump_opus=1

@SlippinDylan
Copy link

不能动手的同学,看一下这个教程(For our friends abroad: for those who can't get their hands dirty, check out this tutorial
Foreign friends to translate, hard work)
https://www.bilibili.com/read/cv32763868/?jump_opus=1

@LOVE2CMOL
Copy link
Contributor

我对上面的各位的方案进行了整合以及实验 还不会刷的可以参考下这个教程
Translation: I have integrated and experimented with the solutions provided by everyone above. Those who are not familiar with it can refer to this tutorial.
https://bbs.hassbian.com/thread-24421-1-1.html

@SlippinDylan
Copy link

我对上面的各位的方案进行了整合以及实验 还不会刷的可以参考下这个教程 Translation: I have integrated and experimented with the solutions provided by everyone above. Those who are not familiar with it can refer to this tutorial. https://bbs.hassbian.com/thread-24421-1-1.html

This solution is a good solution to the pain point of not being able to add 1.0.7 version upgrades to the ha. The only thing you need to be aware of is the wiring and the fact that you can't use a virtual machine (ps: my Windows 11 VM in my mac didn't work, and I ended up finding a Windows 10 host that did). I also had a bit of trouble with the wiring, mainly rx and tx, so for those of you who upgraded to 1.0.7 and can't get it to connect, be bold, it only cost me 15 bucks to get it to work, be bold!

@Giglik
Copy link

Giglik commented Mar 16, 2024

Anyone tested new firmware 1.0.7_0021? Does it work with gateway 3 addon?

@LOVE2CMOL
Copy link
Contributor

Anyone tested new firmware 1.0.7_0021? Does it work with gateway 3 addon?

My device firmware 1.0.7_0021 and it can be used normally.

@Shm1ks
Copy link

Shm1ks commented Mar 31, 2024

Hello everyone, This is my first time doing this, I work in C++ and Python. What about the encoding? why does my gateway show this? and how to translate this? #3-1�9!#3-1A!!'��=���%-9�_]y!#3-1�-#-��9!#3-1�������9%7=/��9!#3-1�9!#3-1A!!'��=� ��#''���IKPFCFPIIOPO�R���!9=5�995��/5=A;=5A=77�'5#1/���������IHS�R�K�!E�-#-��IHS �R�K�-E�-#-��E���=9/��75�;-A9��%������7����U�뻪�-95�#%;5����!='�����gu{��������� 5���gu{�--{���==-'=;'5���gu{����;
5����!33A9/=#����[����e]�m�yacW[ag�qucu[my�cuWgmci�eawUgu��U�뻪�-95�#%;5����!='� 5���gu{�--{���==-'=;'5���gu{����;
5��������i-{���RTOQz��1m#-���E�-#-�=9/�7!1��-%5!�����rR���%3A%=#=15�/�--!#����I� �%9#����I�%��I�em�!#75-�1=5=�%�I�%��rR���%/!#=%5��e-+-=Ao;AS�������I�%��rR���%
�%wcY[5!#75��u#1-#55�{-'7���c!�������������������=���%wcY[ 5!#75
�U#=;'5�!�=�wcY�5�'-��U#-9=�wcY�Yw�#==-'=;'5���%wcY[5!#75
�%wcY_'=3!! 5}77!5 ��9!##59���������3=-'57�5������c5!�-�#=9/=;'5����

@Shm1ks
Copy link

Shm1ks commented Mar 31, 2024

== Gateway Global Tool version:20240218==

Power ON Gateway NOW!<<

y��u�173�������w�����oQ�[55���=����95�����������[5%5��c��=77�����������IKEt:
m��e o
��V����e�띛�e{��{mYW�A����iXZ�^�����e��R��Uԛ�#7�=;'5��������������+�y/59)%�ai�� ������������������������S5cS����+�y�ޯUۅ!����������e=
��w[}e�����T_��k�-�y=9/5�#!�5#=;'57��VՍ����-��R�Ve��s!#7�Ycm�-#�;'!9)������Isg}Y oE�75A-7����55���Isg}YoE�%3-7����=���75A-7���5��-7A'5#��������IY_mc}cwE�[sy�5�9! �9'!9)����IY_mc}cwE�_%�'!=7�-/�9!%%=#7��������IY_mc}cwE�[=#7!%�'!=7�-/�9!%%=#7�� ������Isg}YoE�U#'!9)�=''�;'!9)����Isg}YoE�U5�{we}���렶��e-{��eey����eY=�Yw�eey�� ���]���
���5�����������-
5������������]����!335�����9�����-
5������������[������5'� �a����5'��u
���=3���_5���=3��I/='Qe=7Y5EI���E��%m7��=7m7������������1-!�75;1�eo='Aq_maA_=7 AY5��-#�����L�
J]�E�-����1-!�75;1�eo='Aq_maA_=7AY5��-#�����L�
J]�E�-����1-!�75;1�e o='Aq_maA_=7AY5��-#�����L�
JU�E�-����1-!�75;1�eo='Aq_maA_=7AY5��-#�����L�
JM�E�-�� ��1-!�75;1�eo='Aq_maA_=7AY5��-#�����L�
JM�E�-����1-!�75;1�eo='Aq_maA_=7AY5��-#��� ��L�
JM�E�-����1-!�75;1�eo='Aq_maA_=7AY5��-#�����L�
JM�E�-����L�
���ڪ1�eo='Aq_maA_= 7AY5��-#�����L�

@ZhangCheng-2021
Copy link

有人测试过新固件1.0.7_0021吗?它可以与 gateway 3 插件一起使用吗?

不可以,我正在想办法解决

@spysir
Copy link

spysir commented Apr 21, 2024

各位大佬找到解决方案了吗?固件版本1.0.7_0021

@Mioooooo
Copy link

没连接过ha 但是固件版本是1.0.7 手残不想拆机,请问还有其他获取key的办法吗

@felix0324324
Copy link

没连接过ha 但是固件版本是1.0.7 手残不想拆机,请问还有其他获取key的办法吗

同問…要付錢搞也行…

@hhalibo
Copy link

hhalibo commented Jun 24, 2024

有人测试过新固件1.0.7_0021吗?它可以与 gateway 3 插件一起使用吗?

不可以,我正在想办法解决

我的也是固件版本1.0.7_0021,按照上面的方法,获得的key好像是无效的,一直显示“错误的打开telnet命令”。

@blackpen1994
Copy link

it's useful with this method(https://www.youtube.com/shorts/qJ21wWNE1Gg), now my xiaomi multimode gateway 2 firmware(1.0.7_0019) works well.

think

@mpiras23
Copy link

mpiras23 commented Aug 6, 2024

They key is actually a HEX to ASCII conversion of the token

@jacob2826
Copy link

They key is actually a HEX to ASCII conversion of the token

@mpiras23 Hi, could you please give more details about this? Or a example?

@mpiras23
Copy link

mpiras23 commented Aug 21, 2024 via email

@hjjhe
Copy link

hjjhe commented Aug 30, 2024

1.0.7_0021无法打开Telnet,获取不到key。求解决方法

@aaaa0441
Copy link

aaaa0441 commented Oct 8, 2024

Hello Get the connect token, go online and use a HEX to ASCII converter and u get ur key

This is gold! I used https://www.rapidtables.com/convert/number/hex-to-ascii.html for the conversion.

@aaaa0441
Copy link

aaaa0441 commented Oct 8, 2024

it's useful with this method(https://www.youtube.com/shorts/qJ21wWNE1Gg), now my xiaomi multimode gateway 2 firmware(1.0.7_0019) works well.

My gateway 2 also worked with this 12345 pause 12 pause 12 pause 12 pause 12 pause 12 method to enable Telnet.

@nathanjmassey
Copy link

I have Xiaomi Multimode Gateway 2 (CN/EU) [ZNDMWG04LM] on firmware 1.0.7_0019.

I tried this method to get the key but I get the "Wrong open telnet command" when trying to add the device

Is there a step in the process i'm missing here?

Screenshot 2024-10-08 at 21 11 33

Hello Get the connect token, go online and use a HEX to ASCII converter and u get ur key

On Tue, Aug 20, 2024, 7:42 PM Jacob @.> wrote: They key is actually a HEX to ASCII conversion of the token @mpiras23 https://github.com/mpiras23 Hi, could you please give more details about this? Or a example? — Reply to this email directly, view it on GitHub <#1166 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFJLE5GP2U2NC76P7DKZ7J3ZSNWXZAVCNFSM6AAAAAA57QNSU6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJZGI4TOOJTGM . You are receiving this because you were mentioned.Message ID: @.>

@welir
Copy link

welir commented Nov 7, 2024

I have Xiaomi Multimode Gateway 2 (CN/EU) [ZNDMWG04LM] on firmware 1.0.7_0019.

I tried this method to get the key but I get the "Wrong open telnet command" when trying to add the device

Is there a step in the process i'm missing here?

Screenshot 2024-10-08 at 21 11 33

Hello Get the connect token, go online and use a HEX to ASCII converter and u get ur key

On Tue, Aug 20, 2024, 7:42 PM Jacob @.> wrote: They key is actually a HEX to ASCII conversion of the token @mpiras23 https://github.com/mpiras23 Hi, could you please give more details about this? Or a example? — Reply to this email directly, view it on GitHub <#1166 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFJLE5GP2U2NC76P7DKZ7J3ZSNWXZAVCNFSM6AAAAAA57QNSU6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJZGI4TOOJTGM . You are receiving this because you were mentioned.Message ID: @.>

Same issue

@jaipgit
Copy link

jaipgit commented Nov 20, 2024

My steps for get key in 1.0.8_0001 firmware:

  1. Solder UART using this scheme;
  2. Do action from this instruction (for mac in my case), but on this step key wasn't shown;
  3. Open any terminal, that can read data from UART device (I used Serial);
  4. Reboot hub, while rebooting it send data to terminal;
  5. Success! Key have found in logs:
    [/bin/miio_client_helper_nomqtt.sh] [2024-11-20 23:45:23] send : {"method":"_internal.response_dinfo","params":{"did":559743606,"key":"TeN7TNt9Al81LShc","vendor":"lumi","mac":"54:EF:44:60:F6:B1","model":"lumi.gateway.mcn001","bootloader_ver":"5f0b2b267fbeb2016876888f8ac880c4","wpa_intf":"/var/run/wpa_supplicant/wlan0","hostapd_intf":"/var/run/hostapd/p2p0","sc_type":[0,1,2,3,4]}}.

@laurdawn
Copy link

laurdawn commented Dec 4, 2024

Reminder:All sensors can be locally distributed using Xiaomi BLE, It is not necessary to use Xiaomi Gateway 3.

https://next.home-assistant.io/integrations/xiaomi_ble/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests