Terminal Sync


currently working on my project where i need to send commands from my phone to my esp8266.

I am using Terminal.

For example i write in terminal “/command1”, “/command2”,etc and than on esp side i read that after esp wakes up.

Problem is that my esp goes to deepsleep every 5min so I have enabled sync. But problem with that is that it repeat itself each time when esp wakes up. So i my terminal i see repeating msg “/command1”, “/command1”, “/command1” in 5 min intervals.

I could use “isFirstConnect” variable to change status after 1st firing. But status of the variable goes back to default after deepsleep.

I could write variable status in eeprom (i am worried about 100,000 read write routines for eeprom)? Is this correct way to do it or is there another way?

So the question is have can i prevent this or how can i fire this event only once?

if (isFirstConnect) {
isFirstConnect = false;

Seems like you area bit confused.
If you post your code we can help you troubleshoot.
Be sure to format the code using this example: