landroid-bridge icon indicating copy to clipboard operation
landroid-bridge copied to clipboard

Scheduler mows too often with daysForTotalCut=3

Open RolandRosenfeld opened this issue 5 years ago • 0 comments

I configured the following in config.json:

    "scheduler": {
        "enable": true,
        "cron": true,
        "weather": {
            "provider": "darksky",
            [...]
        },
        "db": "./db/scheduler.db",
        "earliestStart": 12,
        "latestStop": 20,
        "startEarly": true,
        "offDays": 0,
        "squareMeters": 200,
        "perHour": 50,
        "mowTime": 75,
        "chargeTime": 75,
        "daysForTotalCut": 3,
        "rainDelay": 120,
        "threshold": 30
    }

with the SQL fixup from #69. With this the mower schedules 8 hours mowing for "today" and 2-3 hours for "tomorrow". But "tomorrow" the data is updated to run 8 hours again. And this day for day.

As you can see in the scheduler.db dump:

INSERT INTO "schedule" VALUES('2019-06-13',480);
INSERT INTO "schedule" VALUES('2019-06-14',480);
INSERT INTO "schedule" VALUES('2019-06-15',480);
INSERT INTO "schedule" VALUES('2019-06-16',480);
INSERT INTO "schedule" VALUES('2019-06-17',160);
INSERT INTO "schedule" VALUES('2019-06-18',320);
INSERT INTO "schedule" VALUES('2019-06-19',0);
INSERT INTO "schedule" VALUES('2019-06-20',0);
INSERT INTO "schedule" VALUES('2019-06-21',0);
INSERT INTO "schedule" VALUES('2019-06-22',480);
INSERT INTO "schedule" VALUES('2019-06-23',160);

So today (2019-06-16) it shouldn't mow at all, since it mowed 8 hours the last 3 days. And I expect it to change the schedule for 2019-06-17 from 160 to 480 tomorrow (as it does the last days).

RolandRosenfeld avatar Jun 16 '19 10:06 RolandRosenfeld