Closed mcheavens closed 1 month ago
First, make sure the RS485 wires are not reversed.
You mention cross-compiling. What's the host OS and the target? Does 'make test' complete successfully?
The output is UTF8, so setting your LANG environment variable to "en_US.UTF-8" would make what you paste look as intended.
Host OS: Ubuntu 22.04 (Debian)
Makefile:38: *** "No goimport in $PATH, please run 'make install-tools'. Stop.
However,
works properly and compiles for all versions.
make install-tools does not solve: make install-tools test -x "" || go install golang.org/x/tools/cmd/goimports@latest go: downloading golang.org/x/tools v0.22.0 go: downloading golang.org/x/mod v0.18.0 test -x "" || go install github.com/axw/gocov/gocov@latest test -x "" || go install github.com/AlekSi/gocov-xml@latest test -x "" || go install gotest.tools/gotestsum@latest test -x "" || go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.53.3 [root@AGL-T6-Ubuntu-01 /go/wombatt] # make test Makefile:38: *** "No goimport in $PATH, please run 'make install-tools'. Stop.
My language in the OS is set to en_US.UFT-8, I don't see a LANG variable when running wombatt:
LANG=en_US.UTF-8 LANGUAGE= LC_CTYPE="en_US.UTF-8" LC_NUMERIC="en_US.UTF-8" LC_TIME="en_US.UTF-8" LC_COLLATE="en_US.UTF-8" LC_MONETARY="en_US.UTF-8" LC_MESSAGES="en_US.UTF-8" LC_PAPER="en_US.UTF-8" LC_NAME="en_US.UTF-8" LC_ADDRESS="en_US.UTF-8" LC_TELEPHONE="en_US.UTF-8" LC_MEASUREMENT="en_US.UTF-8" LC_IDENTIFICATION="en_US.UTF-8" LC_ALL=
Swapped wires, zero communication.
Oh! Battery ID #1! That one doesn't have the same data as the others. ID#1 is the one supposed to communicate with the inverters and provides different data than the rest. See https://diysolarforum.com/threads/eg4-6500-modbus.54210/page-2#post-837069 and subsequent posts.
Try with a battery whose ID is not 1 and wombatt shoould work as is.
AH! Changed the battery ID to 2, reconfigured and all looks much better!
Thank you, Thank you!!!!!
Minor issue is the LANG issue, but I really don't care about that.
Here is the output now. (Oh, and I still see the CRC error on battery-info.)
avg_temp: 25°C battery_voltage: 56.18V cap_remaining: 100% cell_10_voltage: 3.491V cell_11_voltage: 3.514V cell_12_voltage: 3.515V cell_13_voltage: 3.514V cell_14_voltage: 3.515V cell_15_voltage: 3.511V cell_16_voltage: 3.506V cell_1_voltage: 3.512V cell_2_voltage: 3.513V cell_3_voltage: 3.513V cell_4_voltage: 3.515V cell_5_voltage: 3.514V cell_6_voltage: 3.513V cell_7_voltage: 3.512V cell_8_voltage: 3.515V cell_9_voltage: 3.514V cell_balance_status: 0 cell_num: 16 current: 0A cycle_counts: 2 designed_capacity: 100Ah error_code: 0 full_capacity: 100000mAh last_updated: 2024-06-05T20:32:20.788428084-05:00 max_cell_voltage: 3.515V max_charging_current: 100A max_temp: 25°C mean_cell_voltage: 3.511V median_cell_voltage: 3.513V min_cell_voltage: 3.491V pcb_temp: 26°C protection: low capacity soc: 100% soh: 100% status: inactive/stand by temp1: 25°C temp2: 24°C temp3: 24°C temp4: 24°C temp5: 0 temp6: 0 warning: 0
AH! Changed the battery ID to 2, reconfigured and all looks much better!
Great!
- How would one check battery 1 if you had multiple in a chain? I only have one battery in each of my installs, they are used for high capacity UPS systems.
This is a good question. The easiest way is to not use the EG4 battery type in the inverter and set the parameters according to the manual under the 'USE' battery type., i.e., relay on voltage to charge the batteries.
If you keep the EG4 battery type in the inverters or for some reason need to keep a ID#1 battery, there is no way that I know of to get all the same information that the other batteries report. Per cell information is available in ID#1, and some values can be derived, like charging/discharging current, but other registers don't seem to be available. Also, since Modbus is supposed to only have 1 master and the inverter queries the battery 1 every 500 ms, that's the time we would have to query it using modbus in between requests/responses. It can be done but I'm not sure it's worth it.
Thank you, Thank you!!!!!
Minor issue is the LANG issue, but I really don't care about that.
The text encoding issue is fixed in https://github.com/gonzalop/wombatt/commit/503eadaa03cf868bc3ba1c9190315041f941d61e
Thanks!
Here is the output now. (Oh, and I still see the CRC error on battery-info.)
I'll check if I see any CRC error with battery info tomorrow first thing.
[...]
I don't see any CRC errors in battery-info:
$ ./wombatt battery-info -p rs485-bridge:502 -i 2 -T tcp
Battery #2
===========
battery voltage: 53.88V
current: 5.7A
cell 1 voltage: 3.367V
cell 2 voltage: 3.369V
cell 3 voltage: 3.367V
cell 4 voltage: 3.368V
cell 5 voltage: 3.368V
cell 6 voltage: 3.368V
cell 7 voltage: 3.367V
cell 8 voltage: 3.368V
cell 9 voltage: 3.367V
cell 10 voltage: 3.368V
cell 11 voltage: 3.368V
cell 12 voltage: 3.368V
cell 13 voltage: 3.368V
cell 14 voltage: 3.369V
cell 15 voltage: 3.367V
cell 16 voltage: 3.368V
pcb temp: 29°C
max temp: 30°C
avg temp: 28°C
cap remaining: 79%
max charging current: 100A
soh: 100%
soc: 79%
status: inactive/charging
warning: 0
protection: 0
error code: 0
cycle counts: 12
full capacity: 100000mAh
temp1: 28°C
temp2: 28°C
temp3: 28°C
temp4: 28°C
temp5: 0
temp6: 0
cell num: 16
designed capacity: 100Ah
cell balance status: 0
max cell voltage: 3.369V
min cell voltage: 3.367V
mean cell voltage: 3.367V
median cell voltage: 3.368V
model: LFP-51.2V100Ah-V1.0
firmware version: Z02T04
serial: 2022-10-26
I installed .8 which I see has localization changes.
I will add some other comments as needed, but here goes what I am seeing right now. Ubuntu 22.04 LTS Headless server. I am a NOOB to go, but got go running with paths set etc. no problem. When trying to run make I got error messages. Ran make to cross compile and it worked just fine and ended up with all the binaries.
I get invalid data and/or crc errors depending upon what command I am running. Here is what I am running and the errors I see. Any help would be appreciated.
HTML output looks like maybe some of the issue are character set issue. I am a USA user.
(command from shell script file)
Finished getting battery-info
Read modbus...
Finished getting modbus-read
Run monitor-batteries
HTML web output: