Gps logger issues

My config is using letsencrypt and duckdns and forwarding to port 8123 and i can’t for the life of me get this to connect, does gps logger work with this type of config?

known_devices.yaml

Joe_6p:
  hide_if_away: false
  icon:
  mac: [my.mac]
  name: Joe
  picture: /local/joe.png
  track: true
  vendor: HTC Corporation

device_tracker.yaml

  - platform: gpslogger
    password: !secret api_password

URL in gpstracker

https://[myha].duckdns.org:8123/api/gpslogger?latitude=%LAT&longitude=%LON&device=Joe&accuracy=%ACC&battery=%BATT&speed=%SPD&direction=%DIR&altitude=%ALT&provider=%PROV&activity=%ACT&api_password=[api_password]

Error in gpstracker

Could not send to custom URL


failed to connect to [myha].duckdns.org/[myexternalip] (port 8123) from /[myphoneip] (port 43133) after 10000ms
java.net.SocketTimeoutException: failed to connect to [myha].duckdns.org/[myexternalip] (port 8123) from /[myphoneip] (port 43133) after 10000ms
	at libcore.io.IoBridge.connectErrno(IoBridge.java:185)
	at libcore.io.IoBridge.connect(IoBridge.java:130)
	at java.net.PlainSocketImpl.socketConnect(PlainSocketImpl.java:129)
	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:356)
	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:357)
	at java.net.Socket.connect(Socket.java:616)
	at okhttp3.internal.platform.AndroidPlatform.connectSocket(AndroidPlatform.java:63)
	at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.java:221)
	at okhttp3.internal.connection.RealConnection.connect(RealConnection.java:147)
	at okhttp3.internal.connection.StreamAllocation.findConnection(StreamAllocation.java:192)
	at okhttp3.internal.connection.StreamAllocation.findHealthyConnection(StreamAllocation.java:121)
	at okhttp3.internal.connection.StreamAllocation.newStream(StreamAllocation.java:100)
	at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:42)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
	at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:93)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
	at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
	at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:120)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
	at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:185)
	at okhttp3.RealCall.execute(RealCall.java:69)
	at com.mendhak.gpslogger.loggers.customurl.CustomUrlJob.onRun(CustomUrlJob.java:75)
	at com.path.android.jobqueue.Job.safeRun(Job.java:145)
	at com.path.android.jobqueue.JobHolder.safeRun(JobHolder.java:90)
	at com.path.android.jobqueue.executor.JobConsumerExecutor$JobConsumer.run(JobConsumerExecutor.java:306)
	at java.lang.Thread.run(Thread.java:764)

Your external port isn’t using 8123, it’s using 443. That’s why you forward 443 to 8123. You shouldn’t even need to specify the port in your url either.

Have you tried connecting to https://[myha].duckdns.org?

once it’s loaded, you’ll notice that a port won’t be specified. but your url will be https://[myha].duckdns.org/states.

Just for clarification, the component even states what I just said:

Only remove [Port] if your Home Assistant instance is using port 443. Otherwise set it to the port you’re using.

and, if you’re still having trouble, i would expect the URL to be this format:

https://[myha].duckdns.org/api/gpslogger?latitude=%LAT&longitude=%LON&device=Joe&accuracy=%ACC&battery=%BATT&speed=%SPD&direction=%DIR&altitude=%ALT&provider=%PROV&activity=%ACT&api_password=[api_password]

Hi Petro, sorry i’ve been away and your help has not gone unappreciated - trust me.

I understand what you’re saying, and i originally tried with no forward port, but if i hit the HTTP test i get a 500 error with server ran into an issue.

Now if i keep the HTTP page open in GPS logger and wait for it to update then it will bring up a popup box stating ‘Success’ but i don’t get GPS update within known_devices.yaml and my home assistant log is full of python issues. I’ve only just now had a play, so will reboot and see if my changes fix the issue.

Thanks again.

I don’t get anything GPS coordinates showing in known_devices Petro, any idea of what i’m doing wrong?

are there errors in your logs?