Home assistant ip

Home assistant ip DEFAULT


The sensor will expose an IP address, fetched via DNS resolution, as its value. There are two operational modes:

  1. When you enable the sensor with minimal configuration, it will query the OpenDNS nameservers with the hostname , which will resolve to your external/public IP address.
  2. If you specify a , a regular DNS lookup will be performed, providing you the IP the hostname resolves to.

You may also override the nameserver that is being used by setting the parameter to any nameserver you like.


To enable this sensor, add the following lines to your file:

Configuration Variables

Looking for your configuration file?

hostname string (Optional)

The hostname for which to perform the DNS query.


(special hostname that resolves to your public IP)

name string (Optional)

Name of the sensor.


or hostname without dots if specified

resolver string (Optional)

The DNS server to target the query at.



ipv6 boolean (Optional, default: false)

Set this to or if IPv6 should be used. When resolving the public IP, this will be the IP of the machine where Home Assistant is running on.

resolver_ipv6 string (Optional)

The IPv6 DNS server to target the query at.



scan_interval integer (Optional, default: )

Defines number of seconds for polling interval.

Extended example

Sours: https://www.home-assistant.io/integrations/dnsip/

Local IP Address

The sensor will expose the local (LAN) IP address of your Home Assistant instance. This can be useful when your instance has a static public hostname (for example, if you use the Nabu Casa service), but have a dynamically allocated local LAN address (for example, configured via DHCP).


Adding Local IP Address to your Home Assistant instance can be done via the user interface, by using this My button:

Manual configuration steps

If the above My button doesn’t work, you can also perform the following steps manually:

  • Browse to your Home Assistant instance.
  • In the sidebar click on Configuration.
  • From the configuration menu select: Integrations.
  • In the bottom right, click on the Add Integration button.
  • From the list, search and select “Local IP Address”.
  • Follow the instruction on screen to complete the set up.
Sours: https://www.home-assistant.io/integrations/local_ip/
  1. Delete jiosaavn account
  2. Wgu information systems management
  3. Prison life script

How to determine hassio ip address

Edit: Nope, of course not. His setup is on Windows so that may or may not be the difference. I pulled up ipv4 and the information I put in was there, saved, but neither hassio.local nor the ip address worked to load HA. Now nothing works and I’ve been trying it to work for the last 4 hours since posting this. I did learn, however, all I had to do from the “hassio >” prompt was type “homeassistant info” to get the ip address. Its time for bed and I have to go get a ladder to pull the battery from a smart vent so we don’t have to watch it blink all night. AWESOME

For anyone that comes across this post by searching (as I did) I just watched a video on the youtube channel “The Hookup” trying to figure out another issue I have. This video, at about 7:45 lays out how to look at the ip address and set a fixed ip address. My machine is rebooting now, but I think this should take care of this issue. When I pulled up ipv4 information it didn’t show an address at all, now I have one chosen and hopefully my Fire tablet can look at it as it couldn’t pull up hassio.local. On to the next issue!

Edit: Nope, of course not. His setup is on Windows so that may or may not be the difference. I pulled up ipv4 and the information I put in was there, saved, but neither hassio.local nor the ip address worked to load HA. Now nothing works and I’ve been trying it to work for the last 4 hours since posting this.

Sours: https://community.home-assistant.io/t/how-to-determine-hassio-ip-address/33410
Home Assistant Beginners Guide: Installation, Addons, Integrations, Scripts, Scenes, and Automations


The integration serves all files and data required for the Home Assistant frontend. You only need to add this to your configuration file if you want to change any of the default settings.

There is currently support for the following device types within Home Assistant:

The option should only be used on a Home Assistant Core installation!

Configuration Variables

Looking for your configuration file?

server_host list | string (Optional, default:, ::)

Only listen to incoming requests on specific IP/host. By default the integration auto-detects IPv4/IPv6 and listens on all connections. Use if you want to only listen to IPv4 addresses. The default listed assumes support for IPv4 and IPv6.

server_port integer (Optional, default: 8123)

Let you set a port to use.

ssl_certificate string (Optional)

Path to your TLS/SSL certificate to serve Home Assistant over a secure connection. If using the Let’s Encrypt add-on this will be at .

ssl_peer_certificate string (Optional)

Path to the client/peer TLS/SSL certificate to accept secure connections from.

ssl_key string (Optional)

Path to your TLS/SSL key to serve Home Assistant over a secure connection. If using the Let’s Encrypt add-on this will be at .

cors_allowed_origins string | list (Optional)

