Sonoff is a system that comes up often on this stack. However, I notice it seems to be of unusually low cost, not available in retail shops, sold widely in the "dodgy side of the internet" (eBay, Amazon Marketplace, Ali, etc.), and I only ever see the fairly meaningless CE mark on it.
The very first rule in NEC makes use of approved equipment mandatory. Virtually all authorities required for "approving" things delegate the job to UL and other reputable testing labs such as CSA, TUV etc.
Is Sonoff equipment actually listed by UL or other reputable testing lab?