ESP8266 + pulse counting Wifi upload to Emoncms

I’ve been thinking about a cheap method of uploading led pulses from my Kwh meter to Emoncms and thought it could be done with just a ESP8266 and a photo diode like the one you can get from the shop Optical Utility Meter LED Pulse Sensor - Shop | OpenEnergyMonitor Is there any code already written to do this for the ESP8266 ? I’ve come across Easyesp which might do it, but unsure it’ll work with Emoncms. This shows the it working with Domoticz Utility room reading with the ESP8266 and Domoticz - YouTube



It should be possible since ESP8266 has got an interrupt input, see this thread and link:

It sounds like every ESP8266 pin can be used in interrupt mode:

Pin interrupts are supported through attachInterrupt, detachInterrupt functions. Interrupts may be attached to any GPIO pin, except GPIO16. Standard Arduino interrupt types are supported: CHANGE, RISING, FALLING.

from: Reference · ESP8266 Arduino Core

I can verify this. I have been used this to measuring my electricity consumption since I got working TSL257 sensor. You can find example code from other thread linked by Glyn. Although I am not using Emoncms after all so I cannot comment to that.