rand256/valetudo

Everyday cleaner some zones not work

userosos opened this issue · 6 comments

How to Reproduce
Steps to reproduce the behavior:

  1. Go to Settings/Timers
  2. Click on Zoned Cleaning schedule
  3. Set settings (add 3 zones for cleaning). See pics.

изображение
изображение
5. Click to save

Expected behavior
I think that the robot will cleaning the zone everyday at 21 o'clock.
Firest day it work ok but next day i cant see the settings. It removed from Settings/Timers/Zoned Cleaning schedule.

Vacuum Model:
Xiaomi Mi Robot Vacuum 1gen
Firmware version 004018

Valetudo Version:
0.9.9

User-Agent
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:84.0) Gecko/20100101 Firefox/84.0

Have you reloaded the map?

Have you reloaded the map?

May be. I'm not sure about that. If i will noreload map it will be ok?

Timers are saved with the map, see #344 (comment).
So if you configure new timers you'll need to save the map again! If not, the timers will be gone again after reloading the map.

I have this same issue. With a Gen1 with firmware 4018 the zone timer job remains but individual zone coordinates are removed from the program scope variables.
I've started to get into the code for obvious things but findings so far:

  1. Save map with whatever times currently exist
  2. Setup timers and zones as required
  3. Verify that the /mnt/data/valetudo/config.json has the zone timer and coordinates per (2). Also validate that the state of the timers when initially saved is in /mnt/data/valetudo/[name]/valetudo.json
  4. Check what the API is up to, /api/ztimers which correctly has the ztimer and coordinates setup in (2).
  5. Let the ztimer job activate, as soon as the vacuum says starting zone clean the map shows the zone but /api/ztimers no longer has the coordinates setup in (2) attached to the zone timer job
  6. Files in (3) are not impacted by this, restart of the valetudo service (kill -9) and restart correctly grabs the settings from /mnt/data/valetudo/config.json and /api/ztimers and zone timer setup is normal until the next scheduled run.

@bensweet86, big thanks for your investigation, seems now I know what causes this issue. Could you please check this test build whether it will work correctly?

For gen1 you need to stop valetudo to stop existing process, download and unpack the file I've linked to i.e. /mnt/data/valetudo, then cd there and run it as ./valetudo. After testing just do a Ctrl+C and use start valetudo to re-launch the installed binary.

@rand256, initial test looks good with a ztimer event triggering and the coordinates remain against the event in the web app.