Hi
i setup HA with gpslogger an got this error trying to connect from my smartphone New connection from xxx.xxx.xxx.xxx on port 1883. Socket error on client , disconnecting.
the i moved to https a got this error: [homeassistant.components.http.view] Serving /api/gpslogger to xxx.xxx.xxx.xxx (auth: False) [homeassistant.components.http.ban] Login attempt or request with invalid authentication from xxx.xxx.xxx.xxx
the connection from HA works fine: New connection from 172.30.32.1 on port 1883. New client connected from 172.30.32.1 as xxxxxxxx-c599-40da-ba81-xxxxxxxxxxxx (c1, k60, u'user').
For the setup i folowed this howto:
I dont get this:
ā0.77+ If you are using Long-Lived access tokens, then add Authorization: Bearer LLAT to the HTTP Headers setting (replace LLAT with your Long Lived Access Token).ā
how exactly do i need to setup the authentication or the LLAT in the GPSLogger APP?
In HA, click on your user account (top left on home screen), scroll to bottom of that page and find the LLAT card, there you generate a LLAT, name it smt usefull and copy the generated LLAT.
in the android app, go to the side menu / Logging Details and toggle the switch, it will bring up the details screen.
select HTTP Headers and add add Authorization: Bearer LLAT
to the HTTP Headers (replace LLAT with your Long Lived Access Token).
If things are as expected, your LLAT will be a ginormous string of 183 charactersā¦ impossible to type into the app.
Find a way to send it from your computer to your phone (email, Google Keep, ā¦ ) and paste it right after Authorization: Bearer
Or, perhaps, generate your LLAT from the phoneās browser and copy/paste it.
The error you are getting is 99% due to the LLAT being wrong in the app.
all i can say is, try another way to get the LLAT in the HTTP headers.
Also, be careful with spaces, or other invisible characters.
Make sure you put an āenterā before the Authorization header.
Have you checked the ip_bans.yaml file, itās in the folder together with your HA configuration.yaml
Perhaps your phone got banned for consecutive auth failures ?
For reference, hereās my headers (with modifications to the LLAT) :
there is no ip_bans.yaml file.
my header looks exactly like your ( i put an āenterā)
but still doesent work
i have the log level on debug but only the warring message is been logged. how can i get more info on loging?
just making sure, you edited this prior to posting and it isnāt exactly what you have in the appās config, right?
Otherwise, i donāt see how your HA could be complaining about invalid authentication, and also otherwise the app would throw an error on the SSL validation.
For reference, my URL is : https://blablabla.duckdns.org:8123/api/gpslogger?latitude=%LAT&longitude=%LON&device=Android&accuracy=%ACC&battery=%BATT&speed=%SPD&direction=%DIR&altitude=%ALT&provider=%PROV&activity=%ACT
Moving onā¦ please explain exactly what tools you are using to enter the LLAT into the Headers config ?
i open this post on my phones firefox browser and do copy/paste the URL to the GPSLogger app. then i edit the URL, delete blabla.duckdns.org:8123 and write my correct domain in the URL.
iām wondering if thereās something wrong in your HA config file, since you seem to be thinking this is related to MQTT.
But, as @flamingm0e said : GPS Logger is not an MQTT thing.
For reference the related portion of my configuration.yaml :
Iām having the same exact problem. Tried a fresh install on GPS Logger and still get a 401 error. Iāve tried everything with the LLAT but it doesnāt seem to like it.