Hi @Mikael_Bygren
Sorry for the issues. Can you please try again.
The flow is for now, that the app will pull state from your batterie and at that point will resolve the ip of your installation.
This given, a possible issue can occur if you use flows before state is pulled. After a “while”, the link should be resolved and connection should be OK.
This works for you right?
https://find-my.sonnen-batterie.com/find
Please try it out - let me know if the link above does not work.
Please let me know if it still bugs.
Cheers, @Kim_Kokholm for fast reply
will check directly as I get home from office today.
The url reply is this from my iphone now, might be expected as I am not connected to my home network, only internet.
Hey,
@Kim_Kokholm Tested, but still same error in homey app after update.
Testing the url link i get forbidden at home as well… I think the correct path is https://find-my.sonnen-batterie.com/
That path gives me this picture.
Run a diagnostic report in homey
80c06a46-6192-459d-bce5-c1f8e6f40704
Hmmmm
I use this:
https://find-my.sonnen-batterie.com/find
“https://find-my.sonnen-batterie.com/find” - this is the url you should use.
Are your sonnen batterie on the same network as your homey/network?
That might be it.
My homey is on another subnet then then batt.
I will see if I can change this. Thanks for you brain 
Hey, both the Homey and Sonnen is now on same subnet, i can browse to it on the new IP. I removed it from Homey and readded. But sad to say still the exact same issue, I refreshed the API token as well but no luck.
I can see al statuses and I get graph data etc, just that I cant send any setting/update to the batt.
I tested the batt in both fully manual, and time of use setting.
I still get the same reply on the urls provided
Can you please share the output of the url - maybe on me. I want to make sure the output is correct.
Also send diagnostics report, remember to put your name in it.
Hi all, new version is in the verification process.
I did find an issue, as @Mikael_Bygren addressed. MY BAD!
Refer to the new (test) version here:
I also added, for those of you who does not want “auto-discovery” of ip-address when changes:
Default is YES. If you do not want to use “find-my-sonnen” to recover after ip-changes - set this to NO and put in a well-formatted ip-address.
1 Like
@Kim_Kokholm Big thanks, tested by adding the IP, and it is working great now. The app gives me exactly what I need. Really good, any fenomenal support.
Hi Kim,
Thanks for the update with auto detection of ip.
But since, I’ve been forced to restart the app three times since in the morning, the flows stop sending. Making the reset time of use doesn’t work.
After restarting the app - all works directly.
Hi,
the daily aggregates are computed by sampling. Basically take some current energy value that was read by the API call and assume it’s constant between the last period of time (usually ~30sec depending on how often you configured the app to refresh). Shorter update cycles should get more precise values. So it’s not perfect, but a pretty good approximation getting close to what I assume the official Sonnen app is doing, too.
var totalEnergyDailyResult_Wh =
currentUpdate.getDay() !== lastUpdate.getDay() ? 0 : totalEnergyDaily_Wh; // reset daily total at local midnight
var sampleIntervalMillis = currentUpdate.getTime() - lastUpdate.getTime(); // should be ~30000ms resp. polling frequency
var sampleEnergy_Wh =
currentPower_W * (sampleIntervalMillis / 60 / 60 / 1000); // Wh
totalEnergyDailyResult_Wh += sampleEnergy_Wh;
HTH, mech78
P.S. I’ve not seen anything in the Sonnen API v2 that looks like readily available aggregates. If the Sonnen app had direct access it does not seem to be exposed in the public API we can use via REST calls.
Had the same problem with too many IP change notifications, if something is causing an error while reading the API, I suppose.
Provided a fix that Kim might merge anytime: V1.2.5 by mech78 · Pull Request #15 · HarpunDK/Homey.Sonnen · GitHub
Cheers, mech78
1 Like
Test version is out:
Release is in verification process.
I reveived some input from the developer of the “other” Sonnen-app and just applied these bits before christmas and vacation - not optimal. Sorry for the issues. And @Michael_E thank you for your help.
Hi @Kim_Kokholm - Is there a way to change operating mode to normal via api - and by that make it possible to discharge the batteri? Or any other way around it?
Hi @Oscar_Wannfors
Not that I’m aware of. Is it possible through the admin-/user-inferface?
Discharge you mean: loose its state and energy right?
It is possible to manually discharge (or charge) the battery with a set number of W. To access this mode you have to login as installer.
Hi @Oscar_Wannfors
Do you have installer-login? I guess we can monitor the network in your browser to see what command is being sent to Sonnen - maybe it is possible to perform this in Postman and then make a feature in the app.
Hi, new version is out.
More devices added, to support energy-tab.
Maybe you will need to re-add the Battery - due to new capabilities.
Hi Kim
Ive dont get updated data since the the update, just a few is updated
I have tested to restart the app and to restare the homey, but still no updated data.
Do you have any suggestion what i could do?
/Rikard
1 Like
Hi @janrikard
Please use the latest test-version (Sonnen Batterie | Homey)
Remove and re-add the Battery.
Please note:
If you do not have power-meter (external one: Homey’s or Homewizard or other) - add Household and Grid. These will provide the data you are looking for.
If you have solar connected with your Sonnen Battery and not using external inverter - you can add the Solar driver as well.
Why you will have to this?`
You will have to do this to support the Energy-tab.
We are having users with different setups - therefore the device seperation and future code development.