Linear actuator

You appear to be using a NodeMCU and have three reed switches which indicate the top, middle and bottom positions of the actuator.
I’m not clear from your description what the significance of the middle position sensor is in the desired process.

Personally, I’d attach interrupts to these three reed switches and have three different functions that are called when the interrupts change to do three different actions.

You may also need to read the condition of these three reed switches at startup so that you know I’d the actuator is at one of the three positions and use this information in your logic.

To be honest, you’ve probably reached (or exceeded) the limit of the useable number of GPIO pins available in the NodeMCU, especially when you consider that pulling some of these pins HIGH or LOW at boot-up will put the NodeMCU into programming mode rather than code execution mode…

As a result, you may be better using an ESP32 board for this instead.

Also, mixing BlynkTimer and millis comparison techniques in the same sketch isn’t really a great idea. I’d stick with BlynkTimer and use timeout timers in a lambda function if necessary (but it’s probably not necessary with the correct use of the reed switches).

It’s easy to get confused with the coding process with something like this, so maybe you should sit down with a piece of paper and draw/write out the various scenarios that could occur and what you want the system to do in each situation.

Pete.