-
-
Notifications
You must be signed in to change notification settings - Fork 170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Status LED (repeater) misses some blinks #135
Comments
Did setup my glow today to, my "repeater" misses some blinks to. sensor green led catches the led blinks of the tarrif meter |
Since you are apparently using an ESP8266, I'd suggest trying to comment out the web server definition. If that turns out to be the problem, and you absolutely need the web server, then you should maybe consider upgrading to an ESP32 for more resources. Let us know if that helps! |
Using esp32
ti 22. helmik. 2022 klo 17.01 Kimble8650 ***@***.***>
kirjoitti:
… Since you are apparently using an ESP8266, I'd suggest trying to comment
out the web server definition.
To my understanding, the web server is very resource intensive especially
for the ESP8266, so it might be, that the repeater is missing some blinks
because it's busy running the web server.
Refer to the ESPHome documentation:
https://esphome.io/components/web_server.html
That's just a hunch though.
If that turns out to be the problem, and you absolutely need the web
server, then you should maybe consider upgrading to an ESP32 for more
resources.
Let us know if that helps!
—
Reply to this email directly, view it on GitHub
<#135 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AO47AHO2DB3AA6WV5EECU4LU4OQOFANCNFSM5OR6JFJQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you commented.Message ID:
***@***.***>
|
Well that settles that then :D |
If you are REALLY BORED ... I put a video here with it showing missing blinks at 1:22, 1:25, 2:10, 3:49, 5:23, 5:28, 6:48, 6:56 and also a very strange blink from the repeater at 3:07 with no blink from the power meter. I have no idea how that happened unless it picked up some light while i had the door open on the meter box. Am a bit stumped there. https://www.youtube.com/watch?v=ewfSQRiXS2A I removed the web server but no difference. |
I've noticed the same thing. My pulse rate is 1600 and it missed 1 in every 10-20 pulses. Yet to find a solution. |
Hi, I had the same problem, but everything started working good, when I change "safe mode:" to "false" in the OTA section. I don't know why, but it works. Maybe it will help someone? |
@andrzejs1972 I don't think there is any connection with that, it is recommended to always use |
I tried safe_mode = false and still seeing missed blinks once every minute or so. |
I am experiencing the same issue on ESP32. The is no apparent pattern, sometimes every 10th blink is missed, sometimes 3 in a row. Photodiode is flashing DO led without missing a single flash on power meter, so that should eliminate problem with photodiode modul. |
i had this problem, i'm currently testing my setup (for 2days) without led repeater because it uses delay function causing the esp to skip pulses and for my 1000ims/kWh i use internal_filter of 60ms, for yous 3200ims you might consider even lower number. |
Anyone got some good pointers? My energy meter uses 10.000 imp/kwh and from what I can see in HA, it reports less then used. On the charger for my car, I got a separate Schneider PowerTag that I know is reporting accurate. I've set up the Energy Dashboard in HA so it uses the PowerTag readings as Energy Export so it subtract the usage from the total usage (I got free charging at home, so I don't pay pr kWh) The only thing I have changed from the standard settings is disabled the web server and the repeater LED. Would it help to set the internal_filter ? or is the diode simply not fast enough when pulling 10 kW ? :-) ** UPDATE ** Just pulled the data from my energy company. When I compare the data throughout the day, it's only off when the charger it running, so I guess that the diode somehow can't register the fast blinking diode on my energy meter |
That's a lot of fast impulses, i don't know if you can record them all and publish them by mqtt + your HA database will grow very fast (consider to filter out the power consumption in your HA records purge settings or even not using power at all, only energy). |
There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues. |
I'm certainly experiencing the same issues with the same equipment and components (most importantly the ESP32) described in this project. What should we expect in terms of performance when it comes to repeating/reporting to Home Assistant with this setup? |
If the diode does register every pulse correctly then I have the idea that you are using some filters (internal_filter) so that certain pulses are omitted. |
How can I figure out if the diode is registering every pulse? I'm still having the same issue months on, tried lots of different things with no luck |
try pulse mode whit 3mS filter. |
On the board of the photodiode there is a green LED which lights up every time it detects a pulse. At the same time, the ESP32 should also have an LED, which will only flash when the ESP32 has processed the signal. So I think you could debug a bit whether the problem is purely the measurement at the photodiode or the processing on the ESP32, for example because you have set an |
I've internal_filter commented out in my yaml, I'll have to try diagnose the issue with the LEDs like you've explained |
With 10.000 blink/kwh, im using this settings and are within +/- 50-100w when using 10 kWh. https://github.com/smulle48/home-assistant-glow/blob/main/home_assistant_glow.yaml Another thing I have done, is that I have done the exact opposite with the sensor, as the guide says. I've turned it all way down (less sensitive) and then gradually turned it up until it starts registering. Then I turned it a bit more up. After that, I have never missed blinks or too many blinks |
I currently use the default values of https://github.com/klaasnicolaas/home-assistant-glow/blob/main/home_assistant_glow.yaml except for some obvious things like AP and password settings. The contents of the yaml has The diode doesn't skip a beat, but the ESP32 does (in so far I can tell from the LED repeat), and it starts at about 1500W power draw and gets much worse the higher the load/more power is drawn. (@smulle48 I can't review your yaml-file, the repo doesn't seem to be accesible/exist) |
My bad. Should be visible now 😃 |
I see that you use more filters from an open pull request, would that possibly make a difference in the result? |
In my case they made a huge difference 😃 |
Is there anything specific I should test out first of the yaml @smulle48 links to? I'm too unfamiliar with the filtering and I'd rather take an approach of changing one thing at a time and test it out, but if there's anyone who could say "well, [this filter setting] would be my first guess" it'd help me out a lot. Thanks. |
If your readings are "spiking" the EDGE filter does a huge difference. If you got access to data from your electric company, you can try to set the ms to an low value and let it be for a day (or until you can get the readings) and then compare it. Then gradually turn it up until you hit the sweet spot :-) In my case, 12ms was enough for 10.000 imp so yours are probably somewhere around 3 times higher |
I don't have any issues with spiking readings. My max power consumption reaches somewhere up to 4000-5000W, but those are very rare. I take it the EDGE filter seem like it would not benefit me in my case. It's also stated in https://esphome.io/components/sensor/pulse_meter.html that EDGE is used by default. I adjusted the I can only conclude that the missed pulses stem from the ESP32 doing something else that make it skip pulses. When I observe the pulses on the diode I get something along 5 pulses a second during my higher/top power draws. And that's more in line with 100-500ms, not 10ms when it comes to filtering. Filters so far hasn't affected my situation. If anyone has other tips on what other tweaks can be done I'm all ears. What I have yet to try is
I'll get back with results on these. |
The power draw I have during these tests are around one pulse each second. Switching off the web server made no difference. The repeater skips pulses when comparing to the diode. Switching off the repeater LED made no difference. The reported values to Home Assistant reflects skipped values, e.g. by stating "2 seconds ago", "3 seconds ago" in between "Now". I do note a curious thing in the web server log on the ESP.
Could there be an issue with the "House - Power Consumption" part of this setup? |
You can try to change the pulse_pin to GPIO26. When I used GPIO12 I also got skipped and sometimes too many blinks. The ESP32 got touch input and that somehow interfered on my setup. You can even make it "sense" a blink just by touching the board 🤣 I've also completely disabled the repeater led as I don't got the led installed. The sensor board already got its own led I can use instead. You can also try to use the throttle_average: 1s and filter_out: NaN (see in my config) to get a more consistent reading on the House - Power Consumption. |
Btw. Your pulse length is about 220ms at 5kw load, so you should use a number around the half of that for the filter, not 10ms |
I'm currently using GPIO13 (If I remember correctly, GPIO12 either prevented the ESP from booting, or it registered pulses like you describe by touching it, or both) and it's been pretty solid, but I haven't investigated if 13 does something else suboptimal for measuring so I'll give 26 a go as well, just to rule out any incompatibilities there.
I would probably disable it myself if I could trust that all the measurements are correct, but that would mean the pulses from the diode and the registered pulses would have to be in sync, which they currently are not.
I'll test it out and see what I get. |
So far, none of the changes seem to make a difference. The modifications to So far, I haven't been able to improve my "House - Power Consumption" reporting/repeating. I just can't seem to figure out why that specific piece of these measurements don't work as intended, but the "House - Total Energy" (and "House - Daily Energy") catches every single beat or at least is much more on point with the diode pulses... As soon as I go above 1000-1500W power draw, the Power Consumption report/repeat is getting worse in terms synchronizing with the diode detection. When the draw is less than 1000 everything syncs up just fine. |
I'm thinking, is this now (maybe it always was) a question for the ESPHome project rather than the Home Assistant Glow one? |
After running into the exact same thing (status led flashes "disappearing" at higher loads) I think I found the problem, there are a couple of things to consider. First a small summary of things people have commented or tested on before:
Now, onto the real problem. The way the
The function therefore has to decide when to publish a new value, and for some reason it does not use the same logic as it did to determine a pulse had happened, but it simply deduplicates the millisecond-rounded value of the calculated recorded pulse-width times.
This means that if 2 consecutive valid intervals have the same duration (in milliseconds), something which gets more and more likely at higher loads (shorter intervals), the second value gets ignored. This deduplication approach has some side effects:
In my opinion (but this is my first time opening up esphome) deduplication has no advantages and this can be considered a bug in the Luckily, this can be worked around without needing to install a development version of You should then have:
by copying
Don't forget to add
to your yaml! To make sure it is really using this code just add some random word somewhere in the With this change my status LED flashes in perfect sync with the power meter itself up to 13 kW, whereas before it would start dropping flashes at only a few kW. As a last thought, the problem therefore also doesn't seem to related to the load on the Hope this helps someone! |
@Dennis4b will definitely try this asap and report back 👍 |
After clarification from an esphome developer in de mentioned report:
Therefore, the much simpler solution to fix the LED blinking is to blink the LED through the However, the |
Alright - just adding what I found. It seems to underpin Dennis4Bs post (I'm not apt enough to understand al the finer details, so I might have gotten it all wrong). I've only tested at low consumption, with pulses every 7-8 sec. (1000 imp/kWh)
Observe the log at 19.57.19 - this is a missed pulse. The other two instances at 19.57.13 and 19.57.25 weren't missed (don't pay attention to the Daily value it's messed up - initial testing drove some mad numbers...). So something is captured (at least in my case). And the calculation of consumption is also correct, if the pulse was truly missed, the consumption at 19.57.25 would be lower, but it stays consistent at about 620 watts. But I am missing a consumption datapoint - a datapoint with the same value as the previous of course. I guess your use case determines if that's an annoyance. Right now Total energy is what I'm focused on. |
Hi I am using a D1 MINI with a basic red LED. I noticed that the LED doesn't flash everytime there is a pulse detected on the photodiode. It only happens about once every minute or less. I have a powerpal sensor reading from the status LED also.
Everything else is working perfectly. I have also had to enable the internal_filter to prevent spikes. My pulse rate is 3200.
Here on the graff you can see the powerpal reading (which is done every minute from the online API) and the HA Glow reading are slightly out some/most of the time but not by much. Anyone got any clues on what is causing this ?
Here is my ESPHome config. I have removed the status section as I only want the LED to be used as a powerpal repeater.
The text was updated successfully, but these errors were encountered: