I mean, you might want to look at the forums again - have a count how many people are asking for YAML help - despite the very YAML they are needing help with, either already being able via a forum search, or it’s actually documented on the Home Assistant documentation site.
68% of people are running Home Assistant OS, and almost half of people are running on a Raspberry Pi 3 or 4. I’m not sure why you believe that Home Assistant is only used by people with deep technical knowledge.
Regardless - ALL consumer routers, allow you to reserve or pin an IP address that a device has been provided by DHCP, obviously they have to provide that ability - because otherwise it would impossible to do port forwarding.
The same applies if you are not using a consumer router, and in fact if you are not using consumer router - then you can reserve an IP address by MAC address - and that gives you the ability to decide your own IP address to provide to the device.
In neither of these options have we needed to actually give the device itself a static IP address.
If you do need to give the device an IP address though - since you have decided to respond to a post that is now a YEAR old. You can in fact do it directly from the settings page in the Home Assistant GUI
Good question. My system automatically set up the profile, so I’m not so sure.
First let’s see what there is (type each of the following): nmcli connection show - just to verify there are no other profiles. nmcli device status - to see if there are any interfaces.
If “Supervisor enp11s0” is the only profile, and you have an interface enp11S0, then you may be able to add the interface to the profile using: nmcli con add con-name "Supervisor enp22s0" ifname enp11s0 type ethernet
So it looks like my connection is showing as disconnected when I run the status command:
For a little context this is running under ESXi 7.0U2 and had been working successfully for some time. Recently I had issues as Veeam tried to backup the VM (it creates snapshots) and subsequently it wouldn’t boot. I resolved that issue and now I have this one…
I ran the: nmcli con add con-name "Supervisor enp22s0" ifname enp11s0 type ethernet command successfully but it has now created two profiles:
Although it looks as if the actual problem is the adapter showing as disconnected.
Sorry, I think I was fiddle-fingering my response and mistyped the profile name.
Since the interface name is shown as enp2s1,
try: nmcli con add con-name "Supervisor enp11s0" ifname enp2s1
I guess its an old statement, but if you look in a bigger picture. Cloud providers are using endless leasetime DHCP. Its just simpler to handle the IP outside of the OS.
Your statement is more true like in the 1990s, early 2000s where CPU and RAM was limited, but today its not the case anymore.
Simple example. My home network contains about a hundred devices. It’s a large area and several buildings connected by cable and radio bridges. Of course I have a lot of wifi access points, some of which are routers set up as access points. One of these access points went crazy (maybe it was updated incorrectly or some other failure). It so happened that during a scheduled reboot of the central router, there was no electricity in part of the buildings at night. When it appeared, this crazy access point turned on its own dhcp server, distributed its addresses in its segment and decided that it was the main gateway. As a result, a whole segment of the network was completely lost to “smart devices” even though everything looked like it was working. Thus, all dhcp-dependent devices were affected by this failure. At that moment only those devices in which ip, gateway and dns were manually set, worked correctly. Of course, this is not a normal situation, and this “too smart” router went to the local flea market, and its place was taken by one that will not be able to do anything on its own.
I’m sure that the use of dhcp is applicable to such devices as smartphones, tablets, TVs and other devices for which ip address is not important in most cases. Well, or those in which it is impossible to set the address manually (the same sensors and tuya outlets). In such cases you need to assign ip addresses in the router with binding to mac. But such things as servers should be configured manually. And the range available for dhcp should be limited to a small and reasonably sufficient segment.
I was looking everywhere for exactly this. I was caught in a terrible loop where HA wouldn’t get an IP address so it couldn’t reach the time server, so it didn’t boot properly, etc.
I managed to change my IP address via CLI using the following commands:
network info to find the correct network adapter and see your current IP address set for HAOS
network update eno1 --ipv4-method auto --ipv6-method disabled (“eno1” needs to be replaced by your network adapter)
network update eno1 --ipv4-gateway 192.168.x.x (“eno1” needs to be replaced by your network adapter, “x” needs to be replaced by your IP gateway, probably router IP)
After doing this, my Fritz!Box auto-assigned showed an IP address for Home Assistant again.
This is real magic. I was trying to solve the issue for last three hours with no luck. Tried all options nothing has worked. Finally with just two commands, able to resolve the issue. Thanks a ton for this instruction.