Thank you, thats a lot of information! Will try and get back.
To answer your question, it didnt just stop working overnight, the bike was altering in giving power and randomly shutting off for 2 days, after which it stopped giving power completely. The battery is a 36v 300wh.