lrswss / esp8266-wifi-power-meter Goto Github PK
View Code? Open in Web Editor NEWESP8266 Wifi Power Meter - read and publish rotations of ferraris disk power meter with an IR sensor
License: MIT License
ESP8266 Wifi Power Meter - read and publish rotations of ferraris disk power meter with an IR sensor
License: MIT License
Hi,
thanks for your hard work, it works like a charm :-).
I'm wondering where in the code i can change the meter-number. Here it is sth like 078893. i'd like to change it to the real meter-number from the Stromnetzbetreiber :-), especially because the number shows up in the mqtt-message.
Feature request: Mqtt Port in the GUI.
btw: You didn't change the Version number to 212 in config.h .. Don't know if that matters..
btw2: Is there a reason why WiFiUDP.h isn't in your Code? Perhaps you should mention it in your readme.
Cheers,
Alex
Hey Lars, great job and a very useful project. Thank you for your great idea! Initially all worked fine. The manual for installation is perfectly written. Now it happens, after restarts, that I do have a Wifi-connection (-65 dbm) but either the IR-sensor is not counting, data are not published over MQTT or both. The green lights of the module are working ( one permanently and one is flashing when the red mark is passing). Any Tips from your side?
When i want to save username and password for mqtt authentication, it rejects by displaying "Check MQTT username/password".
[12:43:11]Connecting to MQTT Broker 192.168.xxx.xxx as PowerMeter_1e9cc...failed (error 5)
[12:43:12]Connecting to MQTT Broker 192.168.xxx.xxx as PowerMeter_ba257...failed (error 5)
[12:43:13]Connecting to MQTT Broker 192.168.xxx.xxx as PowerMeter_91488...failed (error 5)
Main page starts flashing and displays MQTT error.
MQTT is not activated in Settings.
https://user-images.githubusercontent.com/23298068/222931889-25db709a-7dc5-4b8b-80d1-924101a82247.MOV
If you switch to German UI as mentioned in the description there is no ‘Settings’ Page loading after you click on the button.
Hello everyone,
First of all thanks for the great project.
only i have one problem,
mqtt publish is executed after each read.
I even entered the code (Hard-coded 90 sec) but it published every approx +- 1 seconds further.
Somehow the variable is not read?
Hi there,
first of all thanks for the great work!
Would it be possible to also publish the total consumption via MQTT or am missing something?
I can get the data by HTTP Request, but it would be great to also have this data directly available as an entity in Home Assistant.
Thanks
Hi Lars,
Thanks for the effort you've gone to with this little project. I stumbled across it a few weeks ago while I was researching the possibility of reading my old spinning disc energy meters at my house and logging my energy usage. I was pleasantly surprised when your code just worked straight away without any further intervention on my part. A lot of the other projects for reading electromechanical meters I'd seen thus far seemed to require a significant amount of fine-tuning and careful planning in order for the meter to read correctly, and yours is the first one which worked first time around, which I'm really grateful for!
I was wondering if you were considering adding any form of power saving features to the ESP8266 codebase? I realise that the ESP8266 doesn't have a great deal of flexibility in terms of allowing A/D reads while in sleep, and that the very nature of the meter reads means that the CPU cannot be allowed to sleep in between pulses. But perhaps there could be an option to disable the Wifi for a period, continue to detect/count pulses in that period (with timestamps) and then enable Wifi long enough to transmit a burst of logged data for that period to MQTT? Maybe the web interface could have a selectable 'power saving' option which allows the user to specify a period of 'Wifi disabled' in minutes/hours?
My initial test setup for trying out your project was powered by a single 18650 cell, which initially worked great but didn't last overnight. My hope was that I could use a small solar cell to keep the battery topped up during the day and rely on the battery at night, or when daytime solar levels are low.
Thanks again for your work on this project!
Hi,
sehr cooles Projekt da es den Analogen output benutzt!
Leider erhalte ich beim kompilieren den Fehler im Titel für die Zeilen: 331, 793, 838 und 857
Hi Lars,
I finally managed to get the power meter working correctly!
The final issue I ran into was revolutions not being counted when using a high amount of electricity.
Because calibration was working fine I figured the problem had to be in the rising edge detection.
Commenting out the two lines on row 105-106 of src/ferraris.cpp and using a 15ms sample rate fixed my problem.
I guess this is caused by my very fast spinning meter.
// try to find a rising edge in previous analog readings
static bool findRisingEdge() {
uint16_t i, belowThresholdTrigger;
uint8_t s = 1;
uint16_t belowTh = 0;
uint16_t aboveTh = 0;
// reading interval min. 50ms
//if (50 / settings.readingsIntervalMs > 1)
// s = 50 / settings.readingsIntervalMs;
// min. number of pulses below threshold required to detect a rising edge
belowThresholdTrigger = (settings.pulseDebounceMs / 2) / settings.readingsIntervalMs;
i = ferraris.index > 0 ? ferraris.index : ferraris.size - 1;
I don't know how (or if) you want to resolve this issue, maybe a button on the advanced settings panel? Or turning off the minimum interval of 50ms when a fast spinning meter is configured?
Just let me know and I'll try to come up with a pull request.
Jelle
Hallo Lars,
tolles Projekt, dass endlich mal die analoge Schnittstelle des Sensors nutzt und da drauf die Impulse des Stromzählers ausließt.
Mit der digitalen Ausgabe hatte ich genau die gleichen Probleme, dass der Schwellwert einfach nicht zu finden war.
Deine Lösung ist wohl der perfekte Weg, wenn man den alten Zähler gerne auslesen möchte. Super Umsetzung!!!
Da ich aber absolut neu in Sachen Arduino und der Microcontrollertechnik bin, habe ich etwas Schwierigkeiten den Code für meine Bedürfnisse anzupassen bzw. alle Abschnitte korrekt zu verstehen.
Auch wenn das Projekt schon etwas her ist, würde ich mich sehr freuen, wenn du mir eine Rückmeldung zu den Fragen geben kannst.
Viele Grüße
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.