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

“Unknown error occurred“when ZHA mode #944

Closed
astangcong opened this issue Jan 23, 2023 · 6 comments
Closed

“Unknown error occurred“when ZHA mode #944

astangcong opened this issue Jan 23, 2023 · 6 comments
Labels
question Further information is requested
Milestone

Comments

@astangcong
Copy link

Now I have updated the GE3(DMWG03LM) to V3.0,but after I “” Enter the serial port settings”,then it says:Unknown error occurred

@AlexxIT AlexxIT added the question Further information is requested label Jan 23, 2023
@AlexxIT
Copy link
Owner

AlexxIT commented Jan 23, 2023

Unknown error = unknown problem. You need to search and provide more details.

@astangcong
Copy link
Author

sorry,but i don't know how to get logs of this gateway3 integration

@BeckXuan
Copy link
Contributor

BeckXuan commented Jan 24, 2023

I encountered the same issue.
I learned that the openmiio_agent takes over the device and the port 8888 as well. And I noticed that when connecting to the port 8888 of the gateway, its log file /var/log/openmiio.log displays an error as below
WRN github.com/AlexxIT/openmiio_agent/internal/zigbee/zigbee.go:139 > error="unknown baud rate"
Referring to the source code, I found the relative lines https://github.com/AlexxIT/openmiio_agent/blob/master/internal/zigbee/zigbee.go#L184-L192
It seems that no baudRate is offered and also it cannot probe the correct baudRate to connect to the hardware. And then it raises the error and shutdown the connection to port 8888.
My solution is to add an initial baudRate to the command. I don't know if it is a correct way, but it works for me.
The solution in detail:
change the line in file xiaomi_gateway3/core/shell/base.py
from
RUN_OPENMIIO = "/data/openmiio_agent miio mqtt cache z3 --zigbee.tcp=8888 > /var/log/openmiio.log 2>&1 &"
to
RUN_OPENMIIO = "/data/openmiio_agent miio mqtt cache z3 --zigbee.tcp=8888 --zigbee.baud=115200 > /var/log/openmiio.log 2>&1 &"
and then reboot both the gateway and the homeassistant.

@AlexxIT
Copy link
Owner

AlexxIT commented Jan 24, 2023

It's better to update and fix probe logic. Because probe ensure that chip is in correct state and can answer to requests.
Looks like you using default chip firmware because 115200 baud rate.
What model is your gateway? What firmware?

@BeckXuan
Copy link
Contributor

It's better to update and fix probe logic. Because probe ensure that chip is in correct state and can answer to requests. Looks like you using default chip firmware because 115200 baud rate. What model is your gateway? What firmware?

gateway: Xiaomi Multimode Gateway 2
firmware 1.0.6_0016, and the same issue for firmware 1.0.3_0028
Thanks!

@AlexxIT
Copy link
Owner

AlexxIT commented Jan 24, 2023

OK. I'll check with my gw

@AlexxIT AlexxIT added this to the 3.0.2 milestone Feb 1, 2023
@AlexxIT AlexxIT closed this as completed Feb 1, 2023
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

3 participants