I have bought a photoresistor (http://www.ebay.com/itm/172263214271?euid=2cc8ff89f1f6470f9af7e2124d1f5b49&bu=44256571744&cp=1&sojTags=bu=bu) and got inspired to try to create a power meter as this blog describes http://www.thalin.se/2015/05/power-meter-pulse-logger-with-esp8266.html.
The basic idea is to count led/pulse blinks in the fuse box. 1000 blinks = 1 kw.
I use the digital output pin and triggers on state up. Seems to work great when the fuse box door is open , but if I close it too much or simulates with covering the “background” light it don’t work as expected.
It stops to count the blinks/pulses.
Any idea why? Any help is appreciated.