The Issue -- Lights (front, back or both) start strobing when the battery is in place and switched on. They then switch off when supposedly switched on at the panel display! Here is a related post https://analogmotion.com/community/forums/forums/5092-amx-technical-discussion/topics/18927-light-flashes-when-turned-off-front-doesn-t-work-when-on
The Cause and Solution -- The light controller has blown and needs to be replaced.
Important Note / Caution -- A blown light controller is almost always due to the red and black light wires coming into contact with each other. Even if the battery is not installed this can still blow the light controller because of the residual charge in the capacitor in the main motor controller (battery holder). It is therefore VITAL to ensure the integrity and correct wiring of lights prior to replacing the controller (else it will blow again). All connections must be secure. No bare pins visible.
Requirement to fix -- Anew light controller (contact AM), probably long-nosed pliers and definitely patience. It can be fiddly.
Refer to first photo to see what exactly it is you are trying to extract and replace. The controller has 3 connections. The red/black ones are to each of the front and back lights. The usual barrel connect goes to the main controller.
Turn bike upside down to access wiring where it enters the frame.
Carefully - by gently easing them and noting which one is connected to the front light wiring - identify which of the wires coming from the controller is the one for the light controller. Hint the one that subsequently connects to the flat ribbon cable is NOT it -- that is the pedal sensor. The best way seems to be to gently ease the wires out from the frame tube (see photo) in order to free a bit of space in there.
Once the lighting controller wire is identified use it to carefully remove the controller from inside the frame. Gently tug and ease on the wire until the controller and connectors emerge from the frame.
Replace controller and reinstall wiring into frame. Here you have to be extra patient. It is very easy to disturb the back light connector when reinserting it into the frame and then you will not have a back light. I know from experience.
Ride off into the dark with fully functioning lights.