Using 3 I/O pins in ESP01

I am trying to convert TX/RX pin to be used as I/O pins in ESP01 but when I'm trying to stimulate switch action with adafruit.io the microcontroller misbehaves and starts to trigger random relays. Help in this matter would be greatly appreciated.

add more details, wiring and sketch