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

Add 'Additional source production - today' sensor #31

Open
3 tasks done
VDRainer opened this issue Jul 24, 2023 · 35 comments
Open
3 tasks done

Add 'Additional source production - today' sensor #31

VDRainer opened this issue Jul 24, 2023 · 35 comments
Labels
enhancement New feature or request

Comments

@VDRainer
Copy link

Checklist

  • I have filled out the template to the best of my ability.
  • This only contains 1 feature request (if you have multiple feature requests, open one feature request for each feature request).
  • This issue is not a duplicate feature request of previous feature requests.

Is your feature request related to a problem? Please describe.

Enabled the 'Additional source production' sensor, but missing the 'Additional source production - today'.

Describe the solution you'd like

Add the 'Additional source production - today' sensor like the 'Solar production - today'

Describe alternatives you've considered

This could be made with the Integration - Riemann sum integral and Utility Meter in HA, but why not add it like the other 'today' senors?

Additional context

Great work btw.
I use fsantini's lib (did a few trial and error hacks to publish the values to mqtt) for years now.
Thanks for this, so much easier!

@VDRainer VDRainer added the enhancement New feature or request label Jul 24, 2023
@VDRainer

This comment was marked as off-topic.

@VDRainer
Copy link
Author

Hmm, i did a little research, and it looks like this data is missing in the python-e3dc get_db_data function.

{'autarky': 89.40635681152344, 'bat_power_in': 8575.0, 'bat_power_out': 8264.0, 'consumed_production': 56.83271408081055, 'consumption': 16104.0, 'grid_power_in': 10936.0, 'grid_power_out': 1706.0, 'solarProduction': 10252.0, 'startDate': datetime.date(2023, 7, 25), 'stateOfCharge': 84.88700103759766, 'timespan': 'DAY', 'timespanSeconds': 86400}

Found this open issue there: fsantini/python-e3dc#44

According to the RSCP tags this could be in DB_PM_0_POWER or DB_PM_1_POWER, but i have no clue how this fits together.

There's also something about these PowerMeters in issue #23.

If I can provide additional information/data, please let me know.

@torbennehmer
Copy link
Owner

@VDRainer The power meters are as far as I know for consumption like heat pumps, the sources have their own entries. To get a better picture, could you please update to 2.1 and create a diagnostics dump that you upload to https://kurzer.link/e3dcrscp ? I'm not sure if it contains everything, but it'll give me a first impression how your unit looks like?

@VDRainer
Copy link
Author

Hi @torbennehmer , thanks for looking at this.
Do you mean the 'Download diagnostics' in the Devices menu?
-> Uploaded config_entry-e3dc_rscp-issue_31.json.txt

@torbennehmer
Copy link
Owner

@VDRainer Thanks for the upload, it arrived perfectly and already gave me some insights.

Please let me push out 2.1 first, I'm just checking compatibility against current HASS (mainly the Python 3.11 change). As soon that's done, I'll skim a bit deeper through the data our your unit and the tag listings. I'm fairly sure that we can get this to work, might need some configuration UI though, not sure yet.

@VDRainer
Copy link
Author

Running 3.1.1 on HA 2023.8.0b2 without issues at the moment.
Uploaded a new dump: config_entry-e3dc_rscp-20230731_0058_issue_31.json.txt

@hmichels
Copy link

hmichels commented Oct 5, 2023

Hello!
I'm also interessed in missing "Additional source production - today" sensor
and then two new sensors for the combination (summation)

  • "Solar production" plus "Additional source production"
  • "Solar production - today" plus "Additional source production - today".
    Thanks!

@torbennehmer
Copy link
Owner

Hello! I'm also interessed in missing "Additional source production - today" sensor and then two new sensors for the combination (summation)

  • "Solar production" plus "Additional source production"
  • "Solar production - today" plus "Additional source production - today".
    Thanks!

Please use the template sensor to build combined sensors, for now I'll not add these to the integration, as it'll open the door for other combinations as well if we start here.

@torbennehmer
Copy link
Owner

@VDRainer Could you please check if the new cumulative sensors added with 3.4 serve your purpose for your additional productions? If yes, please drop me one final diagnostics dump, I'd like to deprecate the old sensor if possible and need more input for that.

@VDRainer
Copy link
Author

@torbennehmer , dump config_entry-e3dc_rscp-9d15c0ae403f5f6ebc480fee63b38ad0.json.txt uploaded.
The additional sensors are added, but it is only the total of all external production energy and it is negative.

20231021_144801

Not a big Problem, but i also need template sensors in HA.
Thanks for your effort.

@icke-pp
Copy link

icke-pp commented Jan 28, 2024

Get the same result with negative values for my additional sources. Any solution to fix this?

@torbennehmer
Copy link
Owner

@VDRainer, @icke-pp Have you tried if the automatically added powermeters (issue #23, PR #57) show the correct value? Actually, the system should detect the powermeters correctly and add them as additional sensors.

@icke-pp
Copy link

icke-pp commented Jan 29, 2024

I make a helper to convert the negative value to positive for my additional Solar inverter. It should work as workaround. I think the initial request comes from external energy usage from a heat pump and this is negative? A Solar inverter is normally a positive value ;-) but no problem. For this reason I make additional helper to add normal and additional Solar inverter to combined value.
I see in your linked PR you will add now a “today” entity? This is my next thing I want to check but will wait for your new version.

@torbennehmer
Copy link
Owner

