Hi
possible solution without additional hardware, all based on the assumption that your Router is a Switch too:
take notes of the current IPv4 configuration on your PC
change the IP to a static IP in the 192.168.0.0/24 range, like for example 192.168.0.2
access the Raspi via the known IP, the IP of your Router should not matter in this case, at least the typical Routers for home use I know act as a simple Switch on their LAN-Ports
change the IP on the Raspi, using DHCP instead of static is a good advice
restart the Raspi
change the IP-Configuration back to what it was before
in the router configuration pin the IP to the device ( making it pseudo static)
Have not tried this additional alternative myself, just based on documentation:
there are also instructions on how to add a static IP in parallel to the DHCP-Address, like here:
Believe you did not say which OS your are using on the PC, assuming Windows. guess with Linux or MacOS you can do the same, but I do not have instructions for other OS
you would use that to add an IP in the 192.168.0.0/24 range, change the IP on the Raspi to be in the range of your new network
Advantage: you can still access all other resources from your PC
to remove after your Raspi is connected with the correct IP:
Iāve never tried using the LAN ports on a router as a switch- Iāll have to remember this for the future.
Yes, a simple switch would work instead of a crossover cable, but I was trying to give the OP the lowest-risk method of getting back into the Raspberry.
You donāt need a crossover cable almost everything made in the last ~10 years has Auto-MDIX and the Raspberry Pi is no exception. Just use whatever cable you have to connect your laptop to your Pi.
Does anyone know if DHCPCD is what I want for DHCP?
Sorry I didnāt mention I have macOS!
Right now my RPi4 boots from usb so I removed it and put the micro SD card back in and it was able to manually connect to the wifi. Also able to ssh into from my mac once plugged into ethernet.
So Iām just trying to understand why I shouldnāt create a static ip for my raspberrypi and use DHCP?
I am willing to do whichever but really I want to do whatās simplest for a beginner in order to get the system back up.
I would really encourage you to use a dynamic IP setting on the Pi and to use a feature available in most recent routers to allocate a static IP to your Pi based on its MAC address as Steve mentioned here.
Initially you dont need to use the assignment and the Pi will get a dynamic IP address from your router. You said you could see the clients list in your router and that will tell you the current IP of the Pi
I have an hdmi plugged into my raspberryPi and I have it booted through usb showing the Home Assistant. I have noticed that my raspberry pi now shows up on my router device list but the ip is empty/blank but the ip of the ethernet is the ip of the router, 192.168.12.1?
Also HA core still shows my old ip, 192.168.0.25. How can I change my ip through the HA command line to my new static ip, 192.168.12.159?
At the moment none of the ipās bring up my homepage/lovelace dashboard.
DHCPCD is the DHCP client on a Linux system. It is loaded with the Raspian OS.
You have been advised at least ten times here to NOT USE static IP on the Raspberry Pi. Unless you know what you are doing and have a good reason to not let the router assign a permanent IP lease (AKA static IP) from the DHCP server in your router. From your questions, I really doubt that you do.