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

Prometheus Units for Sonoff S31 are Incorrect for Daily and Total Power #19538

Closed
9 of 14 tasks
subtlepseudonym opened this issue Sep 17, 2023 · 3 comments
Closed
9 of 14 tasks
Labels
Add to Docs Add info to Docs

Comments

@subtlepseudonym
Copy link

PROBLEM DESCRIPTION

A clear and concise description of what the problem is.
The prometheus metrics energy_power_kilowatts_daily and energy_power_kilowatts_total report the number of kilowatt hours on the Sonoff S31 rather than kilowatts, as implied by the metric name.

REQUESTED INFORMATION

Make sure your have performed every step and checked the applicable boxes before submitting your issue. Thank you!

  • Read the Contributing Guide and Policy and the Code of Conduct
  • Searched the problem in issues
  • Searched the problem in discussions
  • Searched the problem in the docs
  • Searched the problem in the chat
  • Device used (e.g., Sonoff Basic): Sonoff S31
  • Tasmota binary firmware version number used: 12.1.1
    • Pre-compiled
    • Self-compiled
  • Flashing tools used: Tasmotizer
  • Provide the output of command: Backlog Template; Module; GPIO 255:
  Configuration output here:
19:57:02.435 RSL: RESULT = {"NAME":"Generic","GPIO":[1,1,1,1,1,1,1,1,1,1,1,1,1,1],"FLAG":0,"BASE":18}
19:57:02.659 RSL: RESULT = {"Module":{"41":"Sonoff S31"}}
19:57:02.875 RSL: RESULT = {"GPIO0":{"32":"Button1"},"GPIO1":{"3072":"CSE7766 Tx"},"GPIO2":{"0":"None"},"GPIO3":{"3104":"CSE7766 Rx"},"GPIO4":{"0":"None"},"GPIO5":{"0":"None"},"GPIO9":{"0":"None"},"GPIO10":{"0":"None"},"GPIO12":{"224":"Relay1"},"GPIO13":{"320":"Led_i1"},"GPIO14":{"0":"None"},"GPIO15":{"0":"None"},"GPIO16":{"0":"None"},"GPIO17":{"0":"None"}}
  • If using rules, provide the output of this command: Backlog Rule1; Rule2; Rule3:
  Rules output here:

  • Provide the output of this command: Status 0:
 
  • Set weblog to 4 and then, when you experience your issue, provide the output of the Console log:
  Console output here:

TO REPRODUCE

Steps to reproduce the behavior:
Enable prometheus metrics during compilation and visit the /metrics endpoint.

EXPECTED BEHAVIOUR

A clear and concise description of what you expected to happen.
The metric names should match the units of the reported values. These metrics, on the S31, should be named energy_power_kilowatt_hours_daily and energy_power_kilowatt_hours_total.

I haven't looked into any other power monitoring devices that report these metrics. Assuming that other devices are reporting kilowatts rather than kilowatt hours, the best approach is likely to add two new metrics with the proposed names.

SCREENSHOTS

If applicable, add screenshots to help explain your problem.

ADDITIONAL CONTEXT

Add any other context about the problem here.

(Please, remember to close the issue when the problem has been addressed)

@subtlepseudonym
Copy link
Author

This issue can be fixed on the prometheus side with metric relabeling, so this issue is a relatively high effort change for low reward, but I figured it was worth documenting.

@Jason2866 Jason2866 added the Add to Docs Add info to Docs label Sep 24, 2023
@Jason2866
Copy link
Collaborator

@subtlepseudonym Would you add to the Documentation? It is Open Source too. Just klick the sheet with the pencil in the upper right corner.

@subtlepseudonym
Copy link
Author

Can do -- tasmota/docs#1283

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

No branches or pull requests

2 participants