OpenEnergyMonitor Community

ESP8266 + pulse counting Wifi upload to Emoncms

Tags: #<Tag:0x00007fc9b178c3f0> #<Tag:0x00007fc9b178c210>

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 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



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.


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.