Then i tried to simplify the code and just write "AT" to the softwareserial. and it returns nothing. when i read the serial it only has the AT in it and no response.
Why is the behavior so different between the serial monitor and the softwareserial and any suggestions on how to furthur test or fix this?
I will take a SWAG and say you have Tx wired to Tx and Rx wired to Rx, if so it is doing exactly what is expected. Remember a transmitter (Tx) needs somebody to listen, a listener (Rx). Swap the wires. If this is wrong post an annotated schematic showing how it is wired, I do not do well with word problems.
A nodeMCU usually can due to some extra circuitry on the board (mainly an added diode), but an ESP-01 can't.
It may not fail instantly, and it may remain functional for a long time, but it is a 3.3v logic pin that does not really tolerate 5v.
That code uses a baud-rate which is not reliable for swSerial (115200) to communicate with the ESP.
It can be done to do it through swSerial. but then your first AT-command should be a change of baud-rate to 9600 Kbps, after which you change the swSerial baud to that as well.
115200 Kbps is not reliable for reception using swSerial, and even for transmission it can cause issues.
Find the AT-command for baud-rate change,
experiment with it while connecting the ESP straight through the UNO, using a blank sketch.
And most importantly add a voltage divider to the ESP RX pin (GPIO3)
UNO RX(usb TX) -> 1K -> ESP RX -> 1K -> 1K -> GND
Or it will break.
When you were using the serial monitor to send commands to the ESP 01, you had the Tx pin of the USB-to-Serial converter going to the Rx on both the atmega328 and the ESP01, as well as the Tx of the ESP 01 and the atmega328 wired together to the Rx of the USB-to-Serial converter. Note that if you did not hold the atmega328 in reset, or remove the chip entirely, you likely destroyed the Tx output of the ESP 01 as well as the atmega328.
You cannot use Serial on the UNO at the same time as running SoftwareSerial on pins 0 and 1 - and there is absolutely no reason whatsoever to use SoftwareSerial on the hardware serial pins.
If there is no code on the UNO, there is no data signal from the 328P, which effectively is the same as holding it in reset-mode.
In fact you can upload any sketch that does not use 'Serial' or pins 1 & 0 as OUTPUT, and still use the UNO as USB to TTL without issue. I tend to use a version of 'Blink' to give me an indication that exactly that is what is running on my UNO.
Since I could communicate with the ESP after removing all the serial call in the code, I was able to change the baud and ensure it stays.
I will add the resistors, I have them ordered but was too impatient to wait and the chip seems fine so far but i dont plan on leaving it at that.
I was able to solve the issue. I just switched from using RX/TX on my uno to using 5/6 pins and switched rx and tx in the software serial code.
I still cant see the OK result when i read from the stream but i can use .find to confirm its there and i was able to find start a server in code and connect to it from putty.