I have a manual espresso machine. I have to turn the pump on and off with a switch and judge when to stop by myself.
How do I judge when the best point is to stop pulling the shot? Do I do it by volume, colour, or something else?
Assuming the perfect grind, you are looking for extraction time and volume.
The ideal double shot should be 60 mL (about 2 US fluid ounces) and should be extracted between 20-30 seconds.
I use the double shot as the example because it is considered to be the standard.
So essentially, pull a double shot until 60 mL or 2 ounces comes out. You can use something to measure this volume like a graduated shot glass. Time how long this takes. I always aim for 20 seconds. If it is faster than 20 seconds, then you need to make your grind slightly finer. If it is slower than this, then you need to make the grind slightly coarser.
Then modify to your taste! If you like the way it tastes when it takes 30 seconds, then drink away and enjoy. If you prefer 20 seconds, then enjoy that!
Half these values for a single shot.
Note: Some people will argue that a double shot should be 40 mL and not 60 mL. This is also about preference.
I generally judge when to stop my shot based off when blonding begins to occur. This is when the espresso changes to a noticeably lighter, yellowish color. At this stage, only bitter flavors are being extracted from the coffee, and any more extraction will only degrade the flavor of your shot.
It takes a bit of practice to notice blonding, and can be made more obvious by using a bottomless portafilter. I also suggest using a stopwatch to determine how long it takes before blonding occurs, so you can see how consistent the rest of your process is.