A list of origin domain names to allow CORS requests from. Enabling this will set the header to the Origin header if it is found in the list, and the header to . You must provide the exact Origin, i.e., will allow requests from but not.

use_x_forwarded_for boolean (Optional, default: false)

Enable parsing of the header, passing on the client’s correct IP address in proxied setups. You must also whitelist trusted proxies using the setting for this to work. Non-whitelisted requests with this header will be considered IP spoofing attacks, and the header will, therefore, be ignored.

trusted_proxies string | list (Optional)

List of trusted proxies, consisting of IP addresses or networks, that are allowed to set the header. This is required when using because all requests to Home Assistant, regardless of source, will arrive from the reverse proxy IP address. Therefore in a reverse proxy scenario, this option should be set with extreme care. If the immediate upstream proxy is not in the list, the request will be rejected. If any other intermediate proxy is not in the list, the first untrusted proxy will be considered the client.

ip_ban_enabled boolean (Optional, default: false)

Flag indicating whether additional IP filtering is enabled.

login_attempts_threshold integer (Optional, default: -1)

Number of failed login attempt from single IP after which it will be automatically banned if is . When set to -1 no new automatic bans will be added.

ssl_profile string (Optional, default: modern)

The Mozilla SSL profile to use. Only lower if you are experiencing integrations causing SSL handshake errors.

The sample below shows a configuration entry with possible values:

The Set up encryption using Let’s Encrypt blog post gives you details about the encryption of your traffic using free certificates from Let’s Encrypt.

Reverse proxies

When using a reverse proxy, you will need to enable the and options. Requests from reverse proxies will be blocked if these options are not set.


On top of the integration is a REST API, Python API and WebSocket API available.

The platforms are not real platforms within the meaning of the terminology used around Home Assistant. Home Assistant’s REST API sends and receives messages over HTTP.

HTTP sensors

To use those kind of sensors or binary sensors in your installation no configuration in Home Assistant is needed. All configuration is done on the devices themselves. This means that you must be able to edit the target URL or endpoint and the payload. The entity will be created after the first message has arrived.

Create a Long-Lived Access Tokens in the Home Assistant UI at the bottom of your profile if you want to use HTTP sensors.

All requests need to be sent to the endpoint of the device and must be POST.

IP filtering and banning

If you want to apply additional IP filtering, and automatically ban brute force attempts, set to and the maximum number of attempts. After the first ban, an file will be created in the root configuration folder. It will have the banned IP address and time in UTC when it was added:

After a ban is added a Persistent Notification is populated to the Home Assistant frontend.

Hosting files

If you want to use Home Assistant to host or serve static files then create a directory called under the configuration path (). The static files in can be accessed by the following URL , for example would be accessed as .

If you’ve had to create the folder for the first time, you’ll need to restart Home Assistant.

Files served from the folder ( url), aren’t protected by the Home Assistant authentication. Files stored in this folder, if the URL is known, can be accessed by anybody without authentication.

Binary Sensor

The HTTP binary sensor is dynamically created with the first request that is made to its URL. You don’t have to define it in the configuration first.

The sensor will then exist as long as Home Assistant is running. After a restart of Home Assistant the sensor will be gone until it is triggered again.

The URL for a binary sensor looks like the example below:

You should choose a unique device name (DEVICE_NAME) to avoid clashes with other devices.

The JSON payload must contain the new state and can have a friendly name. The friendly name is used in the frontend to name the sensor.

For a quick test can be useful to “simulate” a device.

To check if the sensor is working, use again to retrieve the current state.


In this section you’ll find some real-life examples of how to use this sensor, besides , which was shown earlier.

Using Python request module

As already shown on the API page, it’s very simple to use Python and the Requests module for the interaction with Home Assistant.

Using httpie

is a user-friendly CLI HTTP client.


The HTTP sensor is dynamically created with the first request that is made to its URL. You don’t have to define it in the configuration first.

The sensor will then exist as long as Home Assistant is running. After a restart of Home Assistant the sensor will be gone until it is triggered again.

The URL for a sensor looks like the example below:

You should choose a unique device name (DEVICE_NAME) to avoid clashes with other devices.

The JSON payload must contain the new state and should include the unit of measurement and a friendly name. The friendly name is used in the frontend to name the sensor.

For a quick test, can be useful to “simulate” a device.

You can then use again to retrieve the current sensor state and verify the sensor is working.

For more examples please visit the HTTP Binary Sensor page.

Sours: https://www.home-assistant.io/integrations/http/

