ESP-01 and HW-655 Relay not working with Virtual Pin

Okay, neither pin is really suitable for this, its just that GPIO2 is somewhat more suitable…

With your reed switch connected to GPIO2 and GND, and using an INPUT_PULLUP pinMode command, then I’d expect your device to boot correctly if the door is closed.

Pete.