
I am trying to get a NPN sensor to work to measure a watermeter. I have followed instructions here:
https://espeasy.readthedocs.io/en/lates ... j12a3-page
I have bought the 5V version of this sensor and attached a separate DC power supply (5V/600mA) to the sensor. Normally the wiring is like this:
VCC (brown)
GND (blue)
If I connect the + wire from the DC power supply to the brown wire and the - wire to blue, the sensor doesn't work. Maybe a mistake in China?

I am running a NodeMCU with Git Build mega-20190630 and I have configured the device as required. The black wire (signal) is connected to D6 of the NodeMCU. The NodeMCU is powered by USB via my computer for testing for now.
The problem is that I'm not able to get any pulse registered whenever I hold a piece of metal in front of the NPN sensor. When I unplug the black wire from D6 sometimes a pulse is registered but not always. If I try this on D5, no pulse count is ever detected (even not when unplugging the signal wire).
When I measure the sensor it goes from +1.12V to -3.56V when I hold a piece of metal in front of it.
Any help would be much appreciated!