Jump to content

The dreaded Revov's on Sale!


shanghailoz

Recommended Posts

Read the instructions for the repo. https://github.com/Louisvdw/dbus-serialbattery/wiki/How-to-install

Once installed, overwrite with the updated files from here from the REVOV branch - https://github.com/csloz/dbus-serialbattery

You'll need ssh access to your PI or CCGX

 

Files to update / add from his release are mostly in these 2 files

https://github.com/csloz/dbus-serialbattery/blob/revov/etc/dbus-serialbattery/revov.py (the partially completed driver)

https://github.com/csloz/dbus-serialbattery/blob/revov/etc/dbus-serialbattery/dbus-serialbattery.py (some mild updates to add a link to load the revov.py code).

 

Bit busy on work atm, if you get stuck shout.

 

 

 

 

 

 

 

Link to comment
Share on other sites

Do read the caveats above i.e. - some values aren't correct.

I will get around to sorting that out, but right now busy with work stuff, which takes priority.

Feel free to delve in and fix yourself though (especially since I noted the packet format)

Send me a push request if you do, so i can merge.  Cheers.

Link to comment
Share on other sites

Thank you, @shanghailoz!

I believe that I have installed it correctly.

I followed the following steps:
1. Execute SSH installer script option via Putty (SSH) on my CCGX as per Wiki (How to Install) - installing Louis latest release of the driver
2. Download zip file of the revov branch containing the updated dbus_serialbattery folder and files
3. Overwrite files on CCGX using FileZilla (SFTP) to transfer the files from my desktop
4. Reboot CCGX and voila! SerialBattery appears on device list

Link to comment
Share on other sites

4 minutes ago, Nicholas said:

Thank you, @shanghailoz!

I believe that I have installed it correctly.

I followed the following steps:
1. Execute SSH installer script option via Putty (SSH) on my CCGX as per Wiki (How to Install) - installing Louis latest release of the driver
2. Download zip file of the revov branch containing the updated dbus_serialbattery folder and files
3. Overwrite files on CCGX using FileZilla (SFTP) to transfer the files from my desktop
4. Reboot CCGX and voila! SerialBattery appears on device list

Just be aware that battery voltage will be incorrect if a cell is in error state.  I do need to look at the bit values to work out what bits they use for this still, its ok when not in error state.

(a data sheet from Tianpower of the packet format would be nice, but no, its reverse engineer, bleh).

 

I've had the current version running on mine for a month and a half, seems reliable, and is a good indicator for me of values.  I do need to get the SoC state calc done and added in, as well as the other things i don't know from the data...  

 

When I have time haha.

 

 

Link to comment
Share on other sites

  • 1 month later...

Good day, I may be of help to help solve the outstanding “issues” with the State of Charge (SoC) and charging current if you can help me with some sort of guidance or software to query the BMS to find out the correct protocols. I have tried various combinations of the “command_one” and “command_two” with no clear responses to say that it is the correct “Modbus RTU requests”.

As per Louis Van Der Walt’s instructions, I changed the CCCM_ENABLE = False in the utils.py, restarted the system, but when I plugged the USB back in, it appears as if the changes were overwritten since the charging rate was limited as before I made the change in the utils.py (I did not check it so I don’t know if that is true). So, now the USB cable remains unplugged, and I am wating for the new revov.py script.

So, I want to repeat my offer. If there is anything I can help with, let me know.

Link to comment
Share on other sites

3 hours ago, Agulhascorp said:

Good day, I may be of help to help solve the outstanding “issues” with the State of Charge (SoC) and charging current if you can help me with some sort of guidance or software to query the BMS to find out the correct protocols. I have tried various combinations of the “command_one” and “command_two” with no clear responses to say that it is the correct “Modbus RTU requests”.

As per Louis Van Der Walt’s instructions, I changed the CCCM_ENABLE = False in the utils.py, restarted the system, but when I plugged the USB back in, it appears as if the changes were overwritten since the charging rate was limited as before I made the change in the utils.py (I did not check it so I don’t know if that is true). So, now the USB cable remains unplugged, and I am wating for the new revov.py script.

So, I want to repeat my offer. If there is anything I can help with, let me know.

To be honest my notes in the thread, and the current code should be enough to continue working on things.  Fork it, and continue.  Unfortunately I just haven't had time to continue, and it works well enough for me for now.

Did Louis finally update his repo with my additions?  If not, you need to pull the current version from my fork here - 

 

Not that complicated

You send the device a command over serial, it sends data back, thats basically it, and you parse the reply into something meaningful.

 

Here are 2 commands I know about -

command_get_version = b"\x7C\x01\x42\x00\x80\x0D"  #Get version number
command_get_model = b"\x7C\x01\x33\x00\xFE\x0D" #Get model number 

 

I sniffed what I could of the protocol from watching the BMS app itself, and some detective work.

 

Current code  - 

https://github.com/csloz/dbus-serialbattery/blob/revov/etc/dbus-serialbattery/revov.py

 

 

Now we sort of know the packet format, the code needs to be reorganized, as we can parse the entire thing in one go.

I put enough logging into the driver so that its useful.

eg

image.thumb.png.36d6dec386822ea7a29ee495e8c3a734.png

 

 

Link to comment
Share on other sites

  • 11 months later...

Been a while, but I have revisited this, as the current driver that replaced mine didn't actually work on my Revov BMS

My updated driver is here - https://github.com/csloz/dbus-serialbattery

Will probably be merged back with main at some point, but this will work on the older Tianpower BMS that Revov used.

I also fixed a few of the missing bits like temp sensor etc.  

 

Works fine on v3 of PI Venus.

 

 

Screenshot2023-06-05at19_27_15.thumb.png.6cd6fb460707485720d8c094df58f884.pngScreenshot2023-06-05at19_27_24.thumb.png.f7da861bc6638ae321ba170a4fa06efe.pngScreenshot2023-06-05at19_27_56.thumb.png.1debe0c0df112dab8c837f86f69daa0f.pngScreenshot2023-06-05at19_28_10.thumb.png.248238383788843078afbebd29d73054.png

Edited by shanghailoz
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...