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

Expanded option72 for Shelly 3EM and other devices to only count import energy in today, yesterday and total. #22578

Closed
wants to merge 1 commit into from

Conversation

jeroenst
Copy link
Contributor

@jeroenst jeroenst commented Dec 2, 2024

Description:

I had an issue that energy today, energy yesterday and energy total where counting down when my solar panels where delivering more energy than I was using.

For me this is unwanted behaviour because I have to know import and export energy separately for calculating the energy costs. I read that SetOption72 does this for some devices but it didnt't work for Shelly 3EM.

This code is a minor change so SetOption72 will also only count import energy llike mentioned in #18446 (comment) and code

Settings->energy_kWhtotal_time = (!Energy->kWhtoday_offset[i]) ? LocalTime() : Midnight();

I don't know if this is the correct way to do this change, it works fine for me, but if it has to be another way, please change it or guide me what to change.

Related issue (if applicable): fixes #22565

Checklist:

  • The pull request is done against the latest development branch
  • Only relevant files were touched
  • Only one feature/fix was added per PR and the code change compiles without warnings
  • The code change is tested and works with Tasmota core ESP8266 V.2.7.8
  • The code change is tested and works with Tasmota core ESP32 V.3.1.0.241117
  • I accept the CLA.

NOTE: The code change must pass CI tests. Your PR cannot be merged unless tests pass

@arendst
Copy link
Owner

arendst commented Dec 2, 2024

This change breaks current functionality of SO72 on devices using EnergyUpdateTotal().

How does your current GUI look like with this change?

@jeroenst
Copy link
Contributor Author

jeroenst commented Dec 2, 2024

The gui seems fine.

Screenshot_20241202_173443_Chrome

@jeroenst
Copy link
Contributor Author

jeroenst commented Dec 2, 2024

With defines in place it only works for shelly 3EM or other ADE7880 Devices, I don't know if that is a good solution?

Only count import energy in today, yesterday and total when enabling option72 when using Shelly 3EM (ADE7880)
@arendst
Copy link
Owner

arendst commented Dec 3, 2024

No. With defines it's still not OK.

I'll have a look. First trying to understand what you want to achieve and then find a solution.

@arendst
Copy link
Owner

arendst commented Dec 3, 2024

Got it.

Will add a new SO162 to disable export energy adding to energy today. Hold on....

@arendst arendst closed this Dec 3, 2024
@jeroenst
Copy link
Contributor Author

jeroenst commented Dec 3, 2024

Thank you very much!

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