Timer got out of sync. Resetting

Hey folks, hope you’re all well.

I am having a ton of trouble with my Raspberry Pi 3 lately with a slew of “Timer got out of sync. Resetting” - messages. I have gone through most things I think, turned all automations and scripts off, reinstalled Hassio, and still, plenty of messages and sluggish behaviour all over. I’m starting to wonder, could this possibly be an issue with the SD-card?

I have wondered that as well. Are you using MQTT? I just abandoned the HBMQTT broker (built in) and went to Mosquito and things are much better now. I am on a Pi 2 with around 10 MQTT sensors.

Interesting. I have been using the Mosquitto addon in Hassio all along, so I don’t know if that is what is happening, but it bears investegation…

I’m also wondering if I just have to many sensors and switches for the pi to handle…

I also have this issue on RPi 3 with Hass.io. I have had the issue since first installing with only two Z-Wave nodes, two devices tracked and a Sonos speaker. I don’t use MQTT. I haven’t really spent any energy trying to figure out if anything is wrong though. It happens about 4-5 times per day. Just writing to tell you that it’s not only happening to you.

Hm, interesting.

I’m really not sure what to do, I guess I’ll buy another SD card and try that, since downgrading HASSIO version does not seem to make a difference either.

I get this too on RPi 3 with a standard install in virtualenv.
I have MQTT sensors listening to a Mosquitto broker.
This has been going on for a while now - see the error 4-5 times per day.

Never mind. I use a Sandisk 32GB USB3 stick and it still occurrence. And by the way, I use an external Mosquitto broker on a Synology NAS.

I also see this message. Things seem to be working, so I don’t know if it is a real problem.

Home Assistant ticks its clock forward every second. This error message means that it did not have time to do that because some other part of Home Assistant was blocking the CPU for more than a second. While badly written integrations can cause this error to appear, most of the time it is just a sign that the server is not quite powerful enough.

If it happens only 5 times a day and you do not notice other problems, you can just ignore it (however hard that might be).

1 Like

I’m getting this error in huge clusters, maybe like 5 at a time every minute, so my problem is significant and also accompanied with slow automations such as light switching on/off. I installed systemmonitor and it does not show a problem, both ram and cpu within reasonable ranges.

It could be that the hardware is not powerful enough, but it seems I’ve got these kinds of error messages only a couple versions ago.

Those cases could easily be an integration that is badly written. Unfortunately there is no easy way to pinpoint it.

One way is to disable half your stuff and see if the problem goes away. If not, try disabling the other half. Keep going with the faulty half until you identify the problem :slight_smile:

Another way is to set the logging level to “debug” and hope that you can figure out from the mountain of text what is running right before the timer tick and thus causing the error.

Neither way guarantees success.

That sounds like a plan! By integration though, do you mean the automations and scripts - or like, all sensors, switches, media players etc? I’m a bit wobbly on terminology :slight_smile:

The last one, i.e. almost everything except scripts and automations.

Thank you very much for your help, I appreciate it.

I have now completely reinstalled Hassio, added one thing at a time, restarted and kept an eye on the log. And it just pops up almost right away. Not as frequent as before, but still there.

Then I tried this process all over again, but on another pi3, and (for now) it seems it might be working ok again! This is the older pi3 without Bluetooth, so I am starting to wonder if there is something wrong with my newest pi or that there is at least for me better compatibility with the older pi3.

I’m only speculating, but for now things seem better.

Aaaand there it’s back again. Sigh

Are you saying that you get this issue a lot even with a default, empty configuration? If not, what have you enabled when you do see the warning?

You know, it’s been such a pain to pinpoint exactly what is happening, but I think I have made some headway here.

It seems the problem is a combination of some of my automations and the climate component. I have four heaters, four temp sensors and four automations that control the temperature settings for each of them throughout the day. I really wanted specific time control over the temp, so this is the automation they all have: (emphasis on the data template)

- alias: Kitchen Heating
  trigger:
    - platform: time
      minutes: '/5'
  condition:
    condition: state
    entity_id: binary_sensor.kitchen_windows
    state: 'off'
  action:
    - service: climate.set_operation_mode
      entity_id: climate.kitchen
      data:
        operation_mode: 'heat'
    - service: climate.set_temperature
      entity_id: climate.kitchen
      data_template:
        temperature: >-
          {% if now().hour >= 0 and now().hour < 5 and is_state('binary_sensor.anyone_home','on') %}
          12
          {% elif now().hour >= 0 and now().hour < 5 and is_state('binary_sensor.anyone_home','off') %}
          12

          {% elif now().hour >= 5 and now().hour < 8 and is_state('binary_sensor.anyone_home','on') %}
          20
          {% elif now().hour >= 5 and now().hour < 8 and is_state('binary_sensor.anyone_home','off') %}
          12

          {% elif now().hour >= 8 and now().hour < 15 and is_state('binary_sensor.anyone_home','on') %}
          20
          {% elif now().hour >= 8 and now().hour < 15 and is_state('binary_sensor.anyone_home','off') %}
          12

          {% elif now().hour >= 15 and now().hour < 24 and is_state('binary_sensor.anyone_home','on') %}
          20
          {% elif now().hour >= 15 and now().hour < 24 and is_state('binary_sensor.anyone_home','off') %}
          20

          {%endif %} 

Now what I think is happening, and I might be wrong, is that these four automations were firing at the same time, making all four climate components fire up, and I think, in turn, making the whole system break down for a second. Being that this would fire off every 5 minutes, it could explain why the error would appear so often. Maybe. I’m doing some tests at the moment.

I gets these often too. I have 8 cameras hooked into HA and I think I’ve pinned it down to them being the problem. A work around for me was to put the cameras in their own view (tab) so they don’t attempt to refresh as often. FFMPEG on 8 cameras is probably asking a lot of a little rPi. At some point I’d like to handoff this task to another machine and have HA just pull up 1 sec snapshots… but for now this works.

Thanks for the input @gremblin. Glad you pinned it down