You would first need to flash the sonoff mini with tasmota, here is a useful starter.
and then use a driver like this for stock tasmota
or if adventurous, use a modified version of tasmota to use with these drivers