binsoul / node-red-contrib-deye-sun-g3

MIT License
6 stars 1 forks source link

Protocol / communication issues #1

Closed qabi closed 2 weeks ago

qabi commented 1 year ago

Wow - great stuff! I was just looking in recent days for exactly this project, and then it turns up just now! :)

It seems to not entirely work for me, however. I did see a message coming through initially, but with clearly invalid values.

But I am now mostly seeing timeout errors, the status message saying "updating" continuously, and also "Frame contains invalid sequence number".

I have the same communication working well with the python project: https://github.com/githubDante/deye-controller

The python script seems to keep working regardless. So maybe there is some state in the Node-Red node that causes wrong sequence numbers to be sent, etc.?

I am a software developer, and I would love to help, if I can. I don't have much experience with node.js or node-red code, but do you have any ideas on how I could best go about troubleshooting these issues?

My Deye inverter is a 12 kW 3-phase one by the way - not sure if there are differences in this regard.

binsoul commented 1 year ago

This node was written for the G3 family of inverters from Deye. You probably have a SUN-12K-SG04LP3 inverter, which is a completely different device. It uses a different set of registers and has many more of them. So basically I don't expect that this node returns useful data for your inverter.

But you said you received frames with invalid sequence numbers which never happens for my inverters. So I checked the Python source and they allow to ignore certain protocol errors. Maybe some firmware versions are buggy. I released a new version 0.0.3 which ignores invalid sequence numbers. Please update your node in node-red and tell me if it reports any other errors after the update. If there are no other errors but the values are wrong then there is a chance that only the registers which are evaluated need to be changed for your inverter.

qabi commented 1 year ago

Thanks. Very helpful. Do you think it would make sense to evolve this project to support multiple models? I'm thinking something like configurable registers and mapping to output object. If that sounds interesting to you, I would love to give it a shot (but I think maybe you should make the overall changes for making register info etc. "pluggable" so the structure of the project is still as intended).

In any case, if an when I get time, I will try to make this work. So it is mostly a matter of whether I should make it in a private clone, just for myself, or perhaps something everybody could use in this project?