basking-in-the-sun2000 / solar-logger

A datalogger for a solar inverter. Stores data in influxdb and displays it in grafana. Has load diverting capability, to use the inverter's excess power
GNU General Public License v3.0
99 stars 32 forks source link

Create models.py #45

Closed andysu closed 2 years ago

andysu commented 2 years ago

add models file with models IDs. in _old_models (ids 0-60)Pmax,Qmax,Smax,Pn,strings and Model may search only by model_id (because no registers 30000-32000) in _unknown_models (ids 60-299) maybe as in _old_models but i don have info about Pmax,Qmax,Smax,Pn,strings there in _new_models (ids>=300) - just add id and model for compatibility please add this file to master and change HuaweiV2.py

basking-in-the-sun2000 commented 2 years ago

The inverter itself sets those values in the registers. Could you explain why you need to specify the values in the code?

HuaweiEnt.default.py was based on definition v2, but might had added v3 registers. You can select any register map file to use by changing the model in the config.py. So you would use HuaweiEnt instead of Huawei, for this other map

andysu commented 2 years ago

inverters v2 (ids 0-60) don't have Pmax,Qmax,Smax,Pn,strings informations in registers (as I now) Name of inverter you may view by use only through '2B' functions (not '03' - read registers functions) But if you don't use Model name in your code - nevermind BUT - very important information about number strings in inverter not store (as I now) in HuaweiV2. Though if you use information about number of strings from config file -nevermind.

basking-in-the-sun2000 commented 2 years ago

HuaweiEnt was supposed to be based on v2. However, I copied the data from the v3 file and thought it would use most of the values. Now that you pointed out, seems these are quite different. As you pointed out no registers 30xxx.

HuaweiEnt should had been what you call HuaweiV2. Guess I should had looked closer at the file :<

Most of the info registers are used for documentation, so you can track changes in your logs. For instance, you replaced the inverter, added extra optimizers, etc. Some are actually used as some of the time registers.

Will try to work out the v2 issues, but hadn't heard of anybody using it until now