-
Notifications
You must be signed in to change notification settings - Fork 355
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
Can't upgrade Zigbee Firmware #1042
Comments
It was very complicated for me to update the Zigbee firmware because Lumi_Z3GatewayHost_MQTT process interfers with the update. Here my poor solution... Open 2 telnet sessions on the gateway (ZNDMWG03LM)
On second session:
Choose the fimware version 6.7.8
I don't understand why, but this allow upgrade in the second session to start.
and relaunch Lumi_Z3GatewayHost_MQTT in the first session with the "right timing" :/ For me, with this method, update to 6.7.8 was successfull at second attempt, and update to 6.7.10 at first attempt... |
I discovered this "method" because, after upgrading the main Realtek firmware, upgrading the Zigbee firmware failed randomly at differents steps but without going to the end of the upload. Then I see in htop that Lumi_Z3* process constantly respawned while eating nearly 100% CPU... |
doesn't work for me. Z3GatewayHost throws assertion after attempting to "reset NCP" |
Hi, Well, I wanted to try to get the flash via Integration working and avoid manually doing It on the shell. So I assumed this delay might not be sufficient. I increased to 15 secs just for testing. This worked! |
Heyy, The firmware used by ezsp.py at line 70 is What is the better firmware? It's not the faster one? |
@szymucha94 I tried your method without success. I see error about missing /data/sx binary:
|
@kkmaslowski that one seems pretty obvious :) |
I can't revert to original firmware, flashing stops, please help:
|
Hello gents, Did you find any resolution for this? I'm also in the same situation. |
@mihaiaka I think you should try to do the following steps:
|
Thank you @kkmaslowski . On a Windows 10 laptop, I've downloaded the latest HassWP. I've replaced the ezsp.py file. I've turned on HA via the hass.cmd file. made a test account. When i try to add the GW3 integration i get an error and the cmd window logs this: 2023-05-15 10:05:21,780.780 ERROR (MainThread) [homeassistant.config_entries] Error occurred loading configuration flow for integration xiaomi_gateway3: cannot import name 'OPENMIIO_CMD' from 'custom_components.xiaomi_gateway3.core.shell.base' (C:\Users\User\Downloads\HassWP_2023.3.6\config\custom_components\xiaomi_gateway3\core\shell\base.py) If i try to do a similar thing and copy the base.py from https://github.com/AlexxIT/XiaomiGateway3/blob/ebae56f907b6e446408d4739d94e825f6c25d496/custom_components/xiaomi_gateway3/core/shell/base.py the error changes, but still doesn't load the integration, below is the log from the cmd window: 2023-05-15 10:22:20,330.330 ERROR (MainThread) [homeassistant.config_entries] Error occurred loading configuration flow for integration xiaomi_gateway3: cannot import name 'URL_ARM' from 'custom_components.xiaomi_gateway3.core.shell.base' (C:\Users\User\Downloads\HassWP_2023.3.6\config\custom_components\xiaomi_gateway3\core\shell\base.py) Any idea what to try next @AlexxIT ? |
Hi, Any recommendations? |
@mihaiaka maybe try from the beggining, but do not replace any files manually and add gateway to see if it's working. Next try to replace file, restart HA, test if it's ok and try to flash from gui. |
Just got in WP
and on telnet
No matter with fix |
@kossnikita @mihaiaka maybe try to contact Alexx directly on Telegram group https://t.me/xiaomi_gw_v3_hack |
I've setup 3.2.0 integration with ZHA mode (gateway ZNDMWG03LM Firmware: 1.5.0_0102)
When running the command Zigbee Flash EZSP (custom) It fails:
2023-04-15 19:24:11,041 192.168.3.83 [FWUP] Target zigbee firmware v6.7.10.0
2023-04-15 19:24:12,282 192.168.3.83 [FWUP] Can't update firmware
Traceback (most recent call last):
File "/config/custom_components/xiaomi_gateway3/core/ezsp.py", line 52, in update_zigbee_firmware
cur_fw = await read_firmware(host)
File "/config/custom_components/xiaomi_gateway3/core/ezsp.py", line 104, in read_firmware
await asyncio.wait_for(ezsp._probe(), timeout=10)
File "/usr/local/lib/python3.10/asyncio/tasks.py", line 445, in wait_for
return fut.result()
File "/usr/local/lib/python3.10/site-packages/bellows/ezsp/init.py", line 84, in _probe
await self.connect(use_thread=False)
File "/usr/local/lib/python3.10/site-packages/bellows/ezsp/init.py", line 126, in connect
self._gw = await bellows.uart.connect(self._config, self, use_thread=use_thread)
File "/usr/local/lib/python3.10/site-packages/bellows/uart.py", line 414, in connect
protocol, _ = await _connect(config, application)
File "/usr/local/lib/python3.10/site-packages/bellows/uart.py", line 385, in _connect
transport, protocol = await zigpy.serial.create_serial_connection(
File "/usr/local/lib/python3.10/site-packages/zigpy/serial.py", line 31, in create_serial_connection
transport, protocol = await loop.create_connection(
File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1076, in create_connection
raise exceptions[0]
File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1060, in create_connection
sock = await self._connect_sock(
File "/usr/local/lib/python3.10/asyncio/base_events.py", line 969, in _connect_sock
await self.sock_connect(sock, address)
File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 501, in sock_connect
return await fut
File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 541, in _sock_connect_cb
raise OSError(err, f'Connect call failed {address}')
ConnectionRefusedError: [Errno 111] Connect call failed ('192.168.3.83', 8889)
Looking at the device logs, I see some errors which I assume are related:
Apr 15 19:24:10 rlxlinux auth.info login[2400]: root login on 'ttyp0'
Apr 15 19:24:10 rlxlinux user.info zigbee_gw[1364]: onSocketClosed: /tmp/miio_agent.socket closed by peer (tcp_connection.cpp:77)
Apr 15 19:24:10 rlxlinux user.info zigbee_gw[1364]: onTcpDisconnected: AgentConnection disconnected! (agent_connection.cpp:113)
Apr 15 19:24:10 rlxlinux user.info zigbee_gw[1364]: enterConnectingState: connect fail, errno:146, Connection refused (tcp_connector.cpp:200)
Apr 15 19:24:10 rlxlinux user.info zigbee_gw[1364]: enterReconnectDelayState: enter reconnect delay state, delay: 1 (tcp_connector.cpp:249)
Apr 15 19:24:10 rlxlinux user.notice : ^[[1;32m[D] : check wifi status 8
Apr 15 19:24:10 rlxlinux user.notice : ^[[0m [E][agent_client] client_message_callback 835: sock
Apr 15 19:24:10 rlxlinux user.notice : [E][agent_client] client_connect 894: connect
Apr 15 19:24:10 rlxlinux user.notice : ^[[0m^[[32m Info miio_agent_socket_callback: Epoll event error: Bad file descriptor
Apr 15 19:24:10 rlxlinux user.notice : ^[[0m^[[31m Error miio_agent_socket_callback: miio_agent disconnected!
Apr 15 19:24:10 rlxlinux user.notice : 2023-04-15 19:24:10 info miio::Agent: Lost connection with miio_agent
Apr 15 19:24:10 rlxlinux user.notice : 2023-04-15 19:24:10 warn miio::Agent: connect(): Connection refused
Apr 15 19:24:11 rlxlinux user.info zigbee_gw[1364]: exitReconnectDelayState: exit reconnect delay state (tcp_connector.cpp:265)
Apr 15 19:24:11 rlxlinux user.info zigbee_gw[1364]: enterConnectingState: connect fail, errno:146, Connection refused (tcp_connector.cpp:200)
Apr 15 19:24:11 rlxlinux user.info zigbee_gw[1364]: enterReconnectDelayState: enter reconnect delay state, delay: 1 (tcp_connector.cpp:249)
Apr 15 19:24:12 rlxlinux user.notice : 2023-04-15 19:24:12 warn miio::Agent: connect(): No such file or directory
Apr 15 19:24:12 rlxlinux user.info zigbee_gw[1364]: exitReconnectDelayState: exit reconnect delay state (tcp_connector.cpp:265)
Apr 15 19:24:12 rlxlinux user.info zigbee_gw[1364]: enterConnectingState: connect fail, errno:2, No such file or directory (tcp_connector.cpp:200)
Apr 15 19:24:12 rlxlinux user.info zigbee_gw[1364]: enterReconnectDelayState: enter reconnect delay state, delay: 1 (tcp_connector.cpp:249)
Apr 15 19:24:13 rlxlinux user.info zigbee_gw[1364]: exitReconnectDelayState: exit reconnect delay state (tcp_connector.cpp:265)
Apr 15 19:24:13 rlxlinux user.info zigbee_gw[1364]: exitConnectingState: exit connecting state (tcp_connector.cpp:230)
Apr 15 19:24:13 rlxlinux user.info zigbee_gw[1364]: onTcpConnected: AgentConnection connected. (agent_connection.cpp:131)
Apr 15 19:24:13 rlxlinux user.info zigbee_gw[1364]: operator(): connected to agent server. (cloud_miot.cpp:71)
The text was updated successfully, but these errors were encountered: