Hi everyone, I am new here and growing really desperate. I hope someone can help me.
I found out about HA a couple of weeks back and thought it was awesome! So i took out my Raspberry Pi 3+ 64 and gave it a try. At first everything worked perfectly, installation was easy, integrations worked so no issues. After a couple of days I could not connect to it anymore. Not via IP or searching on local network. I did not make a backup so I restarted from scratch.
Again everything went perfect, I used it for a couple of days and then nothing. So I read a lot in the forum and bought a new A2 64gb SD card. To be sure I decided to not use my backup and start with new.
Right now the situation is that I cannot connect to HA, neither with the old or the new SD card. I always get connection refused. On the router I can see the IP Address and everything but I just cannot connect. I tried connecting with HDMI and Mouse/Keyboard, and I get to the login screen without any errors. I checked the time and it is okay. Pinging also works.
So I really don’t know what to do anymore.
Where do you get the connection refused error? When you try to access http://ip-of-you-pi:8213
?
Which image did you flash?
When you attach the screen and keyboard to the pi, issue the following commands
ha core logs
And
ha supervisor logs
And post the results here
Ok, seems like Home Assistant is not running at all.
I’d suggest wiping your SD and install again from scratch, then wait at least 20 min after booting the Pi with the SD card inserted.
I flashed it again and still got the same error. This time the time was wrong, so I corrected it as described in this link Connection refused. Frontend doesn't load. Fresh install. Now I got the messages you see in the picture. At first I was happy since it says at the last line downloading new image. But after 30 minutes still nothing… I will wait and see what happens.
I’ve had the same issue and have been following along with your troubleshooting. After the above steps, mine is now working.
Hey! I am glad it worked out for you, please let me know what you did exactly, maybe I have made some mistake.
where your’s seemed to stop at “downloading a fresh one”, mine was almost instant and continued on with the install. Your’s is showing Oct 01, where mine is Sep 29
Is the Pi connected through an ethernet cable or WiFi? Do you see the pi in your network? It looks to me like the Pi can somehow not connect to the internet, because normally you shouldn’t need to adjust the time it should be automatically be pulled from the internet.
It is connected via Ethernet cable. I can see it in the router and I can ping it so internet connection should be fine.
What I did now is:
- Install old version I had on the pc. With the 12 at the end.
- Connect via hdmi and keyboard/mouse.
- Fix the time as explained in the other post.
- Pi downloads everything and starts just fine.
Then I moved it to the location I want to have it permanently and again nothing.
Moved it back, time was wrong again. Every time I reboot I have to go through the time fixing process again. Which kind of sucks because I do not have a screen where I want it installed.
Is there a way to permanently fix that error? Maybe change where it pulls the time from?
The Pi has no real time clock but you can add one via the gpio pins. I understand from your posts that your pi is 64 bit but would you install the 32bit image?
In any case the pi needs access to an NTP (Network Time Protocol) server on every boot but this article will perhaps guide you to adding your own RTC (Rel Time Clock) to the Pi.
https://pimylifeup.com/raspberry-pi-rtc/
The only other questions I would add is; how tight are your firewall rules? Is your router your DHCP server? Does it also provide network wide NTP? Are you moving ‘location’ to a different more secure network?
With a Pi I would recommend finding a suitable rtc hat.
I know it is more questions than answers but food for thought!
Isn’t setting the timezone part of the onboarding process? Maybe this fixes the issue.
I am using the 64bit version.
I think that adding a RTC would be the best option. I did not think of that, thanks!
Regarding the other questions.
Is there any special port or something that must be open in the firewall? Right now the firewall is not very strict since I thought that it might interfere.
Yes my router also acts as DHCP server but it does not provide the network with NTP. The router time is right though so maybe it would be an option to push NTP from Router? Not sure how to set it up in my router but I will give it a try. The other location is only instead of connecting it where my TV is, I want it connected at the same spot where the router is. So same network.
I also thought that timezone might be a problem, but when I get HA to work, timezone is correct and it updates to the current time. Also without the time fix I would not even get to set the timezone. Also timezone might be if it was off a couple of hours, but mine always gets set back to february.
Thanks for your input/ideas!
Which router do you have? make and model please?
Maybe I can help with some pointers!
Yep the RTC is a good option but I would also be tempted to use the 32bit software. You may need tis to access the GPIO on the Pi and as such attach the RTC. Besides it is listed as the recommended option.
It is a standard router you get in Spain with your fiber connections Sercomm FG824CD.
I never heard of it before and it probably is not the best router but I am kind of stuck having to use it. Since I also wanted to avoid making a 2 router setup. But I am starting to think that maybe the router is the problem.
Weird thing is that now I have the HA connected, after making the time fix, and it is working fine but still the clock is off. It just continued from the time I manually input, like it never updates it from the servers. I tried changing timezones or editing it in the configuration file but nothing. Could be the router is blocking it? Is there a way to force it to update the time? To see at least if I get an error message or something.
Found that this happens on a Raspi 4, when the USB Connection is underpowered. After using a stronger charger AND cable the problem went away.