Raleigh Tekoa (2015) wiring issue

I hope everyone is doing well.

I have a Raleigh 2015 Tekoa. Several years ago, I had to put an after market battery on the bike. When I cut the cable from the battery to the there were/ are four wires. There are red and black wires for the power and a blue and white for communication between the battery and the control board in the motor. When using the original battery, the display would show the amount of charge (in miles) left in the battery. This amount would change depending on the level of power. This measurement was pretty accurate. I would like to have this feature reinstalled on my bike. Does anyone have an idea of a resource that could help me in this endeavor?