-
Notifications
You must be signed in to change notification settings - Fork 33
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
Meter registers #1
Comments
I don't have a solaredge meter to test things with, but I've made a start with implementing a meter class. Could you please grab the latest commit from the new meters branch and check whether what's there works? I'm interested in read_all()'s output from the meter class. You'll want to do the following, assuming you've connected to your inverter named "inv":
Please let me know what the output is, or the error you get. |
Not sure I'm doing it corectly but :
|
Absolutely. I've just submitted another commit that should get you beyond this error. |
|
Great! Thanks. Looks like the mechanism works. I'll need to add the remaining registers so you can try them out. |
Ok, so I've populated the registers for meter1, and I think I've got the details down right. Could you please run it again and dump the output here? |
It looks like it is too many registers at ones or something else.
|
Odd. I've seen that happen with other types of kwh meters, but SolarEdge hasn't documented a maximum number of registers that can be polled at once. Can you check at which point the error occurs? Can you add any registers beyond export_energy_apparent? |
This one is passed:
'energy_apparent_scale': -32768 ???? |
Ok, at import_energy_reactive_q1 the connection gets refused? Could very well be that the quadrant values are not supported by non-SolarEdge meters. I'll comment those out for the time being. I've cleaned things up a bit, please let me know if there's any remaining issues. |
|
It works if I uncomment first register "import_energy_reactive_q1"
|
How bizarre. Not quite sure what's going on there. In order to figure out where this is going wrong I will need to add a bit of debug code to the _read_all and _decode_value methods. I will post a message once I've done so. |
Apparent energy also is not present. I logged by Simply Modbus TCP client and this what I've got:
|
Would you mind running the following? I'm looking for whether this is a too many registers at once issue, or a specific register tripping up the pymodbus library.
|
|
Full registers:
|
Does it seem timeout? Each time I'm having an error in a different place. |
|
Without |
Ok, so it seems like every register can be read when queried individually, even the energy_apparent registers at the end. Seems like the read_all query is exceeding the maximum number of registers per query. I will need to modify _read_all() to process the list of registers in chunks. |
I've added a rudimentary batching system, which breaks up the meter register query into three chunks. Could you please try again? The following should be enough:
|
Meter functionality is now in the master branch. Please let me know if there's any further issues. |
Now it works perfect. Thank you very much.
|
I found this. Limit of reading registers is 122. SolarEdge has implemented two methods of the MODBUS request procedure: MODBUS request with explicit register addressing - supported by all communication board CPU versions. For example:•Tx: 01 03 9C 40 00 7A EB AD – Read 122 registers starting at address 40001.•Rx: 01 03 F4 53 75 ... [Registers data] ... FF FF 12 1BMODBUS request without explicit addressing – supported by communication board CPU version 2.478 and above. For example: •Tx: 01 03 00 00 00 7A C4 29 – Read 122 registers starting at offset 0.•Rx: 01 03 F4 53 75 6E 53 ... [Registers data] ... FF FF AE DB https://www.solaredge.com/sites/default/files/sunspec-implementation-technical-note.pdf |
Good to know, thanks for your help! |
Hi,
I would like to read connected Meter registers. Is it possible?
The text was updated successfully, but these errors were encountered: