-
Notifications
You must be signed in to change notification settings - Fork 35
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
Huawei SUN2000 #39
Comments
Hi Gahujipo! I've picked up work on this PR again. I've made all the required changes and I am in the process of writing some unit tests. I've just uncovered an uncertainty around the byte ordering of multi-register values in modbus. I will look into the spec tomorrow to see if it has an opinion. I'm assuming that if a 32b number is split over two 16b registers 1 and 2, register 2 will contain the high bits, but I will check this. I should be finished with this in a few days. Thanks, |
Hi, wow, this was fast. 👍 What I didn't find (at least in the docs of modbus4mqtt) either was the option to set HighByte/LowByte (Big Endian) or LowByte/HighByte (Little Endian). I did a quick research and found out that Modbus in general is a "big-endian" protocol but even there seem to be some manufacturers which implement that with little-endian, even when those are some few exceptions. |
Alrighty, I've published a v0.6.0_rc1 for testing here: https://pypi.org/project/modbus4mqtt/0.6.0rc1/ Let us know how you go! I added a |
That's awesome. Thank you very much. I'll test it and let you know in the next days. Are you interested in a PR with the yaml file for the Huawei SUN2000 inverters or is that not your objective? |
That would be fantastic! We're slowly putting together a library of inverter maps. More the merrier! |
@gahujipo any progress to your solution? maybe you could share your yaml for the huawei sun2000? ;) |
@tjhowse tried it with a SUN2000 by myself with this config:
but I always get an error:
Any help what I could do? :) |
That address is probably not valid for your inverter. It might be in octal format? Did you get it from some documentation somewhere? Does that specify the number format? Lots of docs like to prepend a "4" to mean "holding register table". Try address 7077 and see if it works better. |
the address is correct, with other modbus solution I can get the value. even in the official documentation of Huawei SUN2000 modbus protocol doc. Anyway I tried it with "7077", same error. |
No progress on my side. I didn't want to lose my statistics during the winter, but in the next future I'll give it another try. |
any help or idea from others? :) |
The Huawei inverters have a limited polling rate of 1 request per 5 seconds. Otherwise you get back a device busy error code. You have a bigger request interval than that, right? |
@gahujipo I tried it with 1 register every 10 seconds, even with 60s interval I get the same error. when try to interpreting the log file I just not found the correct parameters for the request/answer format of Huawei?! |
I'd like to use modbus4mqtt to read my data from my two HUAWEI SUN2000 inverters because I am not happy with my current solution. The problem is that most of the interesting registers are of type INT32 or UINT32. When do you think you are able to merge #29 ?
The text was updated successfully, but these errors were encountered: