diy solar

diy solar

Solar Assistant - data logger

First you need the right physical connection, in this case an RJ-45 per post #259
OK thanks. It's just that power.esrl3 said with that BMS I needed to connect using RS232, which is a different port:
You need rs232 for a jakiper/sok-like battery. Thats a Pace BMS.
But perhaps that's for some other kind of computer comms and not something specific to Solar Assistant. Or it can do either.

Then you need the right physical pin out, connecting the pins in the connector to the correct wires. That's what is being shown as "External Communications" in #259. You are connecting an external device to the pack, so you'd use external comms portion of the table.
Makes sense, although "Communication with host computer" listed for the RS232 port makes equal (English language) sense to me but I am learning as we go here. It is confusing!

I'm going to assume you want to use RS-485 with SA, as it's supported. Not sure if SA talks CAN or not.
RS-485 can be implemented a couple of different ways, sometimes it needs a ground (GND), but I try to just use the data lines, no ground, if I can.
In the SA help guide it shows this:
Screen Shot 2022-08-27 at 6.35.38 am.png
I note some batteries use the RS232 port.

If the BMS is the same as Jakiper as power.esrl3 said earlier then yes, it does look like the RS485 port is the right one.

The diagram shows A data on pins 1 & 8, B data on 2 & 7.
Assuming we are using the left side port:
Screen Shot 2022-08-27 at 6.41.21 am.png
Then it looks like A (red text) is on pins 2,7 and B is on 1,8. Not that I've a clue what A and B refer to or actually do.

So you will probably need to use a little trial and error to see what pinout works for your configuration.
I think on mine I found it was 8 = B (D+) and 7 = A (D-)
I used the alligator clips to swap between the wires and find which way worked for me.
So if I understand this right, then I need to connect the USB adapter with one A connection and one B connection and not two A's or two B's.

It's then a matter of which combination works, which could be either of:
A2 & B1
A7 & B1
A2 & B8
A7 & B8

I have this USB to RS485 adapter (with alligator clips) on order as you suggested:

A closer look at the terminals:
Screen Shot 2022-08-27 at 6.50.31 am.png

There are only three connection options on this end, so that reduces the combinations I need to check.

sometimes it needs a ground (GND), but I try to just use the data lines, no ground, if I can.
So that adds another possible combination, each of the above with or without a ground. I guess it may also work without or without the ground connection.

In your post #258, you have a picture of a DB-9 serial connection, that's just the physical connection type. You can run lots of different signals across it, serial being the most common use. It's not going to help you here, there is no DB-9 port on a PI and I doubt your batteries have DB-9 ports either.
Yes, it was just that's the image which came to mind when the term RS232 was used. But I guess RS232 is more about a protocol than a connector.

In #259 you are showing an RJ-45 connector, most commonly used for ethernet but again, can be used for a variety of signals and pinouts. The bottom image in #259 shows and RJ-11, 6 pin connection. I think it's mislabeled and should be an RJ-25 if it has 6 pins.
Thanks, yes it would appear so. When you are learning such documentation errors don't help!