@icke-pp Could you attach a diagnostic dump built with the current release for me to look into your data? If possible, please take it at a time when your additional power meters read values, not when they are 0 (that's important). Thanks!

@ekorn
Copy link

ekorn commented Feb 2, 2024

Same here
Screenshot from 2024-02-02 09-45-27

@VDRainer
Copy link
Author

VDRainer commented Feb 3, 2024

If possible, please take it at a time when your additional power meters read values, not when they are 0 (that's important). Thanks!

Had to wait for the weekend. 😄
20240203_125108
config_entry-e3dc_rscp-aa88e8051503fd9d51c279d6714c97d9.json

@torbennehmer
Copy link
Owner

torbennehmer commented Feb 5, 2024

@VDRainer, @ekorn, @icke-pp: Thanks for the dumps, that cleared it up.
Apparently, E3DC does not reference to your additional productions as "PM_TYPE_ADDITIONAL_PRODUCTION" (the API defines this) but just as "PM_TYPE_ADDITIONAL". This is why the current powermeter autodetection does not correctly identify this. This is actually easy to fix. Please have a moment's patience though, I'm refactoring coordinator.py right now, which makes it a bit of a mess spearating the changes. As soon as I've this ready, you'll get a fix for this.
Cheers, Torben

@torbennehmer
Copy link
Owner

@VDRainer, @ekorn, @icke-pp: I've published 3.6.0-beta.1 as a testing release. It contains the fix for PM_TYPE_ADDITIONAL powermeters. It would be great if you could give it a test run. Be aware, though, that this release contains a larger refactoring of the e3dy python interface layer. To my tests it works well, but it hasn't seen much testing yet beyond that. Please report anything as a new issue (unless it's about our powermeters).
Also, you might see another "root powermeter" listed as sensor with 3.5.3, this should not have been the case (they were duplicates). This release drops those powermeters as well. I don't know if they disappear automatically though.

Independent of all these sidenotes, I would be very grateful if all three of you could attach another diagnostics dump with 3.6.0-beta.1 or newer (if you decide to wait for the stable release) to this issue. I don't have an E3DC with additional sensors, so this information helps me a lot to get a better understanding how the units in the wild react.

@VDRainer
Copy link
Author

Hi @torbennehmer , thanks for your effort.
Here the dump with 3.6.0-beta.1
config_entry-e3dc_rscp-7c784810aa7dfe46a70d91723ba2ee57.json

@1tomtom

This comment was marked as off-topic.

@ekorn
Copy link

ekorn commented Feb 12, 2024

@1tomtom

This comment was marked as off-topic.

@icke-pp
Copy link

icke-pp commented Feb 13, 2024

If you have add the E3DC "Can-Bus Repeater" into your E3DC and connect it with your external inverter you see it automatically as "ext. Quelle" on your E3DC display. If this works you see the external "additional inverter power" we mean here in this issue. If you did not add this Can-Bus Repeater you are unable to see any external inverter power.

@icke-pp
Copy link

icke-pp commented Feb 13, 2024

@torbennehmer I'm sorry that I cannot sent you an diagnostic dump because I get an error message all the time if I try to generate it (Webseite nicht verfügbar).

@1tomtom

This comment was marked as off-topic.

@torbennehmer
Copy link
Owner

I miss the third string, thats connected via a external fronius. Any clues? Thx Tom

@1tomtom Please create an individual issue here, adding all the debugging info. Thanks!

@torbennehmer
Copy link
Owner

@icke-pp

@torbennehmer I'm sorry that I cannot sent you an diagnostic dump because I get an error message all the time if I try to generate it (Webseite nicht verfügbar).

I cannot reproduce this on my end with current 3.6 beta, I need stacktrace informations from the log here. If it is against 3.5.x or earlier, please test against 3.6, the diagnostics code has changed since then.

@torbennehmer

This comment was marked as off-topic.

@1tomtom

This comment was marked as off-topic.

torbennehmer added a commit that referenced this issue Feb 17, 2024
@torbennehmer
Copy link
Owner

torbennehmer commented Feb 17, 2024

@1tomtom

i use the python pye3dc - with the follow script and this should be give me the additional power also :

Please head for https://github.com/fsantini/python-e3dc if using the pye3dc lib directly, this project is centered around the HA integration of pye3dc. Thanks!

@torbennehmer
Copy link
Owner

@ekorn

I'm just committing a fix, I broke a case statement which affected PM autodetection. Check 3.6.0 beta 2 once it is released.

@ekorn
Copy link

ekorn commented Feb 17, 2024

image
Look way better Thank You !
config_entry-e3dc_rscp-38ca6ca3cc63e995aed26993ba653b29.json

@torbennehmer
Copy link
Owner

@icke-pp

@torbennehmer I'm sorry that I cannot sent you an diagnostic dump because I get an error message all the time if I try to generate it (Webseite nicht verfügbar).

I'm closing this issue for now, as it seems to be fixed. If the measurements are still broken for you, please reopen a new bug with a diagnostic dump. If the diag dump still fails, then, too, open a new one with the debug log attached to the issue, so that I can fix that one.

@ekorn, @VDRainer

Thanks all for your help!

@VDRainer
Copy link
Author

VDRainer commented Feb 23, 2024

@torbennehmer , but wasn't this FR not about an 'Additional source production - today' sensor? 🤔

@torbennehmer
Copy link
Owner

@VDRainer Ah yes, of course. We got so sidetrackted with these other problems. I'll pick this up these days (I'm a bit busy right now) and sort it out. You'll get taken care of if possible of course!

@torbennehmer torbennehmer reopened this Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants