Débutant : Problème connection OwnTracks

Bonjour à tous, désolé pour cette demande qui est certainement due à un mauvais paramétrage de l’application OwnTracks.
Je débute avec Gladys (installé sur mini-Pc depuis 4 heures max). Après avoir sélectionné l’option Gladys+, j’ai installé OwnTracks sur mon téléphone en suivant les renseignements de l’aide de Gladys, la version actuelle de OwnTracks est différente de celle reprise dans l’aide. Dans Gladys pas de remontée de présence sur la carte, mais sur le portable j’ai le message : « Erreur: HTTP code 401 » J’ai vérifié plusieurs fois l’adresse URL et celle-ci est correcte avec Gladys+. D’avance un grand merci pour l’aide apportée.
Daniel Janssens

Salut @Janssens :slight_smile:

Est-ce que tu peux m’en dire plus sur l’URL que tu as rentré dans Owntracks ?

Tu as bien remplacé l’URL avec ta clé d’API Gladys Plus ?

Merci pour ta réponse
Voici l’adresse URL collée dans Ownstracks (adresse API https://api.gladysgateway.com/v1/api/owntracks/ ea6d38a975dfa4eb801e14e83c4f6ff895de05xxxxxxxxxxxxxxxxa0a35900927059f5f687ddd914
(Les 16x remplacent les 16 caractères officiels)
Daniel

1 « J'aime »

Tu peux me faire une capture d’écran de ton application (en masquant ton token si possible) ?

Un grand merci pour tes interventions.
Désolé, de quelle application parles-tu ? OwnsTracks ou Gladys ? et quelle partie de celle-ci.
Ci-dessous le log de OwnsTracks modifié, si ça peut t’aider.

2024-05-27 14:40:27.062 D AppShortcutsImpl: Removing logViewer application shortcut
2024-05-27 14:40:27.130 I GeocoderProvider: Setting geocoding provider to Device
2024-05-27 14:40:27.314 I ServiceStarter$Impl: starting service
2024-05-27 14:40:27.335 D MapFragmentFactory: Instantiating Fragment for org.owntracks.android.ui.map.MapFragment
2024-05-27 14:40:27.341 D MapViewModel: setting view mode: VIEW_DEVICE
2024-05-27 14:40:27.342 E MapViewModel: no location available
2024-05-27 14:40:28.116 D GoogleMapFragment: Maps SDK initialized with renderer: LEGACY
2024-05-27 14:40:28.283 D BackgroundService: location update request params: LocationRequest(fastestInterval=null, smallestDisplacement=500.0, numUpdates=null, expirationDuration=null, priority=1, interval=900000, waitForAccurateLocation=null)
2024-05-27 14:40:28.285 D GMSLocationProviderClient: Requesting location updates priority=1, interval=900000 clientCallback=XXXXXXXXX
2024-05-27 14:40:28.286 D GMSLocationProviderClient: transformed location request is Request[PRIORITY_BALANCED_POWER_ACCURACY requested=900000ms fastest=150000ms smallestDisplacement=500.0m]
2024-05-27 14:40:28.288 D Scheduler: WorkManager queue task PERIODIC_TASK_SEND_LOCATION_PING as d209e134-8c1c-463a-9412-35ef50c6212b with interval 30 minutes
2024-05-27 14:40:28.290 D BackgroundService: loader thread:Looper (main, tid 2) {26d6899}, isMain:true
2024-05-27 14:40:28.292 D MessageProcessor: Initializing MessageProcessor
2024-05-27 14:40:28.293 D MessageProcessor: message:null, 
2024-05-27 14:40:28.294 D MessageProcessor: Reloading outgoing message processor. ThreadID: Thread[main,5,main]
2024-05-27 14:40:28.297 D MessageProcessor: message:null, 
2024-05-27 14:40:28.298 D MessageProcessor: Starting outbound message loop. ThreadID: Thread[backgroundDequeueThread,5,main]
2024-05-27 14:40:28.304 D MessageProcessorEndpointHttp: url:https://api.gladysgateway.com/v1/api/owntracks/%20ea6d38a975dfa4eb801e14e83c4f6ff895de05xxxxxxxxxxxxxxxxa0a35900927059f5f687ddd914, messageId:1716813626029-b78622
2024-05-27 14:40:28.305 D BackgroundService: Background service bound
2024-05-27 14:40:28.306 D MessageProcessorEndpointHttp: creating new HTTP client instance
2024-05-27 14:40:28.313 D GoogleMapFragment: Maps SDK initialized with renderer: LEGACY
2024-05-27 14:40:28.315 D GoogleMapFragment: GoogleMapFragment initMap hasLocationCapability=true
2024-05-27 14:40:28.328 D zzl: location result received: LocationResult(lastLocation=Location[fused xx,xxx,x,xxxx0 hAcc=4 et=+31d2h51m48s387ms alt=221.0 vel=0.48778346 bear=210.67758 vAcc=5 sAcc=2 bAcc=45 {Bundle[mParcelledData.dataSize=392]}])
2024-05-27 14:40:28.331 E LocationProcessor: no location available
2024-05-27 14:40:28.345 D MapViewModel: setting view mode: VIEW_DEVICE
2024-05-27 14:40:28.346 E MapViewModel: no location available
2024-05-27 14:40:28.347 D GoogleMapFragment: Maps SDK initialized with renderer: LEGACY
2024-05-27 14:40:28.348 D GoogleMapFragment: GoogleMapFragment initMap hasLocationCapability=true
2024-05-27 14:40:28.548 D MapActivity$serviceConnection: Service connected to MapActivity
2024-05-27 14:40:28.550 D LocationLiveData: Removing previous locationupdate task complete.  Success=true Cancelled=false
2024-05-27 14:40:28.552 D GMSLocationProviderClient: GMS Background location update request completed: Success=true Cancelled=false
2024-05-27 14:40:28.581 D DeviceGeocoder: Resolved 50.5561,4.9573 to Ruexxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
2024-05-27 14:40:28.583 D CachingGeocoder: Geocode cache: hits=0, misses=1
2024-05-27 14:40:28.596 D SendLocationPingWorker: SendLocationPingWorker started. ThreadID: Thread[androidx.work-1,5,main]
2024-05-27 14:40:28.614 D MessageProcessor: Queueing messageId:1716813628602-123b37, queueLength:257, ThreadID: Thread[androidx.work-1,5,main]
2024-05-27 14:40:28.631 D LocationLiveData: LocationLiveData location update request completed: Success=true Cancelled=false
2024-05-27 14:40:28.658 D LocationLiveData: Removing previous locationupdate task complete.  Success=true Cancelled=false
2024-05-27 14:40:28.706 D LocationLiveData: LocationLiveData location update request completed: Success=true Cancelled=false
2024-05-27 14:40:29.503 E MessageProcessorEndpointHttp: java.lang.Exception: HTTP request failed. Status: 401
	at org.owntracks.android.services.MessageProcessorEndpointHttp.sendMessage(SourceFile:528)
	at org.owntracks.android.services.MessageProcessor.lambda$sendAvailableMessages$0(Unknown Source:2)
	at org.owntracks.android.services.MessageProcessor.$r8$lambda$bVYaIhYhXtJCzBaSxWOGtcUu6f8(Unknown Source:0)
	at org.owntracks.android.services.MessageProcessor$$ExternalSyntheticLambda1.call(Unknown Source:4)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at android.os.Handler.handleCallback(Handler.java:873)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loop(Looper.java:193)
	at android.os.HandlerThread.run(HandlerThread.java:65)

2024-05-27 14:40:29.506 D MessageProcessor: message:HTTP code 401, 
2024-05-27 14:40:29.508 E MessageProcessor: Message delivery failed. queueLength: 259, messageId: 1716813626029-b78622
2024-05-27 14:40:29.512 W MessageProcessor: Error sending message. Re-queueing
2024-05-27 14:40:29.534 I MessageProcessor: Waiting for 1 s before retrying
2024-05-27 14:40:30.542 D MessageProcessorEndpointHttp: url:https://api.gladysgateway.com/v1/api/owntracks/%20ea6d38a975dfa4eb801e14e83c4f6ff895de05xxxxxxxxxxxxxxxxa0a35900927059f5f687ddd914, messageId:1716813626029-b78622
2024-05-27 14:40:30.741 E MessageProcessorEndpointHttp: java.lang.Exception: HTTP request failed. Status: 401
	at org.owntracks.android.services.MessageProcessorEndpointHttp.sendMessage(SourceFile:528)
	at org.owntracks.android.services.MessageProcessor.lambda$sendAvailableMessages$0(Unknown Source:2)
	at org.owntracks.android.services.MessageProcessor.$r8$lambda$bVYaIhYhXtJCzBaSxWOGtcUu6f8(Unknown Source:0)
	at org.owntracks.android.services.MessageProcessor$$ExternalSyntheticLambda1.call(Unknown Source:4)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at android.os.Handler.handleCallback(Handler.java:873)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loop(Looper.java:193)
	at android.os.HandlerThread.run(HandlerThread.java:65)

2024-05-27 14:40:30.763 D MessageProcessor: message:HTTP code 401, 
2024-05-27 14:40:30.780 E MessageProcessor: Message delivery failed. queueLength: 259, messageId: 1716813626029-b78622
2024-05-27 14:40:30.802 W MessageProcessor: Error sending message. Re-queueing
2024-05-27 14:40:30.818 I MessageProcessor: Waiting for 2 s before retrying
2024-05-27 14:40:32.824 D MessageProcessorEndpointHttp: url:https://api.gladysgateway.com/v1/api/owntracks/%20ea6d38a975dfa4eb801e14e83c4f6ff895de05xxxxxxxxxxxxxxxxa0a35900927059f5f687ddd914, messageId:1716813626029-b78622
2024-05-27 14:40:33.049 E MessageProcessorEndpointHttp: java.lang.Exception: HTTP request failed. Status: 401
	at org.owntracks.android.services.MessageProcessorEndpointHttp.sendMessage(SourceFile:528)
	at org.owntracks.android.services.MessageProcessor.lambda$sendAvailableMessages$0(Unknown Source:2)
	at org.owntracks.android.services.MessageProcessor.$r8$lambda$bVYaIhYhXtJCzBaSxWOGtcUu6f8(Unknown Source:0)
	at org.owntracks.android.services.MessageProcessor$$ExternalSyntheticLambda1.call(Unknown Source:4)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at android.os.Handler.handleCallback(Handler.java:873)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loop(Looper.java:193)
	at android.os.HandlerThread.run(HandlerThread.java:65)

2024-05-27 14:40:33.053 D MessageProcessor: message:HTTP code 401, 
2024-05-27 14:40:33.056 E MessageProcessor: Message delivery failed. queueLength: 259, messageId: 1716813626029-b78622
2024-05-27 14:40:33.062 W MessageProcessor: Error sending message. Re-queueing
2024-05-27 14:40:33.090 I MessageProcessor: Waiting for 4 s before retrying
2024-05-27 14:40:37.096 D MessageProcessorEndpointHttp: url:https://api.gladysgateway.com/v1/api/owntracks/%20ea6d38a975dfa4eb801e14e83c4f6ff895de05xxxxxxxxxxxxxxxxa0a35900927059f5f687ddd914, messageId:1716813626029-b78622
2024-05-27 14:40:37.291 E MessageProcessorEndpointHttp: java.lang.Exception: HTTP request failed. Status: 401
	at org.owntracks.android.services.MessageProcessorEndpointHttp.sendMessage(SourceFile:528)
	at org.owntracks.android.services.MessageProcessor.lambda$sendAvailableMessages$0(Unknown Source:2)
	at org.owntracks.android.services.MessageProcessor.$r8$lambda$bVYaIhYhXtJCzBaSxWOGtcUu6f8(Unknown Source:0)
	at org.owntracks.android.services.MessageProcessor$$ExternalSyntheticLambda1.call(Unknown Source:4)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at android.os.Handler.handleCallback(Handler.java:873)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loop(Looper.java:193)
	at android.os.HandlerThread.run(HandlerThread.java:65)

2024-05-27 14:40:37.294 D MessageProcessor: message:HTTP code 401, 
2024-05-27 14:40:37.299 E MessageProcessor: Message delivery failed. queueLength: 259, messageId: 1716813626029-b78622
2024-05-27 14:40:37.307 W MessageProcessor: Error sending message. Re-queueing
2024-05-27 14:40:37.326 I MessageProcessor: Waiting for 8 s before retrying
2024-05-27 14:40:39.071 I ServiceStarter$Impl: starting service
2024-05-27 14:40:39.540 D LocationLiveData: LocationLiveData removing location updates completed: Success=true Cancelled=false
2024-05-27 14:40:45.343 D MessageProcessorEndpointHttp: url:https://api.gladysgateway.com/v1/api/owntracks/%20ea6d38a975dfa4eb801e14e83c4f6ff895de05xxxxxxxxxxxxxxxxa0a35900927059f5f687ddd914, messageId:1716813626029-b78622
2024-05-27 14:40:45.838 E MessageProcessorEndpointHttp: java.lang.Exception: HTTP request failed. Status: 401
	at org.owntracks.android.services.MessageProcessorEndpointHttp.sendMessage(SourceFile:528)
	at org.owntracks.android.services.MessageProcessor.lambda$sendAvailableMessages$0(Unknown Source:2)
	at org.owntracks.android.services.MessageProcessor.$r8$lambda$bVYaIhYhXtJCzBaSxWOGtcUu6f8(Unknown Source:0)
	at org.owntracks.android.services.MessageProcessor$$ExternalSyntheticLambda1.call(Unknown Source:4)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at android.os.Handler.handleCallback(Handler.java:873)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loop(Looper.java:193)
	at android.os.HandlerThread.run(HandlerThread.java:65)

2024-05-27 14:40:45.840 D MessageProcessor: message:HTTP code 401, 
2024-05-27 14:40:45.847 E MessageProcessor: Message delivery failed. queueLength: 259, messageId: 1716813626029-b78622
2024-05-27 14:40:45.850 W MessageProcessor: Error sending message. Re-queueing
2024-05-27 14:40:45.865 I MessageProcessor: Waiting for 16 s before retrying
2024-05-27 14:41:01.871 D MessageProcessorEndpointHttp: url:https://api.gladysgateway.com/v1/api/owntracks/%20ea6d38a975dfa4eb801e14e83c4f6ff895de05xxxxxxxxxxxxxxxxa0a35900927059f5f687ddd914, messageId:1716813626029-b78622
2024-05-27 14:41:02.049 E MessageProcessorEndpointHttp: java.lang.Exception: HTTP request failed. Status: 401
	at org.owntracks.android.services.MessageProcessorEndpointHttp.sendMessage(SourceFile:528)
	at org.owntracks.android.services.MessageProcessor.lambda$sendAvailableMessages$0(Unknown Source:2)
	at org.owntracks.android.services.MessageProcessor.$r8$lambda$bVYaIhYhXtJCzBaSxWOGtcUu6f8(Unknown Source:0)
	at org.owntracks.android.services.MessageProcessor$$ExternalSyntheticLambda1.call(Unknown Source:4)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at android.os.Handler.handleCallback(Handler.java:873)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loop(Looper.java:193)
	at android.os.HandlerThread.run(HandlerThread.java:65)

2024-05-27 14:41:02.050 D MessageProcessor: message:HTTP code 401, 
2024-05-27 14:41:02.051 E MessageProcessor: Message delivery failed. queueLength: 259, messageId: 1716813626029-b78622
2024-05-27 14:41:02.053 W MessageProcessor: Error sending message. Re-queueing
2024-05-27 14:41:02.066 I MessageProcessor: Waiting for 32 s before retrying
2024-05-27 14:41:34.078 D MessageProcessorEndpointHttp: url:https://api.gladysgateway.com/v1/api/owntracks/%20ea6d38a975dfa4eb801e14e83c4f6ff895de05xxxxxxxxxxxxxxxxa0a35900927059f5f687ddd914, messageId:1716813626029-b78622
2024-05-27 14:41:34.308 E MessageProcessorEndpointHttp: java.lang.Exception: HTTP request failed. Status: 401
	at org.owntracks.android.services.MessageProcessorEndpointHttp.sendMessage(SourceFile:528)
	at org.owntracks.android.services.MessageProcessor.lambda$sendAvailableMessages$0(Unknown Source:2)
	at org.owntracks.android.services.MessageProcessor.$r8$lambda$bVYaIhYhXtJCzBaSxWOGtcUu6f8(Unknown Source:0)
	at org.owntracks.android.services.MessageProcessor$$ExternalSyntheticLambda1.call(Unknown Source:4)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at android.os.Handler.handleCallback(Handler.java:873)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loop(Looper.java:193)
	at android.os.HandlerThread.run(HandlerThread.java:65)

2024-05-27 14:41:34.312 D MessageProcessor: message:HTTP code 401, 
2024-05-27 14:41:34.318 E MessageProcessor: Message delivery failed. queueLength: 259, messageId: 1716813626029-b78622
2024-05-27 14:41:34.321 W MessageProcessor: Error sending message. Re-queueing
2024-05-27 14:41:34.334 I MessageProcessor: Waiting for 64 s before retrying

Je parlais de Owntracks, la partie configuration de celle-ci :slight_smile:




Tu as quoi comme mode dans « Connection » ? (L’application iOS est différente)

Tu n’as pas de nom d’utilisateur et de mot de passe à renseigner normalement.

Dans Mode → HTTP privé (coché)
Dans Identification :

Nom utilisateur → Fer…be
Mot de passe → xxx
Device ID → Androïd
Tracker ID → vide

Quels sont les autres options ?

Il ne faut pas utiliser cette authentification, la clé d’API est dans l’URL :slight_smile:

Je viens de supprimer ces informations, mais aucun changement significatif toujours le message : Erreur:HTTP code 401 et rien dans Gladys.

Sur Android, ton hôte est bien renseigné.
Pas besoin identifiant si ce n’est le DeviceId.

Je relance le téléphone et je te reviens.

@Janssens Tu es sûr d’avoir bien copié collé la clé d’API ?

Quand je vois sur le forum ton post, il y a un « % » avant la clé d’API, ce n’est pas normal, je pense que tu as du mettre un espace avant ta clé d’API

Un tout tout grand merci Pierre-Gilles, ça fonctionne du tonnerre de Dieu.
Vu ton suivi et ta gentillesse, je ne regrette pas le choix de Gladys, ni celui de Gladys+ (pour te soutenir).
Au risque de profiter encore un peu de on temps, hier, j’ai activer le suivi Enedys en suivant le tutoriel. L’accord d’Enedys pour 2 ans de transferts à Gladys et l’installation se sont bien déroulés. En ce moment, je n’ai toujours pas de remontées de mon capteur. Je suppose qu’il doit y avoir un certain délai (hier c’était dimanche) avant d’obtenir le premier relevé ou j’ai encore mer…é quelque part ?
Encore 1000 mercis

2 « J'aime »

Merci pour ton message et pour ton soutien, ça fait toujours plaisir à lire :blush:

Pour Enedis je suis allé voir côté Gladys plus et il y a une erreur de synchronisation car apparement Enedis dit que le consentement n’est pas fait de ton côté.

Est ce que tu peux re-tenter de synchroniser ton compte ? Le site d’Enedis est parfois capricieux, ça n’a peut être pas marché du premier coup.

Merci,
Je viens de recommencer la synchronisation et comme sœur Anne, je vais attendre.
Bonne soirée à toi

Daniel

1 « J'aime »