GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together. Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community. Already on GitHub? Sign in to your account. I own 8 of these plugs, and the issue is the same for all of them if I use the same YAML belowso it's not an issue with an individual plug.

For now this is usable for rough power usage monitoring, but I don't have a huge amount of confidence in the values and would love to try and improve ESPHome to have proper support for these devices! The HLW integration is basically a glorified pulse counter. One of them can't remember which constantly pulses the output to encode the power.

The other output is switched between voltage and current measuring mode with the SEL pin. So esphome pretty much just reports all values the HLW reports straight to the user with only very basic unit conversions involved.

I believe here lies the issue. You need to measure these values to get correct results. The two values are not linear so if you tweak one of them to fit for example the voltage reading, you will get inaccurate results for other measurements. Also, their correlation is not linear which again means you need to measure the real values. However, for some reason the Current value is still off, and in fact doesn't even make sense given that the Power and Voltage values are correct.

However, you also need to fit for current. Looks like it's only changes the multiplies. Thanks for the prompt and informative response OttoWintermuch appreciated! I'll do some more reading. Then I'll see if I can identify the correct resistors on the board to measure the values with a multimeter, both on my Sonoff Pow and on the NX-SM board.

My test setup is using a lamp with LED bulb which draws a pretty consistent 0. How did you identify which resistor s on the PCB are relevant to measure? Even on the Sonoff Pow which has a much more spaced-out board, I'm not really sure what to look for I actually can't even find the HLW chip on this!

Re first image: Are you measuring the current in series? I don't know how your device is configured but it looks a bit like you're measuring the current in parallel though that probably wouldn't give such low values. I did not. I just used values I found on the internet. From the spacing it looks a lot like the one seen on the last picture in the top right. Yeah, the current was indeed measured in series - I was just abusing the mid-left "earth" terminals on the Pow to put my multimeter in series, hence the confusing photo.

Ah, that makes sense - well hey, good to know the component mostly works with an actual Pow! Ahhh, I was looking for a chip which didn't exist! I'll do some more research into that chip and measure the resistors around it.Each pulse counter unit has a bit signed counter register and two channels that can be configured to either increment or decrement the counter.

Each channel has a signal input that accepts signal edges to be detected, as well as a control input that can be used to enable or disable the signal input. The inputs have optional filters that can be used to discard unwanted glitches in the signal.

Operating the Counter - provides information on control functions to pause, measure and clear the counter. Filtering Pulses - describes options to filtering pulses and the counter control signals. Using Interrupts - presents how to trigger interrupts on specific states of the counter. This applies to counter operation with or without a filer. The PCNT unit features filters on each of the pulse and control inputs, adding the option to ignore short glitches in the signals.

The event happens on the pulse counter reaching specific values:. Note Each Pulse counter unit has five watch point events that share the same interrupt.

All enabled events share the same interrupt one interrupt per pulse counter unit. The handler will be attached to the same CPU core that this function is running on. If non-NULL, a handle for the interrupt will be returned here.

esphome pulse counter

Any pulses lasting shorter than this will be ignored when the filter is enabled. This limit is smaller compared to a global PCNT interrupt handler due to the additional level of indirection. Note We can manage different interrupt service for each unit. Note Configuration covers two actions, one for high, and one for low level on the control input.

Note Configuration covers two actions, one for positive, and one for negative edge on the pulse input. Provide feedback about this document. GPIO numbers of the pulse input and the pulse gate input.Create your free GitHub account today to subscribe to this repository for new releases and build software alongside 50 million developers.

Quadric surfaces examples

We use optional third-party analytics cookies to understand how you use GitHub. Learn more. You can always update your selection by clicking Cookie Preferences at the bottom of the page. For more information, see our Privacy Statement. We use essential cookies to perform essential website functions, e.

We use analytics cookies to understand how you use our websites so we can make them better, e. Skip to content.

Accelerometer library for proteus

Dismiss Be notified of new releases Create your free GitHub account today to subscribe to this repository for new releases and build software alongside 50 million developers. Sign up. Releases Tags.

Billus – Tech Blog

Latest release. This commit was created on GitHub. Choose a tag to compare. Search for a tag. Assets 2. Source code zip. Source code tar. This commit was signed with a verified signature.

OttoWinter Otto Winter. Previous Next. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Accept Reject. Essential cookies We use essential cookies to perform essential website functions, e.

Analytics cookies We use analytics cookies to understand how you use our websites so we can make them better, e. Save preferences.Esphome Pulse Counter. As this extension is under development for changes of these options to take effect you will have to reload VSCode window. The CD is a binary counter that has 10 output pins. To take control on volume we need to measure, water is essential to every thing, here this article helps you to built water flow meter to measure the.

The DHT11 temperature and humidity sensor is a nice little sensor that provides digital temperature and humidity readings. For more information on what threats ProtonMail is designed to counter, read our threat model. This is for example useful if you want to apply some average over the last few values. Testing before connecting to high voltage device. Looking For Great Deals?. This is an output component and will not visible from the frontend.

