Giter Site home page Giter Site logo

Comments (6)

bgmn avatar bgmn commented on June 3, 2024 1

I think you have to use ms instead of μs. They say for power-meter it could be 50-100ms.

Yes! That was it. All the documentation talks about μs and I of course thought that I have to use them too. Now I have 5ms as an internal_filter value and it works.

Thank you for you help!

from home-assistant-glow.

klaasnicolaas avatar klaasnicolaas commented on June 3, 2024

I think you have to play with the internal_filter a bit, because you get 10x as many pulses for 1 kWh there is a good chance that it doesn't count because it is so many times in a row 🤔

from home-assistant-glow.

bgmn avatar bgmn commented on June 3, 2024

I have tried it with 4 and 8 us, but it doesn't change anything. My consumption is under 1000 Watts so the led isn't blinking too fast.

Here is a portion of my log

17:26:47][D][sensor:127]: 'House - Power consumption': Sending state 960.00000 W with 0 decimals of accuracy
[17:26:47][D][sensor:127]: 'House - Total energy': Sending state 5.67330 kWh with 3 decimals of accuracy
[17:26:47][D][sensor:127]: 'House - Power consumption': Sending state 0.00000 W with 0 decimals of accuracy
[17:26:47][D][sensor:127]: 'House - Total energy': Sending state 5.67470 kWh with 3 decimals of accuracy
[17:26:47][D][sensor:127]: 'House - Power consumption': Sending state 962.56689 W with 0 decimals of accuracy
[17:26:47][D][sensor:127]: 'House - Total energy': Sending state 5.67480 kWh with 3 decimals of accuracy
[17:26:47][D][sensor:127]: 'House - Power consumption': Sending state 0.00000 W with 0 decimals of accuracy
[17:26:47][D][sensor:127]: 'House - Total energy': Sending state 5.67580 kWh with 3 decimals of accuracy
[17:26:47][D][sensor:127]: 'House - Power consumption': Sending state 962.56689 W with 0 decimals of accuracy
[17:26:47][D][sensor:127]: 'House - Total energy': Sending state 5.67710 kWh with 3 decimals of accuracy
[17:26:48][D][sensor:127]: 'House - Power consumption': Sending state 0.00000 W with 0 decimals of accuracy
[17:26:48][D][sensor:127]: 'House - Power consumption': Sending state 952.38098 W with 0 decimals of accuracy
[17:26:48][D][sensor:127]: 'House - Total energy': Sending state 5.67730 kWh with 3 decimals of accuracy
[17:26:48][D][sensor:127]: 'House - Power consumption': Sending state 0.00000 W with 0 decimals of accuracy
[17:26:48][D][sensor:127]: 'House - Total energy': Sending state 5.67830 kWh with 3 decimals of accuracy
[17:26:48][D][sensor:127]: 'House - Total energy': Sending state 5.67850 kWh with 3 decimals of accuracy
[17:26:48][D][sensor:127]: 'House - Total energy': Sending state 5.67990 kWh with 3 decimals of accuracy
[17:26:49][D][sensor:127]: 'House - Power consumption': Sending state 962.56689 W with 0 decimals of accuracy
[17:26:49][D][sensor:127]: 'House - Total energy': Sending state 5.68080 kWh with 3 decimals of accuracy
[17:26:49][D][sensor:127]: 'House - Power consumption': Sending state 0.00000 W with 0 decimals of accuracy
[17:26:49][D][sensor:127]: 'House - Power consumption': Sending state 954.90723 W with 0 decimals of accuracy
[17:26:49][D][sensor:127]: 'House - Total energy': Sending state 5.68090 kWh with 3 decimals of accuracy
[17:26:49][D][sensor:127]: 'House - Power consumption': Sending state 0.00000 W with 0 decimals of accuracy
[17:26:49][D][sensor:127]: 'House - Total energy': Sending state 5.68200 kWh with 3 decimals of accuracy
[17:26:49][D][sensor:127]: 'House - Power consumption': Sending state 960.00000 W with 0 decimals of accuracy
[17:26:49][D][sensor:127]: 'House - Total energy': Sending state 5.68250 kWh with 3 decimals of accuracy
[17:26:49][D][sensor:127]: 'House - Power consumption': Sending state 0.00000 W with 0 decimals of accuracy
[17:26:49][D][sensor:127]: 'House - Total energy': Sending state 5.68330 kWh with 3 decimals of accuracy
[17:26:50][D][sensor:127]: 'House - Total energy': Sending state 5.68440 kWh with 3 decimals of accuracy
[17:26:51][D][sensor:127]: 'House - Total energy': Sending state 5.68480 kWh with 3 decimals of accuracy
[17:26:51][D][sensor:127]: 'House - Total energy': Sending state 5.68590 kWh with 3 decimals of accuracy
[17:26:51][D][sensor:127]: 'House - Power consumption': Sending state 960.00000 W with 0 decimals of accuracy
[17:26:51][D][sensor:127]: 'House - Total energy': Sending state 5.68600 kWh with 3 decimals of accuracy

from home-assistant-glow.

bgmn avatar bgmn commented on June 3, 2024

I think that this is not the case. If I calculated correctly my meter will flash 20 000 times per hour, if I'm using 20 kWh. That means 55,56 pulses per second. So 1 second equals 1 000 000 microseconds. One pulse will have time to rise and fall for 18 000 microseconds.

I tried also with pulse_counter but it calculates usage and consumption in certain time period. Pulse meter calculates it every time when there is a pulse. As you can see from my logs the total energy rises every time it is seen on the logs but for some reason consumption is always every second time zero.

The timeout for zero pulses per minute is 5 minutes so this can't be the case.

Is anyone else able to reproduce this error? How can I debug this

from home-assistant-glow.

bgmn avatar bgmn commented on June 3, 2024

Still thinking about this. I looked at the logs and there are sometimes huge consumption numbers

It baffles me that the total energy seems to accumulate correctly even though consumption is zero or 360 000 W. Could there be some kind of error with the pulse_meter library or do I have defective esp32?

[23:02:34][D][sensor:127]: 'House - Power consumption': Sending state 853.08057 W with 0 decimals of accuracy
[23:02:34][D][sensor:127]: 'House - Total energy': Sending state 0.07910 kWh with 3 decimals of accuracy
[23:02:34][D][sensor:127]: 'House - Power consumption': Sending state 360000.00000 W with 0 decimals of accuracy
[23:02:34][D][sensor:127]: 'House - Total energy': Sending state 0.07920 kWh with 3 decimals of accuracy
[23:02:35][D][sensor:127]: 'House - Power consumption': Sending state 0.00000 W with 0 decimals of accuracy
[23:02:35][D][sensor:127]: 'House - Total energy': Sending state 0.07980 kWh with 3 decimals of accuracy

from home-assistant-glow.

LarsNorgaard avatar LarsNorgaard commented on June 3, 2024

I think you have to use ms instead of μs. They say for power-meter it could be 50-100ms.

from home-assistant-glow.

Related Issues (20)

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.