Trying to get an energy meter pulse reading setup to work

Moderators: grovkillen, Stuntteam, TD-er

Message
Author
IoT-beginner
New user
Posts: 2
Joined: 30 Jun 2017, 12:27

Trying to get an energy meter pulse reading setup to work

#1 Post by IoT-beginner » 30 Jun 2017, 14:53

Hello everyone,
My first post on this forum, i've been tinkering and learning IoT and home assistant mostly the last few weeks. Gotten some stuff to work and wanted to get into monitoring my energy consumption and such with espeasy, mqtt and home assistant.

I have a LM393 optical pulse counter sensor thingy and some nodemcus obviously. My energy meter is a pretty standard 1000 pulses /KWh deal. I have however had some trouble finding the correct values and settings for this in espeasy.

I've somewhat figured some stuff out and some stuff i'm not so sure on.
Everything under Task Setting is fairly obvious.
Under Sensor:
The gpio should maybe be changed to D5 (from reading somewere i cant recall where in what context, only that it was used for something else or not optimal)
Debounce time (mSec) i got from reading some discussion (assuming its good, someone posted that it did not work correctly with less than 100 ms)
Counter type I am assuming is the correct one for this application
Mode Type i'm not so clear on what should be selected, change seemed most obvious

Data acquisition delay
Is this the delay before the sensor starts collecting data from bootup or the frequency of pulishing data to the mqtt server? its not clear to me
As for the values/calculations
1 should give me current consuomtion from what i understand. X pulses * 3600 / 60
2 should give me total KWh consumed
photo_2017-06-30_14-20-31.jpg
However this doesnt seem to be working all that well
Capture.PNG
It only publishes one topic to mqtt, according to espeasy there are 3 topics that should be published(?)
Capture2.PNG
Sample output from MQTT.fx client

I've also used the sketch from here https://community.home-assistant.io/t/p ... mqtt/16316
It works fine even though this guys project uses an electrical impulse approch and i use an optical one, its just a digital signal.
This seems to work fine but there is some sort of problem with the sketch and it crashes rather often.

So i guess i'm looking for clues, hints, errors, comments whatever to further my understanding of this. The aim is to be able to log current consumption on a 60 sec basis, daily consumption and maybe a counter of sorts to see total KWh consumed over a period.

English is not my native language and sometimes i mangle the keyboard a little too fast, so in advance sorry for spelling mistakes :)
You do not have the required permissions to view the files attached to this post.

Who is online

Users browsing this forum: Anthropic Claude Bot [bot], Semrush [Bot] and 13 guests