Hello Doug, the Sonoff devices have an ESP8266 WIFI module inside that you can program with your own firmware and are great pieces of kit.
Here’s an example using the Sonoff S20 smartplug:
https://community.openenergymonitor.org/t/running-emonesp-on-the-sonoff-s20-smart-plug/9096
There’s also a small inline modules e.g:
https://www.ebay.co.uk/itm/Sonoff-ITEAD-Smart-Home-WiFi-Wireless-Switch-Module-Fr-Apple-Android-APP-Control-/332599444186?vti=