fvilmos / power_meter_mqtt

esp32 power meter for sensors with pulse output. Implements MQTT for status reporting. Accurate and easily can be integrated with Home Automation systems.
GNU General Public License v3.0
24 stars 5 forks source link

[SOLVED] Constantly 1800W? #3

Closed zeirix closed 1 year ago

zeirix commented 1 year ago

Hi,

thank you for the cool project!

I managed it to run it on a WT32-ETH01 Board (using Ethernet), it is sending MQTT packages as expected. Only the readout is constantly 1800W, no matter what's happening (Hi/Lo) on Pin 18 (According to IO4 on my board). These would be 2 pulses/second (my counter has a PULSES_KWH_RES 1).

Do you know a bug or a process, which could trigger the Interrupt exactly two times a second?

Thank You!

zeirix commented 1 year ago

Sorry for the disturbance. By accident I figured out, that the Pin numbering is according to the numbering on the board (yes, I'm a ESP32 newbie). Using #define IN_PIN_PEM 4 solved the issue. Have a nice day!

fvilmos commented 1 year ago

Hello Zeirix, great that is working now!