In the last couple of days I have run a multicore cable from my work room at the back of the house to the gas meter which is under the stairs.
After two days of frustration caused by noisy optical sensors and false triggering, I decided to use one of my newly acquired Hall effect sensors as used on the Lister spark ignition circuit.
I have used a Hall effect sensor Farnell 178-4735
clipped exactly in the same place as the optoreflective switch.
The Hall sensor is mounted so that the face with writing on it, which is triggered by a passing North pole is pointing towards the least significant digit wheel.
This wheel contains the magnet, roughly in the same position as the silver reflective zero digit.
The hall sensor will work from 3V or 5V systems and needs a 10K pull-up resistor because it is open-collector.
As the magnet passes, the open collector output goes cleanly to 0V. Many of my problems with the optical sensor was due to signal bounce and noise pick-up. This inexpensive Hall sensor seems to have cured all that.
To connect up you will need a 3 way cable, or if running a long distance - something like screened microphone cable would be suitable.
I'm still testing to make sure that my pulse bounce and false counting problems have gone away - it's interrupt code on the Arduino, so needs careful debugging to make sure its working correctly.
This gas logging ( and central heating control and monitoring) is all part of the work that I am doing on the Open source Navitrino project.