Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 106517

Getting local IP address for RESTful request

$
0
0

I have implemented wireguard and have the client info status option listening on port 8124 which I can query from a web browser and using curl:

curl -X GET http://192.168.0.55:8124

However I am deploying this on a few different devices / LANS and for that reason I dont want to hardcode the IP address.

I have tried these and none work:

curl -X GET http://localhost:8124
curl -X GET http://127.0.0.1:8124
curl -X GET http://172.30.33.0/:8124
curl -X GET http://homeassistant.local:8124

172.30.33.0 - is the ip address of the hassio from ip addr.

So how can I get the local IP address, is it stored in some global variable

- platform: rest
  resource: http://MY_LOCAL_IP:8124
  name: Wireguard Status

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 106517

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>