Found the chainring bolts were in need of tightening on the ebike which might explain the chain coming off. The battery fixing to the bike, a key operated peg into a hole in the battery casing, had a degree of slack in it so wrapped stripes of tape on the appropriate end of the hole to reduce the available movement.
Power stayed on as I pushed and pulled the battery it seemed okay but heading to Waitrose it lost power again on a climb.
Then at Waitrose I discovered before entering I had no wallet with me.
Headed back home, decided to risk the roadworks temporary lights and fortunately had two cars in front of me to trigger the sensor.
Found wallet and decided to try some more tape on the battery fixing hole only to drop the battery connector end first
Looks like a sunny afternoon will be spent trying to put it back together.