Ip home assistant

Using Home Assistant to Expand Your Home Automations


Installing Home Assistant

To get started, we'll first need to install Home Assistant by downloading the image for your device. Home Assistant's installation page does a great job outlining how to flash the image to your SD card, but after you download your image you'll need to install Hass.io by connecting your SD card to your computer and flash the image using a program called balenaEtcher.

Providing an Internet Connection

Next we need to make sure your Pi will have an Internet connection. To get up and running fast and reliably we'll be using a hardwired connection to our router. But if you'd prefer WiFi, you can either use a blank USB stick with a Fat32 partition (with the partition labeled "CONFIG"), and while in the root (/) directory, create a file. Or on the Hassio SD card first bootable partition, create file. For the structure of the network file, follow the HassOS howto.

Once the network has been setup, insert the SD card and USB stick, if used, into the Pi. Connect power to the Pi, and wait for the OS to boot. For this first boot, Home Assistant will download the latest version, which will take ~20 minutes.

After the very long first boot, you will be able to reach your device from a browser at http://hassio.local:8123 (assuming your router supports mDNS). If your router doesn't support mDNS, or you're unsure, you'll need to use the IP address of your Pi instead (e.g. You can find the IP address by logging into your router (typically by typing into the address bar of your browser), finding your Pi (should be named hassio).

HassIO IP image

Click the image for a closer look.

Logging in to Home Assistant

Once Home Assistant has finished updating and you're able to connect to the Pi, you should be greeted with a login screen to create a user name and password to log into Home Assistant. Make sure to keep track of the login used. we'll need those credentials later when we set up our ESP devices.

Home Assistant Account Creation

Once logged in, you'll be welcomed by the home screen. Home Assistant will automatically scan your network to add devices. You may receive a few notifications to set up the devices found, typically these are home media devices, such as Google cast, Plex, etc.

Home Assistant Home Screen

Click the image for a closer look.

Sours: https://learn.sparkfun.com/tutorials/using-home-assistant-to-expand-your-home-automations/installing-home-assistant
Easily integrate your Cameras into Home Assistant Lovelace! - Reolink

Companion App Networking

Having your Home available anywhere and everywhere you go is important, whether you forgot to turn off the stove or you want to check the camera views because of an alert.

Because we want your smart home to be private and secure on the web, many parts of the puzzle need to align just right so everything works as you expect. This guide aims to help you understand the requirements, some of the complexities and our recommended typical solutions to setting up network access to your Home Assistant instance:

The basics: How the app talks to your Home Assistant#

In order for the app to talk to HA, it needs to know its address. Just within your home network you might know that your Home Assistant is on an IP like and listening on port 8123. If you use Home Assistant OS and haven't changed any of the defaults, Home Assistant will also be reachable at http://homeassistant.local:8123. This is all fine and will work perfectly well as long as you never take your phone or tablet outside your home, but what if you do? The easiest way is to subscribe to Nabu Casa Cloud for the small monthly fee of $5 US, which will solve all this for you and you can (almost) stop reading here, as well as supporting further development of Home Assistant. Nabu Casa Cloud acts as a "smart" proxy on the internet, tunnelling your frontend in an encrypted manner from your home to your phone, regardless where you are and without requiring opening your home network to inbound traffic from the internet. If you don't want to use Nabu Casa Cloud (which is fine, but you should still subscribe and enjoy the warm feeling of supporting Home Assistant), you need HA to be accessible from the internet. This requires opening a port on your router and getting a name for your Home Assistant on the internet. While it is possible to have your HA use Port 8123 internally and have your router do a port-forwarding from say the default https port of 443 to 8123, we recommend you NOT do this for reasons of simplicity which we will explain later. You also need a name for your Home Assistant as homeassistant.local is a private domain suffix that does not exist on the internet.

Dynamic DNS#

Most non-business internet connections have at least one of two drawbacks: Your internet service provider typically does not give you a static IP (meaning the public IP address your modem/router is assigned will change every once in a while or even every 24 hours) and some ISPs don't even give you a "real" IP address as they do not have enough addresses to give out. This last scenario is very common on cable providers and especially in Asia/Pacific. If your ISP says they use Carrier-grade NAT (CG-NAT) or something like Dual Stack lite (DS-lite) you likely will have this problem. If you're impacted please see the CG-NAT and IPv6 addendum. For dynamic, public IP addresses the solution is simple: Typically users choose a dynamic dns service such as duckdns.org which will create a unique name (e.g. ) that is supported to be updated via your router to always point to your public address. If you have created the port-forward of TCP 8123 on your router's public interface to TCP 8123 on your internal Home Assistant IP (say ), your Home Assistant is now available on the web. You could declare victory at this point and stop but don't - because everything at this point is unencrypted and we want you to enjoy HA in a private, secure manner.

