Code Monkey home page Code Monkey logo

power_meter_mqtt's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

power_meter_mqtt's Issues

Is it correct?

Are you sure it works properly? Looking at void IRAM_ATTR isr() function, it takes the time of the first pulse, then waits for the seconds and counts power. This part looks ok. Then after power is counted, it sets bPulseDetected to false. This means, that when third pulse comes, it doesn't count the power, only starts waiting for the fourth pulse. Looks like it should miss about half of power consumption this way.
Am I missing something?

DHT22 support

Hi.
Would it be possible to add DHT22 support?
And also yearly usage.

TNX

[SOLVED] Constantly 1800W?

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!

Schrack mgrzk465

Hi. I need some help.
Want to add this meter to HomeAssistant and am having problems.
Those are impulse specs:
Pulsfrequenz: 1000 imp/kWh
Impulsdauer: 32 ms ±2 ms
Bemessungsspannung DC: 27 V max
Schaltstrom: 27 mA max

I was able to program the microcontroller and i am able to ping it.
Have changed in .ino file:
#define IN_PIN_PEM 18 /* input pin for pulse sensor /
#define IN_PIN_TMP 2 /
input pin for DS18d20 temperature sensor /
#define ISR_TYPE FALLING /
isr triggering mode /
#define HOUR 3600.0 /
hour as constant /
#define PULSES_KWH_RES 1 /
1 KW = 1000W, power meter has 2000 (0.5) inpulses resolution /
#define SECOUND_ISR_PERIOD 0.032 /
pulse period is ~90 ms (32ms), used to ignore secound interrupt arrival bug*/
#define MAX_POWER 7040 /* for a peek of 32A => 7040W, ignor higher measurements */

And I get nothing. Also have problems with HomeAssitant I can not get this MQTT working. _Have mosquito installed also devices from Tasmota are working ok. Have paste the config into .yaml and nothing.
I am using ESP32 WeMos LOLIN32 Lite. But it is the same as yours basically.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.