ESP8266TimeAlarms icon indicating copy to clipboard operation
ESP8266TimeAlarms copied to clipboard

Alarm AlarmRepeat fail

Open Galaxy-Man opened this issue 4 years ago • 7 comments

Hi I know someoelse raised this as an issue but I did not see it get resolved. If you still remember how you supported this library can you help?

The Alarms do not work:

Alarm.alarmRepeat(13, 28, 0, MorningAlarm); Alarm.alarmRepeat(17, 28, 0, EveningAlarm); Alarm.alarmRepeat(dowSaturday, 9, 15, 0, WeeklyAlarm); Alarm.alarmRepeat(dowSunday, 9, 15, 0, WeeklyAlarm);

These timers work:

Alarm.timerRepeat(15, Repeats); // timer for every 15 seconds id = Alarm.timerRepeat(2, Repeats2); // timer for every 2 seconds Alarm.timerOnce(10, OnceOnly); // called once after 10 seconds

I am running this with the ESP32 time library and your library. There is nothing else that I can see would interfere with the operation.

ESP32 Boards tried ESP32 DoIT, Wemos and TTGO.

The time is being picked up correctly and set.

The Enviro is as below. configTime(0, 3600, "pool.ntp.org"); setenv("TZ", "GMT0BST,M3.5.0/1,M10.5.0", 1); tzset();

Any suggestions where to look as to why the Alarm Repeat is not firing?

Thank you for any help.

Galaxy-Man avatar Jul 20 '20 14:07 Galaxy-Man

Hej No I did not get anything to test with so I could not reproduce it. I have not touch any of the alarm functions just replaces the time handling with the newlibC . But of course it might mess up something.

I do not have any ESP32 board to test with but if you can make a small sketch that shows the bug I can try it on the boards I have.

Also it maybe its time to see if there is any update on the alarm functions. I have not used this lib for a long time.

jhagberg avatar Jul 21 '20 06:07 jhagberg

This issue can be closed, I am using the DailyTimer library for ESP32.

Thanks.

Galaxy-Man avatar Aug 04 '20 10:08 Galaxy-Man

I'm not able to get this to run on a ESP8266, timerRepeat prints nothing

jor3l avatar Oct 05 '20 20:10 jor3l

I needed to add Alarm.delay(1000) to the loop so it works

jor3l avatar Oct 05 '20 20:10 jor3l

Hej yes, you need to invoke that like in my example. Could this be the case for you also @Galaxy-Man ?

see: https://github.com/jhagberg/ESP8266TimeAlarms/blob/fff9617f0842e235f5300621bf17b66768edab1a/examples/TimeAlarmExample/TimeAlarmExample.ino#L61

jhagberg avatar Oct 06 '20 05:10 jhagberg

This could have been due to the bug fixed in https://github.com/jhagberg/ESP8266TimeAlarms/pull/8

jeanlemotan avatar Feb 03 '21 22:02 jeanlemotan