Esp8266 Relay without delay Issues/pulling my hair out

It will be much easier to use a framework for the ESP8266.
Check out:

  1. GitHub - homieiot/homie-esp8266: 💡 ESP8266 framework for Homie, a lightweight MQTT convention for the IoT
  2. Releases · homieiot/homie-esp8266 · GitHub
  3. http://marvinroger.github.io/homie-esp8266/

and of course: