Does anyone know if when using fromJson it will wipe out what was scheduled?
I have one board that seems to be remembering and old time that was put in. Should I be clearing something before setting the new time?
I am only sending one tm xx:xx:xx in the json.
A bit of your code would be helpful, as there are many ways the library can be used.
1 Like
Yes sorry.
Inside loop
if (publishSchedule.isScheduledTime()){
//TODO remove put loop stuff
LockDoor();
}
LockDoor just changes a relay
Here is when I set a time
int LockTime(String command) {
publishSchedule.fromJson(command);
return 55;
}
Here is an example of the string going in.
[{\"tm\":\"10:55:02\"}]
So anytime I want to change that time it looks like it adds to it and not a replace.
Yes, the schedule is additive. Just call:
publishSchedule.clear();
to clear the existing schedule to replace it.
system
Closed
6
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.