olivergregorius / sun2000_modbus

Library for reading Huawei Sun2000 inverter metrics via Modbus TCP
MIT License
23 stars 9 forks source link

use sun2000 defaults, remove kW unit and only use W #18

Closed daniel309 closed 1 year ago

daniel309 commented 1 year ago

Thanks, my intention was to standardize all registers that report power and dont have a unit in their name in W. Current master has a mix (e.g. Inverter InputPower and ActivePower are kW, vs. Battery ChargeDischargePower and Meter ActivePower are W already). I found this quite annoying and that caused me to start this PR.

Btw. I messed up the PR. Wanted to merge into my fork's master and only later open a PR for upstream master.

Let me fix my stuff and then get back. I also wanted to change some of the isConnected logic and add an option to always close the tcp connection. My inverter is very sensitive to leaving the tcp connection open, others reported similar problems

https://www.elektroda.com/rtvforum/topic3828425-30.html

https://skyboo.net/2022/02/huawei-sun2000-why-using-a-usb-dongle-for-monitoring-is-not-a-good-idea/

let me fix all that in my fork, fix tests and then open a PR for when I am done. Will get back. Closing this PR for now.