You should flash with Tasmota. See Integrating Sonoff Mini with ST. My findings… post 23 explains the steps.