Skip to content
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

Update to pulse multiplier for accurate power data #2

Open
wants to merge 1 commit into
base: emerald_ble
Choose a base branch
from

Conversation

miragebird
Copy link

@miragebird miragebird commented Oct 1, 2022

Updated average power formula and included a conversion variable for hrs to s.

What does this implement/fix?

This fix uses a new pulse multiplier formula to estimate power output, this results in a x4 increase in power output, but will be colser to the actual power output with an accuracy +/- 120 W (assuming a 1000 pulses/kWh). Ideally if the timestamps were known for each pulse (or the delta) we could increase this accuracy further. Pretty basic code change so hopefully I didn't break anything. Tested locally, but please verify on your own device using:

external_components:
  - source: github://miragebird/esphome@emerald_ble_powerfix

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Other

Related issue or feature (if applicable): fixes WeekendWarrior1/emerald_electricity_advisor/issues/4

Test Environment

  • ESP32
  • ESP32 IDF
  • ESP8266

Example entry for config.yaml:

external_components:
  - source: github://miragebird/esphome@emerald_ble_powerfix

Checklist:

  • The code change is tested and works locally.
  • Tests have been added to verify that the new code works (under tests/ folder).

Updated average power formula and included a conversion variable for hrs to s.
@carryonrewardless
Copy link

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants