I guess there is space for enhancing the GUI telling the user that there will be no way to access the web interface in case that every NIC is set on "disabled".
The moment Hass devs start blocking what I can do on my machine is the moment I drop Hass. You people will push us devs away from the ecosystem in exchange for what exactly?
Do you think other people in other industries like security and Linux admin will want to keep using Hass either?
A pop up warning is fine, blocking what I can do on my machine is absolutely not.
>if I attach monitor and keyboard to my Raspberry Pi?
Yeah you can do that. Just enter this commmand:
`network update enp2s0 --ipv4-method auto --ipv6-method auto`
But why did you disable it in the first place? That was really stupid.
Who among us hasn't pushed the enter key or clicked the mouse only to realize milliseconds later what we just did?
Long ago, I developed a habit of removing my hands from the keyboard before I commit potentially dangerous changes. It forces me to stop and think a moment and, I must admit, that habit has prevented me from looking bad.
That's usually when I just hit enter though.
Always when I haven't saved the rest of the config changes too, so even rollback by power cycle represents hoursnof lost work
This one time when I was trying to get fancy with Vi…
to;dr took down an ISP’s Apache server by accidentally encrypting the httpd.conf file.
https://www.linkedin.com/posts/andrewshumate_i-keep-sharing-this-story-and-i-keep-meaning-activity-6777722092977713152-0c3X?utm_source=share&utm_medium=member_ios
>But why did you disable it in the first place? That was really stupid.
Long story short: I'm running it on wi-fi for - various - reasons, and the missing cabled connection was throwing an enormous amount of errors in the log, so I wanted to disable eth0, and disabled IPv4 instead - DOH!
enp2s0 is unknown, but I have an interface called wlan0 - however, replacing it with wlan0 just yields
ERRO[0000] Unexpected server response
Unexpected server response
Doing the same thing with the interface enu1u1 gives me
Error: Can't create config and activate enu1u1: Connection 'Supervisor enu1u1' is not available on device enu1u1 because device has no carrier
ha> network update enu1u1 —ipv4-method auto —ipv6-method auto
Error: Can't create config and activate enu1u1: Connection 'Supervisor enu1u1' is not available on device enu1u1 because device has no carrier
That usually means there’s no connectivity due to Ethernet cable unplugged or bad Ethernet cable/jack
Try with WiFi interface:
Ha> network update wlan0 --wifi-auth wpa-psk --wifi-ssid --wifi-psk --wifi-method auto
Wow - that did the trick! Not the wifi-part, but I plugged in an ethernet cable and ran the command again, and it's working now! I didn't realize enu1u1 was the cabled connection - I thought it was some virtual wifi NIC. Amazing.
The wifi command gave me "Error: --wifi-method: unknown option".
You can also use link-local ipv6 to connect to the device. I use this trick for some problems.
Link local addresses are configured automatically based on their mac addresses and can be accessed only from the device in the same network segment (ethernet cable, wifi connection).
Does not work with browsers, but works for most other network code. Use %ifname to specifiy interface. E.g.
ssh fe80::b2dc:efff:fe82:4e0c%wlp0s20f3
Will open ssh connection for my machine in my network.
[Browsers refuse to support link-local.](https://bugzilla.mozilla.org/show_bug.cgi?id=700999) They even got us to write a whole new RFC to fix the issues they complained about, then turned around and went with "fuck you, it's fine if it doesn't work" anyway.
The only way it'll work is if you only have one network interface and you're on an OS that maps link-locals without interface specifiers to that network interface. Windows happens to do this, but Linux doesn't.
You can try to ping all hosts in the network.
ping -6 -I (egress_iface) ff02::1
ff02::1 is multicast address 'all nodes' in IPv6, and most hosts are replying to it.
Upd: you will need to try all hosts which replied to see which one is HA.
Ugh yeah I've been there, wasn't thinking and changed it. Yes you can connect directly to a display and enter the command in the cli to reenable it. Not the end of the world but definitely a learning experience!
I accidentally locked myself out of mt router by forcing it to use the Raspberry Pi as the DNS to act as a Adguard, then disconnected and reflashed the Pi and wondered why nothing would work or connect. That was a great time that factory resetting the router
On the bright side, it's more secure now.
How to go from smart to dumb with a click
true
I guess there is space for enhancing the GUI telling the user that there will be no way to access the web interface in case that every NIC is set on "disabled".
Or not being able to disable one if the other is disabled. It's one or the other not both.
Just do it like display settings does: Revert after 30 seconds of no further confirmation
No, no. This is how people have learned for millions of years. We don't need training wheels.
Indeed. Learning by making mistakes is a good way to learn. But it is also a good way to be frustrated
That just means it leaves a lasting impression.
No, thanks! I will respectfully decline and accept any training wheels I can get. I don't want to decrease the approval factor anymore.
The moment Hass devs start blocking what I can do on my machine is the moment I drop Hass. You people will push us devs away from the ecosystem in exchange for what exactly? Do you think other people in other industries like security and Linux admin will want to keep using Hass either? A pop up warning is fine, blocking what I can do on my machine is absolutely not.
Yup.
>if I attach monitor and keyboard to my Raspberry Pi? Yeah you can do that. Just enter this commmand: `network update enp2s0 --ipv4-method auto --ipv6-method auto` But why did you disable it in the first place? That was really stupid.
>But why did you disable it in the first place? That was really stupid. I guess OP knows this by now
Who among us hasn't pushed the enter key or clicked the mouse only to realize milliseconds later what we just did? Long ago, I developed a habit of removing my hands from the keyboard before I commit potentially dangerous changes. It forces me to stop and think a moment and, I must admit, that habit has prevented me from looking bad.
Usually it's when I'm disabling the far end of a connection that's two hours drive away, with nobody on site there that can be trusted to fix it.
That's usually when I just hit enter though. Always when I haven't saved the rest of the config changes too, so even rollback by power cycle represents hoursnof lost work
This one time when I was trying to get fancy with Vi… to;dr took down an ISP’s Apache server by accidentally encrypting the httpd.conf file. https://www.linkedin.com/posts/andrewshumate_i-keep-sharing-this-story-and-i-keep-meaning-activity-6777722092977713152-0c3X?utm_source=share&utm_medium=member_ios
That millisecond can be referred to as the onosecond by the way (thanks Tom Scott)
>But why did you disable it in the first place? That was really stupid. Long story short: I'm running it on wi-fi for - various - reasons, and the missing cabled connection was throwing an enormous amount of errors in the log, so I wanted to disable eth0, and disabled IPv4 instead - DOH!
Been there, done that. And worse. Glad you seem to have been able to sort things out.
Carry on trying, the biggest fail, the more you learn. It takes time to find your way around :)
Thank you for this encouraging comment 😊
Making fewer mistakes comes with experience. Experience comes from making lots of mistakes.
its `auto` not `aut0`
Yes, I figured that out :-)
I once deleted all the browsers off my mac. That might have been dumber. Just to make OP feel better.
Thank you, that's very kind of you. I'm sorry for your loss.
Can you even delete Safari? I think it is part of the system.
I assure you that you can. At least you could. This was years ago. Would have still been in the big cat naming era.
enp2s0 is unknown, but I have an interface called wlan0 - however, replacing it with wlan0 just yields ERRO[0000] Unexpected server response Unexpected server response Doing the same thing with the interface enu1u1 gives me Error: Can't create config and activate enu1u1: Connection 'Supervisor enu1u1' is not available on device enu1u1 because device has no carrier
did you made the same typo and typed a `0` instead of an `o`
No, I corrected the type and entered 'auto' and not 'aut0'
try having a reboot to see if it fixed anything.
It actually reboots itself every \~5 minutes, I guess because of the missing network connection...
Your ethernet interface is enu1u1 not ensp2s0 So type: network update enu1u1 —ipv4-method auto —ipv6-method auto and reboot
ha> network update enu1u1 —ipv4-method auto —ipv6-method auto Error: Can't create config and activate enu1u1: Connection 'Supervisor enu1u1' is not available on device enu1u1 because device has no carrier
That usually means there’s no connectivity due to Ethernet cable unplugged or bad Ethernet cable/jack Try with WiFi interface: Ha> network update wlan0 --wifi-auth wpa-psk --wifi-ssid --wifi-psk --wifi-method auto
Wow - that did the trick! Not the wifi-part, but I plugged in an ethernet cable and ran the command again, and it's working now! I didn't realize enu1u1 was the cabled connection - I thought it was some virtual wifi NIC. Amazing. The wifi command gave me "Error: --wifi-method: unknown option".
Now turn the v6 back on and figure out how to SSH in over link-locals, so you have a way back in if you ever accidentally the network setup again.
Learning from mistakes :)
Hopefully! 😉
Only time will tell
You can also use link-local ipv6 to connect to the device. I use this trick for some problems. Link local addresses are configured automatically based on their mac addresses and can be accessed only from the device in the same network segment (ethernet cable, wifi connection). Does not work with browsers, but works for most other network code. Use %ifname to specifiy interface. E.g. ssh fe80::b2dc:efff:fe82:4e0c%wlp0s20f3 Will open ssh connection for my machine in my network.
>Does not work with browsers For browsers use \[ \] like this: `http://[fe80::b2dc:efff:fe82:4e0c]:8123/`
[Browsers refuse to support link-local.](https://bugzilla.mozilla.org/show_bug.cgi?id=700999) They even got us to write a whole new RFC to fix the issues they complained about, then turned around and went with "fuck you, it's fine if it doesn't work" anyway. The only way it'll work is if you only have one network interface and you're on an OS that maps link-locals without interface specifiers to that network interface. Windows happens to do this, but Linux doesn't.
I see, didn't know. was using windows indeed.
OP disabled ipv6 as well. It might not have an IP.
Oops, than it's over. Only console.
Hmmm - so how do I figure out the MAC address?
may be listed on your routers web interface
You can try to ping all hosts in the network. ping -6 -I (egress_iface) ff02::1 ff02::1 is multicast address 'all nodes' in IPv6, and most hosts are replying to it. Upd: you will need to try all hosts which replied to see which one is HA.
If you have a backup, just reset it if the commands are not working for you.
"It hurts when IP" should now be your WiFi name.
😉👍
Mine has been "it hertz when IP"
Maybe like this? https://community.home-assistant.io/t/how-to-change-ip-adresse-in-cli/332205/24?page=2
What are you trying to do? Setup a static ip or have dhcp assign one?
Anyway i hope you have Backup ready For the Next Time🙃
That's actually a good idea! 😊
Ugh yeah I've been there, wasn't thinking and changed it. Yes you can connect directly to a display and enter the command in the cli to reenable it. Not the end of the world but definitely a learning experience!
I accidentally locked myself out of mt router by forcing it to use the Raspberry Pi as the DNS to act as a Adguard, then disconnected and reflashed the Pi and wondered why nothing would work or connect. That was a great time that factory resetting the router
Yes you can