[APP][Pro] Sonnen Batterie

New version in verification.

  • Updated Homey version support
  • Start as string (well-formatted 24-hour format)
  • Hightlight flow

Will come to a store near you :smiley:

Hi Kim!

I tried to connect to the battery and found it in Homey (PRO) but dont get any data.
Have typed the ip address and token.

Hi @Oscar_Wannfors , please show me your settings as well - you can leave or blur the token.

Please also check my post, about access to your homey batterie local ip from your Homey setup. (2 post up)

Thanks Kim. Here’s a screenshot - I find the battery but no data.

Hi @Oscar_Wannfors things you can try:

  • Use a browser and check if settings are persisted (see next)
  • when you reopen settings, previous stored “input” (ip and key) should be shown
  • Check for unwanted spaces in the IP/url field
  • Copy & paste auth token - to make sure.

Hi Kim,

I have double checked all and the information is typed correctly.
But still on data from the battery.
Tried the app mentioned above too about tcp and ip.

I get all information correct from the dashboard on the browser.

Hi again!
It’s working now. Don’t ask me what info was wrong.

Is there a tutorial how to set up flows depending on prices and so on?
And what app do you use for spot price from Nordpool?

Thanks!

Oscar

Hi Kim.

Thanks for your great work! I’ve tested the newly added functionality TOU with starting time as string.

It works when entering the value as string (eg 14:30) but not when using the time label or string variable.

It seems Homey Logic has a bug where it adds a trailing whitespace to the tag values. So a correct time tag as “14:30” will be passed as "14:30 ". And this breaks the logic in the TOU functionality with status code 400.

I would suggest to crop the time string to only use the 5 first letters, so "14:30 " will be cropped to “14:30”. This way we can use the time tag values with or without trailing whitespace char.

1 Like

Hi @Marc_Iven

I will have to look into this.

I am doing this:
var timeStartHours = +timeStart.split(“:”, 1)[0];
var timeStartMinutes = timeStart.split(“:”, 2)[1];

Are you using “14:30” in your example where it “fails”? I cannot remember if the time need to be fully quilifies 00:00 (09:00) etc.

Time-label or string variable - don’t know these so well - do you have example values to test?

Hi @Oscar_Wannfors, glad it is working out for you. What went wrong? (just kidding)

I do not know of any tutorial - try in the “Power by the hour” - all the nerds are there :slight_smile:

You did the issue on github as well? Same issue and you are describing.

Hi Kim.

After the “:” split the timeStartMinutes sometimes contains a trailing whitespace. I would try to add some trimming to remove the trailing whitespace (if it occurs).

var timeStartMinutes = timeStart.split(“:”, 2)[1].trim();

No.
The bug really is in the logic cards when using the mobile app, it’s not a bug in the app code.
After saving, it just adds the whitespace to the variable value somehow.
It doesn’t occur when you use the web app.

I reported it twice as a bug, the last one 2 years ago

Translated:
I have again raised this issue with our developers, should I get an update on this I will get back to you one of these days!

My apologies for the inconvenience.

Submitted new version. Trying to address the input formatting. Please check it out and report back. Latest version is: 1.1.3

Hi Kim,

I tested the new version and can confirm that the date format bug (extra whitespace) is resolved.

Your app works great! Thx for this new functionality.

Kind regards,
Marc

Thanks for the update.
But now the battery only charge with 800w no matter what the flow cards says. Any one else experiencing the same?

@Kim_Kokholm - i have found a potential bug. The app is trigging an activity for “time of use” as from 00:00-23:59

But since this morning it doesn’t trigger Sonnen to charge. If I reset the activity (directly in sonnen settings) and make a new one with the same value - still doesn’t work.

But - if I make a shorter period (eg 15:00-17:00) it will kick in and charge with the set power. Any one else with the same problem?

Hi Oscar.

I had a similar error.

When i set the TOU for the whole day through the web application, my Sonnen batterie only charged with very small power (W) even when I put in the max 46000 W. It’s only with a shorter period that the Sonnen batterie seemed to kick in and started charging with the set power W.

I did the testing using the web application, so it has nothing to do with the Homey Sonnen Batterie app.

Please attach screenshot - are you using the “pause”?

The app only support one schedule - no overlapping - setting a new TOU - the old one is being removed. Are you trying “multiple” schedules?