NC is for no connection in the above diagram (#259)
At least I guess something right!
.

Many thanks for your patience and assistance helping to reduce my ignorance. I shall wait for the arrival of the adapter and when it's here give all this a try and report back.
 
I'm actually using RS232 for a jakiper/sok-like battery with SolarAssistant, which uses Pace BMS. Do you happen to have RS232 to USB? Try to read datas using PBMS Tools, if it reads, then SolarAssistant should work.

However, some Pace BMS actually works with RS485 (the older version I guess?) for SA. Mine is newer I believe (same as the 5U version of jakiper/sok), can't seem to make it work with RS485 both for PC and SA.

Mine comes with the adaptor. I believe (proceed at your own risk) you should be fine with Jakiper/Sok's RS232 adaptor or even from SA's shop for Hubble. They all share the same bms which is Pace BMS.
 
@wattmatters sorry for the lack of help but I did not have an easy time getting mine to work and I use to do this stuff for a living. I don't have the same inverter or battery as you but one nugget of advice I can give you is that part of my problem was patience. Once you plug this connector in it takes about 60-90 seconds before it's starts transferring data (at least that was what happened in my case). I ended up spending the better half of a day on this because I only waited about 20 seconds and figured something was wrong and started redoing the wiring. It ended up that I had it right the very first time and started needlessly going down the Rabbit hole after that.
 
Last edited:
Do you happen to have RS232 to USB? Try to read datas using PBMS Tools, if it reads, then SolarAssistant should work.
I don't think so. I might have an old USB to 9-pin serial adapter but that I can't plug in.

My laptop is a Mac so not sure this is going to help in any case.

I believe (proceed at your own risk) you should be fine with Jakiper/Sok's RS232 adaptor
This?

@wattmatters sorry for the lack of help
Thanks but no apology necessary.

but one nugget of advice I can give you is that part of my problem was patience.
Noted and thanks.

My RS485 adapters haven't arrived yet, prob a couple of weeks.
 
I don't think so. I might have an old USB to 9-pin serial adapter but that I can't plug in.

My laptop is a Mac so not sure this is going to help in any case.


This?


Thanks but no apology necessary.


Noted and thanks.

My RS485 adapters haven't arrived yet, prob a couple of weeks.
Yes, that exactly. Its expensive to be honest. You can wire your own but I have not delve into that since my battery came with an adaptor, so can't help you more in this regard.
 
Yes, that exactly. Its expensive to be honest. You can wire your own but I have not delve into that since my battery came with an adaptor, so can't help you more in this regard.
OK, thanks. I will see how I go with the RS485 adapter and if I have no luck with that then I'll give the Jakiper cable a go.

Are you happy with your Jakiper batteries? I see they sell from an Australian warehouse. Same capacity units are about 10% more than I paid. But if in stock you get them in days, not months.
 
OK, thanks. I will see how I go with the RS485 adapter and if I have no luck with that then I'll give the Jakiper cable a go.

Are you happy with your Jakiper batteries? I see they sell from an Australian warehouse. Same capacity units are about 10% more than I paid. But if in stock you get them in days, not months.
No, mine is not jakiper, but they share the same BMS.

I can only comment on BMS. BMS is good, it has the ability to balance on idle (when initially charged), and stops balancing when discharge is detected. That's how balancing should work in my opinion.
 
Solar Assistant uses influxdb and grafana. The files are easily accessible. There are two small changes you can make to the OS's filesystem in order to enable ssh. I find it extremely valuable to see the logging information whenever there's an issue and you simply cannot access it without ssh. Feel free to pm me and I can provide some instructions. If there's broad interest, I'm happy to write something up for the forum.

Here are the steps - please let me know if it works for you. This is all from memory and it's been a while so I may have missed a step. There are two prerequisites - (1) that you know how ssh keys work and how to generate and retrieve the public key you want to use to access the SA pi; (2) you know how to mount the SD card and modify its filesystem.

1. Mount the SD card with the solar assistant image on a Linux machine or something capable of read-write on ext4 file systems.
2. If you don't have an ssh key on your local machine, create one. Instructions vary by OS/ssh client but standard *nix systems you just run "ssh-keygen". Copy the contents of your public key.
3. Append the public key to /etc/updates.allow on the solar assistant image
4. Modify /etc/security/init.sh and comment out the following line by prefixing it with a '#':
if ! [[ $(cat /etc/updates.allow | wc -l) == 1 ]];then exit 1;fi
5. Put the SD card back into your Pi and boot it up.
6. ssh solar-assistant@<ip address of your pi> -p 2222 (tcp port 2222)

The code seems to be synced to the pi each time it starts up and is stored in shared memory so it's wiped on reboot. It's located in /dev/shm/grafana-sync. It's compiled Elixir code so you won't be able to do much with it. The influxdb data is located in /var/lib/influxdb and of course /var/log will have all the interesting log files. sudo also works password-less.
 
Unfortunately no luck this morning getting the battery communications talking with Solar Assistant.

SA recognised the USB adapter just fine:

Screen Shot 2022-09-02 at 10.27.33 am.png
The cable I cut to expose the wires was correctly colour coded as per the RJ-45 pin out diagram.

I tried various combinations of A+ and B- connections as per the table below without success in establishing a communications link to the battery.

I repeated the exercise using different DIP switch settings as indicated in the table below.

For DIP switch changes I switched the batteries off, made the switch change and turned battery back on.

As per robby's suggested I waited quite a while between changes to allow SA time to attempt to establish comms.

I then went through each option a second time, just in case. No luck, none of the following combinations worked.

Screen Shot 2022-09-02 at 10.43.14 am.png

Unless there are other combinations I should try, I guess I'll order the Jakiper RS-232 cable which power.esrl3 suggested.
 
Did you also specify an inverter in SA?
You don't actually have to connect one, but you do need to select one in the configuration screen. It will give an error and you can ignore it.
BTW: your actual rj45 is probably wired to B not A if you cut an ethernet cable in half.
 
Unfortunately no luck this morning getting the battery communications talking with Solar Assistant.

SA recognised the USB adapter just fine:

View attachment 109787
The cable I cut to expose the wires was correctly colour coded as per the RJ-45 pin out diagram.

I tried various combinations of A+ and B- connections as per the table below without success in establishing a communications link to the battery.

I repeated the exercise using different DIP switch settings as indicated in the table below.

For DIP switch changes I switched the batteries off, made the switch change and turned battery back on.

As per robby's suggested I waited quite a while between changes to allow SA time to attempt to establish comms.

I then went through each option a second time, just in case. No luck, none of the following combinations worked.

View attachment 109790

Unless there are other combinations I should try, I guess I'll order the Jakiper RS-232 cable which power.esrl3 suggested.

your battery ports and dip switches looks an awful lot like mine, albeit with a different case.
1662099914096.png
I couldn't get rs485 to work, but my bet is that you can get it working with RS232 and SA using my instructions here:

many of these batteries all use the same electronics and generic boards. The cable is cheap.

good luck!
 
Last edited:
I couldn't get rs485 to work, but my bet is that you can get it working with RS232 and SA using my instructions here:
many of these batteries all use the same electronics and generic boards. The cable is cheap.

good luck!
Thanks. The USB-RS232/RJ12 cable you linked in your other post wasn't available but I have one on order from the local Jakiper site. It's not all that cheap but we'll see how it goes once I have it.

And yes the dip switches, battery status LEDs, and the rest all look logically the same as my battery. So fingers crossed. I'll update when I have it.
 
If our batteries are based on the same platform/bms, you might also try using pbms.exe to aid in your journey. It's got a quick connect feature and decent comms configuration.
 
Thanks, I don't know what that is but it sounds like a Microsoft Windows thing. I use a Mac.
Tools for mac are pretty limited and those I found online didn't work or were on some sketchy websites that didn't look trustworthy (to me anyway). I picked up a used Microsoft Surface for cheap solely to use with battery comms. If you do find something for Mac that works, please let me know. I'm also a Mac user :)
 
Tools for mac are pretty limited and those I found online didn't work or were on some sketchy websites that didn't look trustworthy (to me anyway). I picked up a used Microsoft Surface for cheap solely to use with battery comms. If you do find something for Mac that works, please let me know. I'm also a Mac user
Not sure it'd matter if I did as I have little idea about what tools to look for let alone what to do with one.

I have zero idea what pbms.exe is or does and my google search didn't enlighten me either - it was mostly just links discussing whether it was a virus.
 
Back
Top