The volumetric measurement is done by the onboard computer (under the drip tray). There are also small water volume measuring "brass blocks" in the pipe to each group - again under the drip tray. These have a small vane which is turned by the water and sends pulses to the computer board.
The board is several hundred dollars to replace.... and whilst you could build a microprocessor based replacement (basically what it is) - this would not be easy.
Mine was replaced just before I bought the machine (it had failed)..... but for quality coffee I dont use it in any case (except to program cooling flushes)....
Why not dispense with the electronics and convert the machine to a semi-auto.... which I will be doing if the board fails..... a relatively simple task..... and your machine will produce better coffee as well!!