Hairpin NAT#

At this point of setting up we need to check one capability of your router: Hairpin NAT (otherwise known as NAT reflection or NAT loopback). What this means is the ability of your router to mirror a request from its inside (LAN) interface to its outside (WAN) address back to an internal IP address (in this case, your Home Assistant), thus reflecting or hairpinning the traffic. It's easy to check if this works: Just open a browser on your phone or PC while connected to your home network and opening - if it works, you have hairpin NAT working and can go on to the next section. Most current routers will support NAT hairpinning out of the box, there are however some routers (especially if you got your router from your ISP) that do not have this ability or have it disabled. If this is the case, you need to check if you can enable it on your router or, if you can't, you will need to set up Split Brain DNS.

Securing the connection#

We'll stay with our DuckDNS example. Using works, but anyone could be reading your traffic. Let's change that! The DuckDNS add-on will create a free, trusted and valid LetsEncrypt SSL certificate to use on your Home Assistant. Just follow the installation instructions here and here and you will have secure, public access to your Home Assistant. What's great about using the DuckDNS add-on is that it uses the LetsEncrypt DNS challenge, whereby during requesting the certificate it proves "ownership" of the domain by creating a temporary DNS record. If you use a different DNS provider other than DuckDNS, you can use the LetsEncrypt add-on for which supports proving ownership of the name either via the DNS or the http challenge. The latter requires port-forwarding TCP Port 80 on your router to your internal Home Assistant IP on TCP Port 80.

With Hairpin NAT working and SSL on your DNS domain you can now access Home Assistant securely both on the internet and at home and you should add to the section of your configuration.yaml. This is not strictly necessary but will help with auto-detection during onboarding of the iOS app, as the app will know where and how to reach your Home Assistant.

Split Brain DNS#

So what's this split brain DNS (also known as split horizon DNS, split-DNS) thing and why would I need it? If your router doesn't do hairpin NAT, you still need to access your Home Assistant via the public DNS name, e.g. . Why is that? Because valid encryption via https and SSL certificates only works for public DNS names. What this means is that the certificate name on your server needs to match the DNS name you enter in your browser or app. This is fine with hairpin NAT available but becomes an issue when it's not. In this case you need to "split" the answer your browser/app gets when it looks up the IP address behind - you need one answer for devices on your home network that points to the internal IP address of your Home Assistant (e.g. ) and another answer for when you're out and about (e.g. ). The easiest solution to this is to use the AdGuard Home add-on for Home Assistant. This can also be set up on some routers (e.g. pfSense or UniFi Security Gateways) but we'll continue on using our example guide with the tools provided via Home Assistant: So you've now installed the AdGuard Home add-on and changed the DNS server on your router DHCP settings to the address of your Home Assistant. You should now go to the AdGuard Home setting page in your Supervisor panel and there go to -> and select: Here you click and enter your and the internal IP of your Home Assistant, followed by clicking on . What happens now is that all DNS queries for the address from inside your home network will be answered by AdGuard via its own rewrite table, thus pointing toward the internal address of your Home Assistant instead of asking public DNS servers on the web which will all answer with the public IP of your router. Even if you don't need split brain DNS, you may also want to set this up as it will enable you to access Home Assistant via it's public name even when your internet connection is down and hairpin NAT won't work. One less dependency on the Cloud!

Setting up the iOS app#

If you've followed all our advice, your app should find your Home Assistant instance automatically during onboarding when connected to your home wifi network. You can also go through onboarding anywhere you're connected to the internet by manually entering and the setup will finish with that address in the field in the app connection settings. There should be no need to enter an internal URL as the same address will work regardless of where your phone is connected. If you want to (or have to) use Nabu Casa Cloud, there are two more steps required:

  • In iOS settings, set location access permissoin for Home Assistant to Always. This is required because starting with iOS 13, Apple will only let apps with such permission have access to the wifi SSID which is used by the app to determine whether to use internal or external URLs.
  • Once permission is given, add your Home Assistant address to internal URL (if you come from the top of this article, this could be
  • If you've set up Nabu Casa Cloud in your Home Assistant the checkbox to "Connect via Cloud" should now become available. Once you activate the checkbox, external URL will become deactivated.

Addendum: CG-NAT#

If your ISP doesn't give you a public IPv4 address you're down to basically only two solutions: You can call your ISP and ask if they can give you a real address or if there is an upgrade for your connection available (oddly enough, asking nicely will work with many ISPs out there) or use Nabu Casa Cloud.

Addendum: IPv6#

Since IPv6 has been rolling out for the last 20 years, chances are that along with an IPv4 address your home network will also have been provided with IPv6 addresses from your ISP. So your Home Assistant host may have it's IPv4 address of as well as an IPv6 address of . Here's where our advice for not changing the TCP port you forward to Home Assistant comes in:

  • Home Assistant will listen for traffic on and
  • If you really want to future proof your setup, you will have two DNS records for : An A-record pointing to your routers public IPv4 address which will be port-forwarded to your HA hosts internal address and an AAAA-record, which points directly to the IPv6 address of your HA host. Now when you access your HA remotely either protocol could be used, since all you're entering will be . If you had changed the Port on your Router to the https default 443, the connection would now fail if you suddenly ended up with a working IPv6 setup as nothing is listening on .

Addendum: Reverse Proxy via NGINX#

There are cases when having Home Assistant serve https is impossible or incompatible with some of your devices. This can be especially true with ESP-based low power IoT hardware that communicates via RestAPI and just doesn't have the horsepower to do the SSL encryption. One example is the konnected.io Integration which requires Home Assistant to be reachable via http. So to accomodate this and still have encryption for external access, we use a reverse proxy like NGINX. What a reverse proxy does is to act as an intermediate for your clients (Browser or App). The client talks to the reverse proxy securely via https and the proxy passes through this traffic to Home Assistant over an unencrypted http connection. Staying with our Home Assistant example, we'll assume you have already set up DuckDNS and LetsEncrypt. You should now install the NGINX Home Assistant SSL proxy add-on for Home Assistant and configure it according to the docs.

In your configuration.yaml file the following changes are needed:

Once that's done your router's port-forwarding should be to your Home Assistant internal IP . Do NOT create a forward to as that is now unencrypted http and should only be accessible from your local network. You can now access your Home Assistant via both internally and externally while having available to be used as unencrypted endpoint for things like . Note: If you don't use the NGINX Home Assistant add-on but instead roll your own, please ensure that websockets support is enabled.

Sours: https://companion.home-assistant.io/docs/troubleshooting/networking/

Now discussing:

Given the function Home Assistant will play in your Home Automation Environment, it is very important you ensure that you assign a static IP to your instance. This will ensure that any other devices or systems within your setup always know how to connect to Home Assistant within your network.

This process will require some basic technical understanding – in particular knowledge of how to access your routers settings.

Open II Configuration within Home Assistant

Set an IP within Home Assistants Configuration

Technically speaking this step might not be required as the subsequent step to configure your router could supersede this. However, some routers may only allow to to make static the current IP. So if you want this to be a specific IP its worth changing this directly within Home Assistant first.
Open Up your Home Assistant console. Click Supervisor from the left, select system from the top right. Find the IP address and click change.

Expand the IP v4 tab

Click the downward arrow next to IPv4.

Set IP detail

Arrow 1 = Click Static IP, this will open up the IP address detail that can be changed.
Arrow 2 = This is the IP address. In this example I have used You can change any address within your routers range (and is not in use).
I would advise going above as those addresses are less likely to have been already automatically assigned by your router.
Also the format of your range might be slightly different to mine. Yours might be for example. Please check this before assigning an address. Open a command prompt and type ‘ipconfig /all’ on your laptop/PC.
Final note. Often when assigning static IP’s you do not include /24 at the end. This is a requirement of home assistant and for most users /24 will work just fine.
Arrow 3 = the address of your router. Most likely or Again, check this using the command prompt.
Arrow 4 = DNS servers. this again will be the IP address of your router unless you are using an alternate DNS method (if you are you probably don’t need this guide).

Reboot Home Assistant

Press Supervisor > System > Click the Reboot Host option.

Reserve the IP address in your Router

Depending on the brand of your router the interface will look and feel slightly different to one another. However, the fundamental process of reserving a static IP is fairly standard.
Please see our separate guide for setting a static IP within a router. This example involves a TP-Link router.

You will now have a static IP assign to home assistant. This is a fundamental step to setting up Home Assistant and we recommend you do this before adding any devices or setting any automations within your Home Assistant environment.

Sours: https://rapidlydigital.com/assign-a-static-ip-to-home-assistant/

1400 1401 1402 1403 1404