What works when you have no internet?

So I lost my internet for a couple of days and I found out that my automations that either triggered by time or sun event failed to fire.

Is there any overview of what integrations require internet?

2 Likes

It would be awesome to be able to search for this specifically.

Until I know of that option, I’ve switched as much as possible to ESPHome, which all works for me offline (assuming local WiFi is up).

1 Like

Automations triggered by time should absolutely still work.

It sounds like maybe time sync was lost, which would explain why the time trigger failed. That’s more likely a problem with the way you installed Home Assistant (Core), not Home Assistant (Core) itself. I know others using the method previously known as Hass.io, now called Home Assistant, have had issues with that before.

Any integration marked Local will work, that includes automations.

If you run homeassistant on a raspberry pi, you have to remember the pi does not have a rtc (real time clock) A pi relies on a internet NTP server to sync it’s time.

But should just run along and stay within seconds of the real time though. It’s not normal to loose track of time by hours when the connection to a time server is lost. As long as it’s powered on at least.

This is the correct answer, a loss of Internet for a few hours/days/weeks/months shouldn’t matter that much. However, in this case for some reason it did, without details from the host, it’s hard to know what happened, but it’s been a problem before on supervised installs, though I’d thought that was only at bootup :man_shrugging:

1 Like

Interested in this: Is there a way for HA to make it say “oh no internet, then pick 6am instead sun rise”?
Thank you.

Home Assistant will still run sun triggers just fine, if it has the correct time

The problem here is that the underlying operating system doesn’t have the correct time

The sun position is calculated based on your height (above sea level) your lattitude and longitude and time / date. It does not need anything ‘outside’. (and your local timezone).
If this (losing power) is a continuing problem for you you could always buy an RTC for the the Pi because as @frits1980 says it will just use its onboard clock to maintain it’s best guess (generally pretty good)
A Pi RTC cost about $2 and you can back that with a battery or (my preferred) a 4.7 F capacitor (not micro Farad) Though that does cost a bit more than the clock.

(Edit see both following posts)

but hassos doesn’t support rtc clock :neutral_face:

Ah !
My Bad, just because I run a Pi 4 with SSD means I have to run Hassio over Buster
So I don’t have an issue with the RTC

So to “Amend” what I said above …

“If this (losing power) is a continuing problem for you you could always move to Hassio in docker on Raspbian and buy an RTC”

Apologies if I misled anyone

1 Like

Thanks everyone. It’s correct that I initially installed hass.io

My details:

RPi4

arch armv7l
dev false
docker true
hassio true
os_name Linux
os_version 4.19.114-v7l
python_version 3.7.7
timezone Europe/Oslo
version 0.108.6
virtualenv false

Host system

Hostname homeassistant
System HassOS 3.13
Deployment production

I’d open an issue about the problem, so that the devs can investigate and hopefully resolve.

Greetings,

Sorry to dig this thread up, but I have a question regarding the loss of internet connection and what can do Home Assitant.
I run Home Assitant OS, up to date, on a Pi 4.

I experienced a loss of internet connection and when I recovered it, I fount out that no value from my sensors (temperature, humidity) was recorded during the time off.


I have some automations which are triggered by values (not by time) but are supposed to run over a certain period when triggered (run for 1 hour). The journal was empty. I don’t know if my installation worked properly.

I did a test consisting in the removal of ethernet cable after Home Assistant started. And it is the same, no recording. It seems that I need an internet connection to have these recording.

  1. I was wondering what is working when internet is off. Does the automations without specific time (e.g. 12:00 am) can be triggered, does the delais (run for 1 hour) are working too ?

  2. Is there any way to have a RTC on a Pi in any form (physical or virtual) which would overcome this problem ? I’m not a programmer, but I think it could be possible to creat a addon or at least make Home Assistant to have an internal clock which could be set at the start of HA, using internet or set manually.

Thanks for the time you’ll spend on this :slight_smile: Have a nice day

What temperature sensors are they ?

Not with HA OS. The new HA Amber has a real time clock, so support will probably come.

Depends entirely on where that data is coming from.

If those are, for example, Zigbee devices I’d expect them to carry on working. If they’re something cloud based, they won’t. For any WiFi connected devices it’ll depend on the nature of the problem, and the behaviour of the devices.

Hi Tinkerer,
I have to admit that I totally forgot to says that all my devices are Zigbee using CC2531 stick. So no cloud device or no wifi.

If you’re using ZHA and a local database there’s absolutely nothing I can see that would stop those working and recording.

If DNS is involved however, that could cause problems if your router (which is likely your DNS server) wasn’t fully functional.

hummm… would the fact that my router was off due to dead power supply explain the loss of data recording ?

If it was all 100% local, no - but the moment you have DNS/mDNS involved, yes.

You’ve said nothing about:

  • Which Zigbee integration - ZHA or Zigbee2MQTT
  • What your recorder integration is configured to use - default database file, MariaDB, MySQL, or what