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

[FEATURE]: Add trip reset button #77

Open
RobertJansen1 opened this issue Jan 17, 2024 · 11 comments · May be fixed by #79
Open

[FEATURE]: Add trip reset button #77

RobertJansen1 opened this issue Jan 17, 2024 · 11 comments · May be fixed by #79
Assignees
Labels
enhancement New feature or request

Comments

@RobertJansen1
Copy link

Describe the bug.

Hi, with much joy have i used the integration so far and i was wondering if it is possible to add a button to reset the trip distance and such through the integration

What version of Home Assistant Core has the issue?

NA

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

How did you install the stromer integration

HACS

Logging

No response

Diagnostics information

No response

Additional information

No response

@RobertJansen1 RobertJansen1 added the bug Something isn't working label Jan 17, 2024
@RobertJansen1 RobertJansen1 changed the title Add trip reset button [FEATURE]: Add trip reset button Jan 17, 2024
@CoMPaTech
Copy link
Owner

That should be possible, was already starting to reply/drafting code on it but life got in the way, let me see what I can cook up. As per maintenance I can't check on my own bike currently, but I will make a 'beta' release that you should be able to fetch via HACS.

@CoMPaTech CoMPaTech linked a pull request Jan 22, 2024 that will close this issue
@CoMPaTech
Copy link
Owner

@RobertJansen1 https://github.com/CoMPaTech/stromer/releases/tag/v0.3.2a1 seems to provide the button and correctly pick up the name (it said 'restart' in a0. If you enable 'beta' releases (using 'download' from the three dots) on the Stromer card in HACS you should be able to test if it yields the requested result. (As indicated I unfortunately can't test at this moment)

@RobertJansen1
Copy link
Author

Thanks for the fast patch! i tested it out and unfortunattely, for me this is not working. the butten registers an action in Home Assitant, but it seems not to be send through to the bike. i enabled debug logging, but the code does not show any debug logs from the integration (i expect the python debug lines to be in there somewhere, but nothing)

@CoMPaTech
Copy link
Owner

I'll recheck the bearings then ... probably something with the path it's sending to. I'll update accordingly and see if we can stuff more debug in.

@CoMPaTech
Copy link
Owner

Not sure why the (actual code) debug logs don't pass, don't spot them here either, will look into that. But I made a small mistake in the API path (/id/ missing from /bike/id/{bikeid}/trip_data). Could you give https://github.com/CoMPaTech/stromer/releases/tag/v0.3.2a2 a go?

@CoMPaTech CoMPaTech added enhancement New feature or request and removed bug Something isn't working labels Jan 23, 2024
@CoMPaTech CoMPaTech self-assigned this Jan 23, 2024
@CoMPaTech
Copy link
Owner

@RobertJansen1 did you get a chance to test it with the newer version?

@RobertJansen1
Copy link
Author

Yes i did test it and no it is still not working. I wanted to test if the python library you mentioned in the other issue is able to reset the trip, but I wasn't able to do that yet. I will try that today hopefully and report back

@CoMPaTech
Copy link
Owner

Hmmm, strange, but indeed I referenced from that python library indeed ... hopefully bike is back this week so I can test myself as well.

@RobertJansen1
Copy link
Author

With the original library, it does reset the trip. So the call there seems the right one :) I will double check the home assistant one again later this week (it is now reset)

@jlsjonas
Copy link

Hi, did either of you manage to test it since? Wouldn't mind assisting if still required!

@CoMPaTech
Copy link
Owner

Confirmed myself it didn't work last week but didn't (yet) see the difference between the calls (referring to elnkoscs' module). Busy otherwise so didn't make time to further check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants