In the interests of being kind to my router I thought I’d access the resource via the local address rather than relying on hairpinning.
I’ve tired all of these but none can contact the api endpoint:
resource: http://127.0.0.1/api/hassio/addons/a0d7b954_influxdb/info
resource: http://127.0.0.1:8123/api/hassio/addons/a0d7b954_influxdb/info # actually I didn't try this one
resource: http://10.1.1.100/api/hassio/addons/a0d7b954_influxdb/info
resource: http://10.1.1.100:8123/api/hassio/addons/a0d7b954_influxdb/info
( where 10.1.1.100 is my ha server local ip address).
Error fetching data: http://127.0.0.1:8123/api/hassio/addons/a0d7b954_influxdb/info failed with ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
In fact it is causing the whole restful sensor platform to abort.
Platform rest not ready yet. Retrying in 30 seconds.
Platform rest not ready yet. Retrying in 60 seconds.
Platform rest not ready yet. Retrying in 90 seconds.
Platform rest not ready yet. Retrying in 120 seconds
Returning to using the duckdns url fixes it.
EDIT: I’m guessing this is a https thing.
I have to use https as I have letsencrypt installed along with duckdns. Even when using the local IP address, but there I can add a browser certificate exception. I can’t do that with the rest sensor, so I cant use https with the local ip address or loopback address.