Clock#Time not logging frequently enough

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
andy
Normal user
Posts: 65
Joined: 26 Jan 2016, 23:07

Clock#Time not logging frequently enough

#1 Post by andy » 18 Apr 2016, 17:21

Sometimes my pump relay does not trigger on the Clock#Time event. It seems there are times that more than a minute elapses before ESP reports a new time. For instance, I will see 13:59 registered in the log, but it will miss registering 14:00. It will register 14:01, but by then I've missed the 14:00 event I needed to trigger a relay.

I'm currently getting around it by setting two rules to turn on and two to turn off, each of the pairs separated by 1 minute. That way, if the first rule doesn't hit, the second one should. But it takes up more memory and is a bit of a kludge - I'd like to figure out how to configure my way around it.

Any ideas?

Martinus

Re: Clock#Time not logging frequently enough

#2 Post by Martinus » 21 Apr 2016, 15:59

The main program loop checks system time every second, unless a sub process takes more time. There must be some reason that a sub process takes more than a minute doing some other stuff, stalling the main loop for too long.

Does this unit have many tasks?
What's your message delay setting?
System load?

andy
Normal user
Posts: 65
Joined: 26 Jan 2016, 23:07

Re: Clock#Time not logging frequently enough

#3 Post by andy » 22 Apr 2016, 00:17

Does this unit have many tasks?
I'm measuring a DHT11 and a ds18b20. I've got an I2C bus with an ADS1115 and six relays on it.

TASKS:
  • Uptime
    Wifi Strength
    DHT11 Temp & Humidity
    ds18b20 temperature
    0.5 - 4.5 VDC signal on ADS1115
RULES:
  • On boot set pcfgpio 1 & 2 to 1
    On Clock#Time = 8.00 set pcfgpio 1 & 2 to 0
    On Clock#Time = 8.01 set pcfgpio 1 & 2 to 0
    On Clock#Time = 12.00 set pcfgpio 1 & 2 to 1
    On Clock#Time = 12.01 set pcfgpio 1 & 2 to 1
What's your message delay setting?
Message delay is 15000 (required by ThingSpeak)
System load?
Sitting at 100%, even with serial and web logging set to 0.

Martinus

Re: Clock#Time not logging frequently enough

#4 Post by Martinus » 23 Apr 2016, 16:39

Check your task delay settings. It may help to set them to larger values. A starting point could be 30 x "number of tasks reported".
So if you have 4 tasks sending data to ThingSpeak, set all delays to a minimum of 4 x 30 = 120 seconds.
System load should drop from 100% and rules may run more reliable.

Post Reply

Who is online

Users browsing this forum: No registered users and 90 guests