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

[Home assistant] No delay between two QR code scans #627

Closed
Alxspb opened this issue Jan 7, 2023 · 6 comments
Closed

[Home assistant] No delay between two QR code scans #627

Alxspb opened this issue Jan 7, 2023 · 6 comments
Assignees
Labels
enhancement New feature or request

Comments

@Alxspb
Copy link

Alxspb commented Jan 7, 2023

I have installed homeassistant addon for grocy
Its working like a charm in ingress
I have followed guide to authenticate in android app, but it doesn't work at any way

  1. Generated token in grocy
  2. Opened qr on pc
  3. Scanned qr on android
  4. AuthFailureError

I have tried manally created long-lived token in homeassistant. It doesn't work also.
Supervisor logs:

WARNING (MainThread) [supervisor.api.ingress] No valid ingress session None

Am I supposed to do extra configuration steps, or it should work out of the box?

Grocy addon

Version 3.3.2

Android app

2.3.0

Homeassistant

Home Assistant 2023.1.1
Supervisor 2022.12.1
Operating System 9.4
Frontend 20230104.0 - latest

Grocy
Current version: 0.18.3

I have found another issue: #509
But it is closed as resolved

@Alxspb
Copy link
Author

Alxspb commented Jan 8, 2023

For me it was solved by recreating long-lived token on homeassistant and repasting it to grocy-android app
Idk, maybe it was copied not completely for first time
Qr code doesn't work since http page that it poins getting 401 status on mobile app

@Alxspb Alxspb closed this as completed Jan 8, 2023
@patzly
Copy link
Owner

patzly commented Jan 8, 2023

@dominiczedler maybe there could be something improved regarding the barcode scanning so that it also works?

@dominiczedler dominiczedler reopened this Jan 8, 2023
@dominiczedler
Copy link
Collaborator

@Alxspb What is your experiences way of authenticating in our app? I just have tried the same with my up-to-date Home Assistant and the latest nightly build (and also v2.3.0 just to make sure) and it all worked for me.

The steps should be:

  • On another device, open grocy in Home Assistant
  • Go to API keys page, generate one and open QR code
  • Scan QR code with our app when you tapped on "Own server" in the beginning
  • The app recognizes that you use Home Assistant and asks for another QR code: Long-lived access token
  • In Home Assistant, go to you profile and scroll down to the Long-lived access token section, create a token and open QR code
  • Scan the QR code with our app
  • The app should log in to grocy and all should be fine...

What step was not the same in your workflow?

@dominiczedler dominiczedler self-assigned this Jan 8, 2023
@Alxspb
Copy link
Author

Alxspb commented Jan 10, 2023

@dominiczedler, Oh, it is clear for me now!
I have scanned 2 qrs at instant (so for long-lived token the same - grocy's qr was scanned also). It was about 0.5-1 second delay after first qr scan and then it captured same qr. I thought it was lag or something else :)
Maybe delay or manual confirmation with notice should be added between qr scans?
With manually created long-lived token everything is working fine and auth experience is good (except qr issue)

@dominiczedler dominiczedler added the enhancement New feature or request label Jan 10, 2023
@Jugom
Copy link

Jugom commented Mar 10, 2023

Hi,
I installed grocy in home assistant a few days ago and the android app. it worked fine when I did the initial installation even scanned a few barcodes at home to test it.
yesterday after coming back from the grocery store, I tried using the android app but i was not working. then tried logging out and back in, but then I got the com.android.volley.AuthFailureError.
I tried deleting the data from my phone and generating new tokens in HA, but that didn't fix the issue.
HA, the grocy integration and the android app are all up to date.

as a side note, the grocy web interface inside HA is working fine, except for the scanner part... I have not been able to scan anything with it.

@dominiczedler
Copy link
Collaborator

@Alxspb This issue has nothing to do with the new auth failure, duplicate of #670. But anyway thanks for reporting, I'm working on it!

@dominiczedler dominiczedler changed the title Cannot authenticate to homeassistant addon [Home assistant] No delay between two QR code scans Mar 10, 2023
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

No branches or pull requests

4 participants