I have done a redirection of this IP to be able to access my HA from outside … but anyone can tell me if this IP is a fixed IP or a DHCP ? I can’t find this information anywhere …
In case it is a DHCP address, I would like to make it fixed for the redirection to continue in future …
Also do you know what are the 2 other IP’s next to my local one ?
The 192.168 address is likely DHCP assigned by your internal DHCP server (router?).
Be aware this is definitely not your external IP Address which would be assigned by your ISP. This address is likely dhcp too as it is cheaper for your ISP to provide this. You will not be able to make it static. You will likely need to pay your ISP extra for a static address or use some service to determine when it changes and what it changes to. If you search the internet for “what is my ip” you will likely find out what your current external IP Address is.
I have this service as my ISP indeed change the WAN IP address every 48 hours I think.
This service is running on my NAS to check the newly assigned WAN IP address and link it to my domain, this is not an issue …
But I have on my router a redirection of the IP assigned to HA (192.168.1.63) to this domain … but if the address of HA is changing, then I am in trouble because my redirection will not work anymore.
Reason why I am asking how to make the HA IP address static.
I can not find that anywhere …
Go to section labeled as “Configure Network Interfaces”, Choose IPv4 or IPv6, choose static and fill it in with your chosen IP, Netmask, Gateway and DNS.
Setting the IP t the Device is considered best practice, and MAC-IP matching at your Router or DHCP server as backup if setting at the device is not an option.
I have mixed feelings about the best practice here, given that many IOT devices do not have an interface to fix the IP and I had to go fixing them over router, I prefer to manage all of them over router rather than split mechanism (some over device and some over router). Eventually, I have moved all these into router to unify the mechanism.
Opening 8123 on the internet is not a good practice, there is no encryption on that connection by default and AFAIK no penetration testing has been performed on HASS.
Most folks use a VPN, nginx or cloudflare tunnel to connect securely to HASS from the internet.
Full disclosure I am not a network guy, but I did here recently from a friend I was helping that I probably know more than most so there is that.
I had the same consternation as you as am fairly anal retentive and want all of my settings for something like that in one place. When I found I had a couple of devices where I couldn’t set it I was going to migrate them all over to my firewall/router.
I asked a network engineer that I have worked with for years in my day job, and his response was that hard coding it to the device is the best way if you can. He basically said, all of those services that match an IP to a MAC are part of a software stack. That software stack can crash, or depending on the type of router you may have to restart the service. In addition, as he stated if you hard code to the device there is some things you can still do.
I am not a fan of mixing where I store my individual device IPs, as this resulted in me keeping a spreadsheet to keep track of them all. NOTE: That thing is now a lifesaver as I blocked the first 100 addresses off for static items and I am now getting close to using them all up (most of this is because of home assistant). OK my “oh look a squirrel” rant is over.
So yeah I take those guys word for it, so hard set it on the device as often as you can.
This is an oxymoron. I used to make my devices all static IP, until I lost my spreadsheet… Then I was blind. My best practice is to avoid static IP addresses altogether and let the router do all the work. The only device that has a static address is my router at 192.168.1.1
For my IOT devices, I simply tell the router to give the IP a permanent lease (aka static IP or fixed IP or other way to convey to the user that the IP won’t change). This means that the router remembers the MAC address of the device and when it sees it come online, it will assign the same IP to it.
I am well aware of how the router works. It makes a MAC-IP match which is managed by the router.
I can still access say for example, my WLED, if my router goes down. Those who rely on their router, not so much. Heck my router can go down and some stuff will still work in my environment. Others not so much.
The spreadsheet is a good practice either way for tracking purposes.
I have my way, which I asked who I consider experts in the field their advice, you have yours. We don’t have to agree, but I won’t be an oxymoron either.
My explanation was for the benefit of others who may be researching a similar question. Not specifically you.
On further thought, your post is not an oxymoron, it is instead maybe a non-sequitur.
Your system will work fine until your spreadsheet is out of sync with your devices and you assign the same fixed IP to two devices.
One thing to note from personal experience is that in a home environment, in the event of a power cut both the router and HA box will reboot at the same time and it may be that this will result in a race condition where the HA box comes up before the router’s DHCP server is available. My experience of HAOS is that this will often result in the HA box being left in an offline state until physically rebooted - not something easily done if you are not at home.
OK, so you can run a UPS to protect both devices, but this will be relatively rare for most home users. For this reason I would recommend allocating a locally configured, static IP address to HA unless you can be very sure that the DHCP server will be available at the point that the HA host restarts.
Regarding the tracking of IP addresses, I just add a manually-defined hostname to the DNS server on the router, which gives both local name resolution as well as a convenient way to keep track of IP addresses being used.
I agree as was mine. Static IPs at the device level is still preferred over router controlled.
If my device is running it will have an IP. Your solution is if my device is running AND my router is operating then it will have an IP.
You are fine with yours, and I am fine with mine. I like knowing my router can take an absolute crap, and I can still get into a vast majority of my devices.
That will literally never happen. I add a device, go to the sheet & find an IP, and use it. It won’t ever be out of synch unless I screw it up.
Your system is fine as well until you lose your router.
I used to assign devices their own fixed IP’s but I got caught when I retired an old device but later reinstalled it and created an IP address conflict. Bad record keeping I know. Also when I expanded my network it required a new network subnet being used and manually updating every device.
So I moved to address reservations on my router and it’s been great. It even creates nice spreadsheet like IP listings and no possibility of IP conflicts. The MAC to IP allocations can be moved to another router should that original router be retired or fail. Existing devices can be moved to another network and just work as they are using DHCP. A fan of this approach.
Some key devices do have static IP’s - I have those outside of my DHCP range.
It’s worth noting that you don’t need to configure everything with a static IP. e.g. out of my whole network (a tragic 120+ devices!), only a handful of devices are configured with proper static IPs and the rest are just normal DHCP-addressed. The ones that are static are those that are mostly security related, or critical functionality - alarm panel, CCTV NVR, firewall, pi-hole, HA. Also a few infrastructure bits - docker host, managed switches and the like - which don’t strictly need to be, but it’s nice to know I can always connect to them if everything else is broken!
Everything else - dozens of ESPHome devices, assorted smart-home hubs and switches, smart TVs, hubs and the such like - are all DHCP, mostly in appropriately ringfenced subnets to keep them away from the bits that are important - laptops, phones and the like, but these are still DHCP-managed. Overall I’ve got 8 statically configured IPs - way less than 10 % of the whole network - but as these are the bits that make the rest work, I’m cool with this.
Good call on separating DHCP scope from the static range too. Makes life so much easier and noone needs a DHCP server assigned addresses already in use (which it will do if not explicitly told not to!)
Assuming the dhcp server runs on the router…and there is no fallback dhcp server…
I export my dhcp reservations regularly, and if my router dies, i can easily set up another dhcp else where….dhcp doesn’t need to run on a router specifically
I was using router as a generic placeholder, but yes I think everyone in this thread agrees it really comes from the DHCP function which can be standalone OR part of another piece such as HA or your router.
Either way, you export and have to spin up a new instance if it goes down.
Setting it on the device, my DHCP serving piece of equipment can go down and I can still access many of my devices directly knowing the IP.