You might have to enter the IP address. For the given traces: PWM channel 1.

ESPEasy Command Reference

Esp32 pulse sensor Esp32 pulse sensor. For whole home energy consumption I'm using an ESP32 with a photodiode counting the pulses from my electricity meter. Esp tutorial. Swoosh Mihu liked Automated Hydroponic System. In total there are users online :: 6 registered, 0 hidden and guests based on users active over the past 5 minutes Most users ever online was on Sun Aug 30, pm.

A site about programming, IoT and technology.

esphome pulse counter

Please read the post by Nick Gammon at the top of this Forum about the proper way to post code using code tags. The compile operation takes a few minutes as ESPhome assembles code libraries and creates a firmware '. See full list on marketplace. Description: Pulse width didn't work for some reason - Idea was to get better accuracy over calculating via pulse width, but didn't work. Stm32 stepper motor code. However, the pulse counter reported 90 pulses instead. This is an interesting piece of tech that gets a fair amount of usage.

Generic; public partial class List : System. Although the document covers technical subject matter, we wrote it to be as accessible as possible to the general audience. One of those plugs became a dedicated device to monitoring the power consumption of the washing machine. The sun, light bulbs, or any anything with heat is very bright in the IR spectrum.

Kenya imports

Esp With Ir Remote. But one heavily used technology is often forgotten: Infrared. Control GPIOs. I'll explain how it works, show some features and share an Arduino project example with code and schematics that you can take and apply to your own projects. Pms github Pms github. There are a lot of filters that sensors support.GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account. We use optional third-party analytics cookies to understand how you use GitHub. Learn more. You can always update your selection by clicking Cookie Preferences at the bottom of the page.

For more information, see our Privacy Statement. We use essential cookies to perform essential website functions, e.

esphome pulse counter

We use analytics cookies to understand how you use our websites so we can make them better, e. Skip to content. Dismiss Join GitHub today GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together. Sign up. New issue. Jump to bottom. Conversation 1 Commits 2 Checks 0 Files changed. Copy link Quote reply. Fixes, changes and adjustments for the current release should be created against current.

This commit was created on GitHub. Add information about available pulse counter channels. View changes. Hide details View details glmnet merged commit 0a3dfca into esphome : current May 24, 2 checks passed. Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in. Linked issues. Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code.

Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Applying suggestions on deleted lines is not supported.

Bird farms in coimbatore

You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. You signed in with another tab or window. Reload to refresh your session.Ask questions Pulse counter debounce.

Otherwise the issue may be closed without a comment. Description of problem: The pulse counter component seems to ignore sensor filter 'debounce'. I've tried to set debounce up to 5 seconds, however even a few short "pulses" or even a single pulse far shorter than 5 seconds results in many pulses registred.

I've tried two ESPs. Answer questions blakkdukk. With an update interval of 60s, I expected touching the signal pin quickly 3 times would result in a pulse counter value of 3 pulses per minute. However, the pulse counter reported 90 pulses instead. I thought that the high value was caused by a 'switch bounce' and tried the 'debounce' filter to eliminate this. Simply saying "X gives bug" or "X gives error" is not enough! Read through the template carefully and fill out all missing details.

Answer questions blakkdukk Thank you for the rapid response! I might have misunderstood the filters as well as the component. Compiler segmentation fault hot 1. ESP32 stops tracking Xiaomi Mijia hot 1. Time based cover not restore positions after shutdown hot 1. Github User Rank List.GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community. Already on GitHub? Sign in to your account. When configuring a pulse counter or the hlw which seems to use a pulsecounter internally in combination with an integration sensor, the reported value sometimes reaches inf infinate or -inf.

Then later I had the same problem with the hlw AFAIK, the most common cause for a float to become inf is a division by zero. As the Inegration does not do any devisions that could be 0, I think the problem might be in the pulsecounter, specifically line Is this maybe related to stv update interval is 0, causing home assistant api issues. I suspect it is caused by the 'restore: true' option of the integration sensor.

I found the same problem with INF values when I crated a custom component which I first copy from the integration sensor and made some changes.

Tasmota vs ESPhome: Who wins? (DIY Sensors, ESP32, Deep-Sleep, etc.)

I found that saving a value to the preferences and re-loading it sometimes resulted in INF. In my custom component I have not had the problem after declaring the field as a float. Maybe for the Integraton sensor it should stay a double and the fix would be to declare the preference as a double as well. I am not sure why the field is declared as a double because the sensor will always just result in a float anyway. I would like to use doubles, but it looks like the sensor framework does not support them.

We use optional third-party analytics cookies to understand how you use GitHub. Learn more. You can always update your selection by clicking Cookie Preferences at the bottom of the page. For more information, see our Privacy Statement. We use essential cookies to perform essential website functions, e. We use analytics cookies to understand how you use our websites so we can make them better, e. Skip to content. Dismiss Join GitHub today GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.

Sign up. New issue. Jump to bottom. Copy link Quote reply. FrankBakkerNl mentioned this issue Jul 22, FrankBakkerNl closed this Jul 24,