No VPN or exposing ports necessary.
This program written with Arduino Code running on ESP8266 (Wemos D1) is just a test to access, read status and control Tuya compatible WiFi Smart Devices (Plugs, Switches, Lights, Window Covers, etc.) ...
Check various ESP8266 / Arduino-framework wifi connection strategies and their timings. Timing includes publishing topics to the local MQTT server (which confirms a good wifi connection). What's the ...