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

Fix for senec update #1

Draft
wants to merge 3 commits into
base: fix-for-senec-update
Choose a base branch
from

Conversation

KorbinianP
Copy link

@KorbinianP KorbinianP commented Sep 15, 2023

Implement connection to mein-senec.de to fetch the live* values (statistic).
The implementation ain't ready yet to merge, but is at least alive.

Known Problems:

  • init doesn't work, I need to disable and enable the binding once
  • too much logging, including sensitive data like the token
  • no handling implemented if the token is outdated
  • mostly untested
  • instead of lifetime values I assign actual values
  • for accessing mein-senec.de I would propose a slower refresh rate than for the local device. Config param is available but not implemented.

@KorbinianP
Copy link
Author

@WernerSlabon
I would like to coninue the discussion of the live values from mein-senec.de here. Could you verify my algorithm?
Code: https://github.com/KorbinianP/senec-api-parser

It will read the statistic api endpoint per year and aggregate them. Do the values match your expectation?

Thank you!
Cheers

@WernerSlabon
Copy link

@KorbinianP
Sorry, I was out of home on the weekend and couldn't check your code (or the results).
I executed your script against my SENEC devices and YES, these values look very reasonable compared with the lastest values.
But "live wallbox1" value is missing, I think this value is retrieve on another endpoint.

In the original thread there was a discussion, if querying the values from the SENEC cloud should be added to the SENEC binding or not.

  • I think/hope, that the total values return in future firmware.
  • So, it may be a practical way to implement
    a) another binding that can be used to update the existing items (I don't know how much effort this will be!)
    b) event use a periodic rule/script that queries the values and updates the existing items (sounds "simlier")

Bbackground:
In my openhab setup (with two SENECs) I'm using the total values to calculate the daily/weekly/montly/yearly values.
I like to see those values in the OpenHAB IOS app and also use them to create a day-based graphic showing the daily production/consumption.
Both is possible in the SENEC IOS app but the OpenHAB app is much faster (and the all-in-one solution). Especially switching between two SENECs in the SENEC app is aweful.

Btw:
Solution a) may be good, if controlling the SENEC system would be possible, too. I read, that this is possible using the cloud API.
Especially changing settings regarding the wallbox charging mode is a pain in the SENEC app, because you never know, which device is selected ...
And the most butiful thing would be, if changes to the device (e.g. the wallbox charging mode) would be applied to the cloud AND (immediatly) locally. Because it's also a pain to wait 5-10 minutes until the SENEC device reacts on cloud changes. In most times I forget to verify, if the settings are applied (and on the correct device)...

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