Skip to content
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

Installing configurator #46

Closed
jezza61 opened this issue Aug 16, 2024 · 32 comments
Closed

Installing configurator #46

jezza61 opened this issue Aug 16, 2024 · 32 comments

Comments

@jezza61
Copy link

jezza61 commented Aug 16, 2024

Hi, I have installed the bms-to-inverter on one rasperypi, no probs, all works OK.
On the second PI, an older model, the application was installed and built OK, however when I clicked Close, it popped out with a message Failed to install the application! java,nio.FileSystemNotFoundException
Can it install into a 32bit version?
The Can interface was OK, as when I run candump can0 , I was getting a stream of valid data.

Second question, the battery change current, and the voltage limit for charge and discharge, could it be modified before being sent to the Inverter?
Essentially, I would like to 'undercharge' BMS to around 85% and discharge to about perhaps 15% (I have plenty of capacity.
I would prefer not to use limits reported by BMS, as charge to ~100% is scary, and discharge too low, wears out the battery.
At present I am testing several Samsung packs, and I am surprised how little data is pulled using CAN, RS485 seems to have about 10 times the amount of data.
However I don't know what data is collected from the BMS and what needs to be sent to the Inverter (is there some tutorial explaining can IDs and data being exchanged?)
And thanks a lot for this program.

@ai-republic
Copy link
Owner

Hi @jezza61,

  1. could you please tell me what older RPI you are using? You will need a 64-bit OS as the later Java versions only support 64-bit architectures. So the PI 3B and upwards all support the 64-bit Raspian OS
  2. yes, I just implemented BMS and inverter plugins which can be used to manipulate the data before sending it to the inverter

Lastly the information what is sent can be identified via the CAN ID and what it matches to in the specification. Usually the data is send using LSB (Least significant bit), so if you have a U_INT_16 or S_INT_16 you need to take the second byte first then the first in your hex calculator to see the value in decimal. Then there is also the unit to check e.g. 0.1A.

@jezza61
Copy link
Author

jezza61 commented Aug 22, 2024

I have some additional raspberry pi 4b now, trying again, i think it is the older raspberry that fails.
And I can read and convert can values OK, same with rs485 stuff, just need more understanding what transmit to what, and what data is required by the inverter, I am assuming that BMS is sending the data in can in a 'short' format as compared to rs485 ?
I am assuming that inverters expect sunspec data IDs (are these consistent between inverters? ) and the bms should send specific can IDs ?

@jezza61
Copy link
Author

jezza61 commented Aug 22, 2024

Commented too soon, a brand new raspberri pi 4b with the latest 64bit os, clean install, jdk17, same error message when running configurator. I did have another raspberry install perfectly fine and run OK. So not sure what the issue is?

@jezza61
Copy link
Author

jezza61 commented Aug 22, 2024

Redone a clean new raspberry PI install, with a can hat. Installed java
Installing from configurator works OK, and it completes with no error messages, however it never installs a webserver now, even though it was selected.
It did install it previously on another raspberry, and the app runs, pulls down bms data and displays in the webserver.
I did follow the install instructions to the letter, so have I missed something? Also you have mentioned some plugin to modify some data before it is being sent to the inverter?

@ai-republic
Copy link
Owner

ai-republic commented Aug 22, 2024

nstalling from configurator works OK, and it completes with no error messages, however it never installs a webserver now, even though it was selected.

Yes, I changed it to an embedded webserver as to not go via the Message Broker. This is more efficient. Also the Message Broker was not stable. After a few 10000 messages it would not refresh the data.
If you've selected the webserver, then it will be automatically started with the application.

Do you know what was the problem with your previous installs? Just for reference if anybody has similar problems ;)

@jezza61
Copy link
Author

jezza61 commented Aug 23, 2024

So, here it is now.
The older raspberry pi, has a waveshare can hat https://www.waveshare.com/wiki/RS485_CAN_HAT_(B), and 64bit bookworm OS, updated to the latest version.
Candump can0 sends a stream of data like that:
can0 00000500 [8] A9 15 00 00 59 64 70 8B
can0 00000501 [8] 00 00 00 00 02 02 00 00
can0 00000502 [8] 45 02 AC 03 AC 03 C0 01
can0 00000503 [8] 8C 0F 91 0F 83 0F A9 15
can0 00000504 [8] AA 15 A9 15 13 14 13 00
So I am assuming that the can interface is working OK, I have the older bms-to-inverter install, so I start start.sh and startWebserver.sh and I get a web page that displays a web page:
image
So I am assuming that is all working OK (No inverter yet, waiting for contractors to install it).
Second raspberry PI new 4B version, with a different can hat, https://www.waveshare.com/wiki/RS485_CAN_HAT
Installed with the latest 64 bit bookworm OS, and drivers (some issues with wiringpi ).
However Can0 interface seems to be OK, as candump can0, also shows a stream of data, same as for the first PI.
The latest bms-to-inverter installed, the one that has start.sh only, this one has ssl server, but the page is blank:
image
No data is displayed at all.
I am waiting for another dual can hat to test, however I am assuming that both PI units have a working CAN interface, as both can receive data OK, BMS is sending the data continously.
The BMS also has a data on RS485 interface, and I can pull down modbus input registers, but I am assuming that these would have to be polled by something ?
So I am not sure why the latest software does not show any data, I am just about to make copy of the first PI image and install the latest version of the bms-to-inverter on it, to see if the web page still works OK.
I suppose I could also do the opposite, and try to install the older bms software on the new PI, to see if that works?
I am happy to provide both CAN and RS485 data from live BMSs, I have many of them.
Perhaps I did not install the waveshare drivers correctly? the instructions seem to be OK for older version of OS

@jezza61
Copy link
Author

jezza61 commented Aug 23, 2024

One new update, running both RPIs on the older code after adjusting the CAN driver, both display web server with live data.

@ai-republic
Copy link
Owner

Thank you for your feedback! I fixed the webserver issue. It was blocking at startup.
Please make a Clean install with the new Configurator application.
Happy testing and please let me know how it goes :)

@jezza61
Copy link
Author

jezza61 commented Aug 26, 2024

Deye CAN BUS.pdf
Here is the result of the latest test.
It does work now, the web page works, and the data is being collected and sent.
The BMS tab in the web page does not match cell data from the collected CAN data?
The discharge current limit sent to inverter does not seem right?
I am assuming that my DEYE CAN info is correct (I have included CAN tables I used)?
Is there a way of changeing the data before it is being sent to the inverter?

@jezza61
Copy link
Author

jezza61 commented Aug 26, 2024

It seems, that I have not done enough research on CAN protocols, most common batteries seem to have the same, or almost the same protocol structure.
So now I have a better understanding. Now I need to read the manual for the inverter I am going to use shortly :)

@ai-republic
Copy link
Owner

Hi @jezza61,
great to hear you're making progress :)
Could you please attach the log file here running the application in debug mode. Thanks!

@jezza61
Copy link
Author

jezza61 commented Aug 27, 2024

Funny this one :)
As if I knew how to start the debug mode :(

@jezza61
Copy link
Author

jezza61 commented Aug 27, 2024 via email

@ai-republic
Copy link
Owner

In the Configurator app you can set the log level in the general tab. Or your can edit the config/log4j2.xml and set the following to debug

image

@jezza61
Copy link
Author

jezza61 commented Aug 27, 2024 via email

@ai-republic
Copy link
Owner

Ah, I think you forgot to attach the file ;)

@jezza61
Copy link
Author

jezza61 commented Aug 27, 2024 via email

@jezza61
Copy link
Author

jezza61 commented Aug 27, 2024 via email

@jezza61
Copy link
Author

jezza61 commented Aug 27, 2024 via email

@ai-republic
Copy link
Owner

You can also Zip it and attach it

@jezza61
Copy link
Author

jezza61 commented Aug 27, 2024 via email

@ai-republic
Copy link
Owner

ai-republic commented Aug 27, 2024

Maybe you can split it up and only send the first couple of MB. That would be more than enough :)

@jezza61
Copy link
Author

jezza61 commented Aug 27, 2024 via email

@jezza61
Copy link
Author

jezza61 commented Aug 27, 2024 via email

Repository owner deleted a comment from jezza61 Aug 27, 2024
Repository owner deleted a comment from jezza61 Aug 27, 2024
@ai-republic
Copy link
Owner

Hi Jerry,
I've deleted the comments with the log dump as otherwise this thread is unreadable ;)
Could you disable the webserver during testing please and just run the BMS please - makes the log entries more readable. But thats a good tip - I'll separate the webserver log from the application log. And please delete the logs in the logs folder first. Then attach the log file as file please.

@jezza61
Copy link
Author

jezza61 commented Aug 27, 2024 via email

@ai-republic
Copy link
Owner

Yes please. And only as file please

@jezza61
Copy link
Author

jezza61 commented Aug 27, 2024 via email

@ai-republic
Copy link
Owner

So, the Samsung BMS data looks all good. The Deye 0x351 looks also correct according to the spec (except that the maxDischarge Amps is negative of 376.0A):
image

Charge V: 58.1V
Charge A limit: 376.0A
Discharge A limit: 6117.6A
Discharge V limit: 44.8V

On another Deye spec the last 2 bytes are used for the battery discharge voltage limit so that's also ok.

I've changed the Discharge A limit to positive so that it will now show up as 0xB0, 0x0E -> 376.0
Please do a clean install to get the fix :)

@ai-republic
Copy link
Owner

I think I can close this issue now a the Configurator issues have been resolved. Feel free to open another issue if you encounter any problems :)

@jezza61
Copy link
Author

jezza61 commented Aug 30, 2024 via email

@ai-republic
Copy link
Owner

The only issue I have noticed that in the Web server, once you get an error from the bms it becomes visible and after the error is cleared, the webserver still shows the error.You have to restart the program to clear the error.Is that intentional?

No, that is definetely not intentional. I will investigate that - thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants