stromer icon indicating copy to clipboard operation
stromer copied to clipboard

[BUG]: integration gets unavailable since update Stromer

Open los-cuentos opened this issue 9 months ago • 17 comments

Describe the bug.

Since I installed the update on my Stromer bike the integrations keeps getting unavailable at random times. Have to reload it every few hours.

What version of Home Assistant Core has the issue?

2025.4.2

What was the last working version of Home Assistant Core?

2025.4.2

What type of installation are you running?

Home Assistant OS

How did you install the stromer integration

HACS

Logging

Deze fout is ontstaan door een aangepaste integratie.

Logger: custom_components.stromer.const Bron: helpers/update_coordinator.py:433 integratie: Stromer e-bike (documentatie, problemen) Eerst voorgekomen: 01:39:21 (2 gebeurtenissen) Laatst gelogd: 07:49:40

Authentication failed while fetching stromer data: Cannot connect to host api3.stromer-portal.ch:443 ssl:default [Could not contact DNS servers] Authentication failed while fetching stromer data:

Diagnostics information

No response

Additional information

No response

los-cuentos avatar Apr 22 '25 06:04 los-cuentos

Hello @los-cuentos! I'm here to help you with bugs, questions, and everything in between while you wait for a human maintainer. Let's get this sorted out!

The issue you're experiencing with the Stromer integration becoming unavailable seems to be related to DNS resolution failures, as indicated by the error message "Could not contact DNS servers." This suggests that the integration is having trouble resolving the host api3.stromer-portal.ch, which is necessary for connecting to the Stromer API.

The Stromer integration marks itself as unavailable when API calls fail 10 times consecutively [1]. This could be happening due to intermittent DNS resolution issues. Unfortunately, I couldn't find specific information in the repository about how DNS resolution is handled or any recent changes related to it.

To address this issue, you might want to check your network settings to ensure that DNS servers are correctly configured and accessible. Additionally, verifying that your internet connection is stable and not experiencing interruptions could help mitigate these DNS resolution failures.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

dosubot[bot] avatar Apr 22 '25 06:04 dosubot[bot]

I'll have a look at it later this week. Apologies for the inconvenience

CoMPaTech avatar Apr 22 '25 06:04 CoMPaTech

Seeing the error - are you sure this is an upgrade problem? Like the bot mentioned, it also looks like a DNS issue (i.e. lookup)?

CoMPaTech avatar Apr 22 '25 17:04 CoMPaTech

Noticed it after the system update of the bike. Can be coincidence

los-cuentos avatar Apr 22 '25 17:04 los-cuentos

I've been seeing this a while too.

The statistics become unavailable for about 55-65 minutes, every 24 hours: This period shifts.

I wrote a script at first to reboot HA, then to restart the integration. In both cases, the timeout is the same.

I tried on a separate HA installation on a different machine.

I have tried altering the fetch interval from 10 minutes to 15 in the integration configuration: No dice

Tried changing whole network DNS to google: No difference.

Currently have the stormer integration running on a separate pi, restarting the integration every 5 minutes if unavailable returned. That's all that's installed apart from SSH and HACS and an integration to share the entities with my main HA instance. I have written a template to smooth the data by just filling the gaps with the last known value, just for the optics of my charge graph.

I honestly think it's a Stromer issue.

I have 2 bikes if that makes any difference (same for both)

Just my 2p on this.

Tim

GoodbyeHarmony avatar Jun 22 '25 10:06 GoodbyeHarmony

Writing up a retry for the initial connection to work around the DNS issue

CoMPaTech avatar Jul 06 '25 18:07 CoMPaTech

Please see if v0.4.2 solves the issue @los-cuentos @GoodbyeHarmony

CoMPaTech avatar Jul 06 '25 19:07 CoMPaTech

Hey thanks just updated. I really love this integration thanks for all your hard work!

Tim

GoodbyeHarmony avatar Jul 06 '25 19:07 GoodbyeHarmony

Sorry for the delay in pick-up as it really looked DNS wise, but maybe there is something else going (wr)on(g). It's a workaround not a fix, but maybe it's enough to get Stromer through. Happy biking!

CoMPaTech avatar Jul 06 '25 19:07 CoMPaTech

Please don't apologise: You do this as a hobby and I'd not be able to do it myself. Love my Stromers!

GoodbyeHarmony avatar Jul 06 '25 19:07 GoodbyeHarmony

@los-cuentos hope it works for you to now?

CoMPaTech avatar Jul 14 '25 06:07 CoMPaTech

@los-cuentos hope it works for you to now?

It's no different for me, but I'm still of the opinion it's a server problem it's so semi regular. Next time I see it happening I'll check if the Stromer app is still responsive.

Appreciate your work, as ever

Cheers Tim

GoodbyeHarmony avatar Jul 14 '25 21:07 GoodbyeHarmony

Sorry to be a pain.

Finally caught it. It's absolutely a Stromer problem: When the integration goes unavailable, the Stromer app also fails to fetch data even on a completely different connection.

Hope this helps Tim

GoodbyeHarmony avatar Jul 31 '25 09:07 GoodbyeHarmony

Puzzling that it creates DNS issues though … I'll see if I can create some sort of monitoring on it aside from HA - or maybe they are fed up with us API-ing ourselves, but still DNS shouldn't be the issue then ...

CoMPaTech avatar Jul 31 '25 09:07 CoMPaTech

Never underestimate the shonkiness of Stromer's systems. I think they don't, as a company, have a great deal of experience of providing connectivity like this. What else explains a system that can only update by GSM even though it has a bluetooth interface? ;-)

Here is a pattern of gapping. as you can see it doesn't have a regular timebase, but it is broadly predictable (was riding the ST 5 this week...) - the gaps are usually an hour in duration.

[url=https://postimg.cc/94zNBxrX][img]https://i.postimg.cc/94zNBxrX/temp-Imagex-Jfw-Ry.avif[/img][/url]

If anyone is interested (unlikely :-) ) I have written a template to fill the gaps for pure visuals for my dash - it works well. I also have an automation that if detecting the integration has gone unavailable, reloads every five minutes until it comes back up.

Cheers Tim

GoodbyeHarmony avatar Jul 31 '25 09:07 GoodbyeHarmony

Returning to this like a dog with a particularly gnarled old bone, it seems since the 29 the hour long drops in service from Stromer have ceased

Hopefully this is the end of the issue!

Cheers @CoMPaTech for all your hard work!

GoodbyeHarmony avatar Oct 31 '25 11:10 GoodbyeHarmony

Still weird though .... no clue what's happening or what is not - Mine had it a couple of times, but not as much as you did. No clue still, glad it's over (fingers crossed it stays that way.

CoMPaTech avatar Oct 31 '25 20:10 CoMPaTech