# \[APP\]\[Pro\] Sonnen Batterie - Clean and affordable energy for everyone

**URL:** <https://community.homey.app/t/app-pro-sonnen-batterie-clean-and-affordable-energy-for-everyone/96052>\
**Category:** Apps\
**Tags:** app, energy, homey-pro\
**Created:** [November 27, 2023, 9:46pm UTC](https://community.homey.app/t/app-pro-sonnen-batterie-clean-and-affordable-energy-for-everyone/96052 "2023-11-27T21:46:10Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![Kim\_Kokholm](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/kim_kokholm/32/91519_2.png) [@Kim\_Kokholm](https://community.homey.app/u/Kim_Kokholm)\
**Post date:** [September 21, 2024, 9:00am UTC](https://community.homey.app/t/app-pro-sonnen-batterie-clean-and-affordable-energy-for-everyone/96052/21 "2024-09-21T09:00:37Z")

</div>

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 😃

---

<div class="post-metadata">

**Author:** ![Oscar\_Wannfors](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/oscar_wannfors/32/114441_2.png) [@Oscar\_Wannfors](https://community.homey.app/u/Oscar_Wannfors)\
**Post date:** [September 23, 2024, 11:20am UTC](https://community.homey.app/t/app-pro-sonnen-batterie-clean-and-affordable-energy-for-everyone/96052/22 "2024-09-23T11:20:59Z")

</div>

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.

 ![IMG_6480](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/0/c/0c75f206ddf9b0b8496775f2ce39bff8f57c4501.jpeg)

---

<div class="post-metadata">

**Author:** ![Kim\_Kokholm](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/kim_kokholm/32/91519_2.png) [@Kim\_Kokholm](https://community.homey.app/u/Kim_Kokholm)\
**Post date:** [September 23, 2024, 11:58am UTC](https://community.homey.app/t/app-pro-sonnen-batterie-clean-and-affordable-energy-for-everyone/96052/23 "2024-09-23T11:58:16Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![Oscar\_Wannfors](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/oscar_wannfors/32/114441_2.png) [@Oscar\_Wannfors](https://community.homey.app/u/Oscar_Wannfors)\
**Post date:** [September 23, 2024, 12:28pm UTC](https://community.homey.app/t/app-pro-sonnen-batterie-clean-and-affordable-energy-for-everyone/96052/24 "2024-09-23T12:28:34Z")

</div>

![IMG_6481](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/d/c/dcce59d67aa6420924d06c4e6e07af3b0e5f8d82.png)

---

<div class="post-metadata">

**Author:** ![Oscar\_Wannfors](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/oscar_wannfors/32/114441_2.png) [@Oscar\_Wannfors](https://community.homey.app/u/Oscar_Wannfors)\
**Post date:** [September 23, 2024, 12:29pm UTC](https://community.homey.app/t/app-pro-sonnen-batterie-clean-and-affordable-energy-for-everyone/96052/25 "2024-09-23T12:29:18Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Kim\_Kokholm](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/kim_kokholm/32/91519_2.png) [@Kim\_Kokholm](https://community.homey.app/u/Kim_Kokholm)\
**Post date:** [September 23, 2024, 1:07pm UTC](https://community.homey.app/t/app-pro-sonnen-batterie-clean-and-affordable-energy-for-everyone/96052/26 "2024-09-23T13:07:31Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Oscar\_Wannfors](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/oscar_wannfors/32/114441_2.png) [@Oscar\_Wannfors](https://community.homey.app/u/Oscar_Wannfors)\
**Post date:** [September 23, 2024, 2:26pm UTC](https://community.homey.app/t/app-pro-sonnen-batterie-clean-and-affordable-energy-for-everyone/96052/27 "2024-09-23T14:26:05Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Oscar\_Wannfors](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/oscar_wannfors/32/114441_2.png) [@Oscar\_Wannfors](https://community.homey.app/u/Oscar_Wannfors)\
**Post date:** [September 23, 2024, 3:34pm UTC](https://community.homey.app/t/app-pro-sonnen-batterie-clean-and-affordable-energy-for-everyone/96052/28 "2024-09-23T15:34:14Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Marc\_Iven](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/marc_iven/32/82278_2.png) [@Marc\_Iven](https://community.homey.app/u/Marc_Iven)\
**Post date:** [September 23, 2024, 4:36pm UTC](https://community.homey.app/t/app-pro-sonnen-batterie-clean-and-affordable-energy-for-everyone/96052/29 "2024-09-23T16:36:53Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Kim\_Kokholm](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/kim_kokholm/32/91519_2.png) [@Kim\_Kokholm](https://community.homey.app/u/Kim_Kokholm)\
**Post date:** [September 24, 2024, 7:16am UTC](https://community.homey.app/t/app-pro-sonnen-batterie-clean-and-affordable-energy-for-everyone/96052/30 "2024-09-24T07:16:11Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Kim\_Kokholm](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/kim_kokholm/32/91519_2.png) [@Kim\_Kokholm](https://community.homey.app/u/Kim_Kokholm)\
**Post date:** [September 24, 2024, 7:17am UTC](https://community.homey.app/t/app-pro-sonnen-batterie-clean-and-affordable-energy-for-everyone/96052/31 "2024-09-24T07:17:39Z")

</div>

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 🙂

---

<div class="post-metadata">

**Author:** ![Kim\_Kokholm](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/kim_kokholm/32/91519_2.png) [@Kim\_Kokholm](https://community.homey.app/u/Kim_Kokholm)\
**Post date:** [September 24, 2024, 7:18am UTC](https://community.homey.app/t/app-pro-sonnen-batterie-clean-and-affordable-energy-for-everyone/96052/32 "2024-09-24T07:18:56Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Marc\_Iven](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/marc_iven/32/82278_2.png) [@Marc\_Iven](https://community.homey.app/u/Marc_Iven)\
**Post date:** [September 24, 2024, 7:33am UTC](https://community.homey.app/t/app-pro-sonnen-batterie-clean-and-affordable-energy-for-everyone/96052/33 "2024-09-24T07:33:53Z")

</div>

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();

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [September 24, 2024, 10:57am UTC](https://community.homey.app/t/app-pro-sonnen-batterie-clean-and-affordable-energy-for-everyone/96052/34 "2024-09-24T10:57:04Z")

</div>

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

> ![1000034609](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/c/9/c9317c94d9931fef6a84e4f368c0ad48b6f3faca.jpeg)

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._

---

<div class="post-metadata">

**Author:** ![Kim\_Kokholm](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/kim_kokholm/32/91519_2.png) [@Kim\_Kokholm](https://community.homey.app/u/Kim_Kokholm)\
**Post date:** [September 24, 2024, 6:22pm UTC](https://community.homey.app/t/app-pro-sonnen-batterie-clean-and-affordable-energy-for-everyone/96052/35 "2024-09-24T18:22:15Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Marc\_Iven](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/marc_iven/32/82278_2.png) [@Marc\_Iven](https://community.homey.app/u/Marc_Iven)\
**Post date:** [September 25, 2024, 1:15am UTC](https://community.homey.app/t/app-pro-sonnen-batterie-clean-and-affordable-energy-for-everyone/96052/36 "2024-09-25T01:15:42Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Oscar\_Wannfors](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/oscar_wannfors/32/114441_2.png) [@Oscar\_Wannfors](https://community.homey.app/u/Oscar_Wannfors)\
**Post date:** [September 25, 2024, 2:04am UTC](https://community.homey.app/t/app-pro-sonnen-batterie-clean-and-affordable-energy-for-everyone/96052/37 "2024-09-25T02:04:21Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Oscar\_Wannfors](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/oscar_wannfors/32/114441_2.png) [@Oscar\_Wannfors](https://community.homey.app/u/Oscar_Wannfors)\
**Post date:** [September 25, 2024, 1:09pm UTC](https://community.homey.app/t/app-pro-sonnen-batterie-clean-and-affordable-energy-for-everyone/96052/38 "2024-09-25T13:09:43Z")

</div>

@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?

---

<div class="post-metadata">

**Author:** ![Marc\_Iven](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/marc_iven/32/82278_2.png) [@Marc\_Iven](https://community.homey.app/u/Marc_Iven)\
**Post date:** [September 25, 2024, 1:21pm UTC](https://community.homey.app/t/app-pro-sonnen-batterie-clean-and-affordable-energy-for-everyone/96052/39 "2024-09-25T13:21:47Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Kim\_Kokholm](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/kim_kokholm/32/91519_2.png) [@Kim\_Kokholm](https://community.homey.app/u/Kim_Kokholm)\
**Post date:** [September 25, 2024, 1:44pm UTC](https://community.homey.app/t/app-pro-sonnen-batterie-clean-and-affordable-energy-for-everyone/96052/40 "2024-09-25T13:44:37Z")

</div>

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?

[Previous page](https://community.homey.app/t/app-pro-sonnen-batterie-clean-and-affordable-energy-for-everyone/96052.md?page=1)

[Next page](https://community.homey.app/t/app-pro-sonnen-batterie-clean-and-affordable-energy-for-everyone/96052.md?page=3)
