@apocaliss92/nodedreame 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -466,11 +466,27 @@ declare enum MiotState {
466
466
  ReturnToEmpty = 28,
467
467
  WaitingForTask = 29,
468
468
  CleanWashboardBase = 30,
469
+ ReturningToDrain = 31,
470
+ Draining = 32,
469
471
  AutoWaterDraining = 33,
472
+ Emptying = 34,
473
+ DustBagDrying = 35,
474
+ DustBagDryingPaused = 36,
475
+ HeadingToExtraCleaning = 37,
476
+ ExtraCleaning = 38,
477
+ FindingPetPaused = 95,
478
+ FindingPet = 96,
470
479
  ShortcutRunning = 97,
471
480
  CameraMonitoring = 98,
472
481
  CameraMonitoringPaused = 99,
473
- InitialDeepClean = 101
482
+ InitialDeepClean = 101,
483
+ InitialDeepCleanPaused = 102,
484
+ Sanitizing = 103,
485
+ SanitizingWithDry = 104,
486
+ ChangingMop = 105,
487
+ ChangingMopPaused = 106,
488
+ FloorMaintaining = 107,
489
+ FloorMaintainingPaused = 108
474
490
  }
475
491
  /** VERIFIED on r2532a 2026-05-02 — ChargingStatus (siid 3 piid 2). */
476
492
  declare enum ChargingStatus {
@@ -505,27 +521,97 @@ declare enum CleaningMode {
505
521
  }
506
522
  /**
507
523
  * Error / fault value space for ERROR (siid 2 piid 2) and FAULTS_STR
508
- * (siid 4 piid 18). VERIFIED members confirmed live on r2532a; the rest are
509
- * ASSUMED from Tasshack types.py — the integer is the source of truth.
524
+ * (siid 4 piid 18). This is the FULL Tasshack `DreameVacuumErrorCode` table
525
+ * (types.py) — every documented integer is mapped. Members whose names were
526
+ * VERIFIED live on r2532a keep their verified labels even where the donor uses
527
+ * a different label for the same integer (annotated inline); the rest carry the
528
+ * donor's documented name. UNKNOWN (-1) is intentionally omitted — an unknown
529
+ * code falls through the cast-free lookup and surfaces as the raw number.
510
530
  */
511
531
  declare enum MiotError {
512
- Clear = 0,
513
- WheelRotationAnomaly = 1,
514
- RobotLifted = 18,
515
- TaskComplete = 68,
516
- ManualMopInstallRequired = 74,
517
- WastewaterTankFull = 105,
518
- CleanWaterTankEmpty = 107,
519
- WashboardFilterNeedsCleaning = 114,
520
- MopPadsMissing = 120,
532
+ Clear = 0,// donor NO_ERROR
533
+ WheelRotationAnomaly = 1,// donor DROP (VERIFIED label kept)
534
+ Cliff = 2,
535
+ Bumper = 3,
536
+ Gesture = 4,
537
+ BumperRepeat = 5,
538
+ DropRepeat = 6,
539
+ OpticalFlow = 7,
540
+ Box = 8,
541
+ TankBox = 9,
542
+ WaterBoxEmpty = 10,
543
+ BoxFull = 11,
544
+ Brush = 12,
545
+ SideBrush = 13,
546
+ Fan = 14,
547
+ LeftWheelMotor = 15,
548
+ RightWheelMotor = 16,
549
+ TurnSuffocate = 17,
550
+ RobotLifted = 18,// donor FORWARD_SUFFOCATE (VERIFIED label kept)
551
+ ChargerGet = 19,
521
552
  BatteryLow = 20,
522
553
  ChargeFault = 21,
523
- BatteryPercentageAnomaly = 22,
554
+ BatteryPercentageAnomaly = 22,// donor BATTERY_PERCENTAGE
555
+ Heart = 23,
556
+ CameraOcclusion = 24,
557
+ Move = 25,
558
+ FlowShielding = 26,
559
+ InfraredShielding = 27,
524
560
  ChargeNoElectric = 28,
525
561
  BatteryFault = 29,
562
+ FanSpeedError = 30,
563
+ LeftWheelSpeed = 31,
564
+ RightWheelSpeed = 32,
565
+ Bmi055Acce = 33,
566
+ Bmi055Gyro = 34,
567
+ Xv7001 = 35,
568
+ LeftMagnet = 36,
569
+ RightMagnet = 37,
570
+ FlowError = 38,
571
+ InfraredFault = 39,
572
+ CameraFault = 40,
573
+ StrongMagnet = 41,
574
+ WaterPump = 42,
575
+ Rtc = 43,
576
+ AutoKeyTrig = 44,
577
+ P3v3 = 45,
578
+ CameraIdle = 46,
579
+ Blocked = 47,
580
+ LdsError = 48,
581
+ LdsBumper = 49,
582
+ WaterPump2 = 50,
583
+ FilterBlocked = 51,
584
+ Edge = 54,
585
+ Carpet = 55,
586
+ Laser = 56,
587
+ Edge2 = 57,
588
+ Ultrasonic = 58,
589
+ NoGoZone = 59,
590
+ Route = 61,
591
+ Route2 = 62,
592
+ Blocked2 = 63,
593
+ Blocked3 = 64,
594
+ Restricted = 65,
595
+ Restricted2 = 66,
596
+ Restricted3 = 67,
597
+ TaskComplete = 68,// donor REMOVE_MOP (VERIFIED label kept)
598
+ MopRemoved = 69,
599
+ MopRemoved2 = 70,
600
+ MopPadStopRotate = 71,
601
+ MopPadStopRotate2 = 72,
602
+ ManualMopInstallRequired = 74,// donor MOP_INSTALL_FAILED (VERIFIED label kept)
526
603
  LowBatteryTurnOff = 75,
604
+ DirtyTankNotInstalled = 76,
605
+ RobotInHiddenRoom = 78,
606
+ LdsFailedToLift = 79,
527
607
  RobotStuck = 80,
528
608
  RobotStuckRepeat = 81,
609
+ SlipperyFloor = 82,
610
+ UnknownError = 84,
611
+ CheckMopInstall = 85,
612
+ DirtyWaterTankFull = 86,
613
+ RetractableLegStuck = 88,
614
+ InternalError = 89,
529
615
  RobotStuck2 = 90,
530
616
  RobotStuckOnTables = 91,
531
617
  RobotStuckOnPassage = 92,
@@ -536,19 +622,91 @@ declare enum MiotError {
536
622
  RobotStuckOnPet = 97,
537
623
  RobotStuckOnSlipperySurface = 98,
538
624
  RobotStuckOnCarpet = 99,
539
- RobotStuckOnCurtain = 200,
540
625
  BinFull = 101,
626
+ BinOpen = 102,
627
+ BinOpen2 = 103,
628
+ BinFull2 = 104,
629
+ WastewaterTankFull = 105,// donor WATER_TANK (VERIFIED label kept)
630
+ DirtyWaterTank = 106,
631
+ CleanWaterTankEmpty = 107,// donor WATER_TANK_DRY (VERIFIED label kept)
632
+ DirtyWaterTank2 = 108,
633
+ DirtyWaterTankBlocked = 109,
634
+ DirtyWaterTankPump = 110,
635
+ MopPad = 111,
636
+ WetMopPad = 112,
637
+ WashboardFilterNeedsCleaning = 114,// donor CLEAN_MOP_PAD (VERIFIED label kept)
638
+ CleanTankLevel = 116,
541
639
  StationDisconnected = 117,
542
- DustBagFull = 121
640
+ DirtyTankLevel = 118,
641
+ WashboardLevel = 119,
642
+ MopPadsMissing = 120,// donor NO_MOP_IN_STATION (VERIFIED label kept)
643
+ DustBagFull = 121,
644
+ UnknownWarning = 122,
645
+ SelfTestFailed = 123,
646
+ WashboardNotWorking = 124,
647
+ DrainageFailed = 125,
648
+ MopNotDetected = 126,
649
+ MopHolderError = 127,
650
+ DockError = 128,
651
+ WashFailed = 129,
652
+ RobotStuckOnCurtain = 200,
653
+ EdgeMopStopRotate = 201,
654
+ EdgeMopDetached = 202,
655
+ ChassisLiftMalfunction = 203,
656
+ InternalError2 = 207,
657
+ MopCoverError = 209,
658
+ RollerMopError = 210,
659
+ OnboardWaterTankEmpty = 213,
660
+ OnboardDirtyWaterTankFull = 214,
661
+ MopNotInstalled = 215,
662
+ RollerMopError2 = 218,
663
+ FluffingRollerError = 222,
664
+ MopCoverError2 = 223,
665
+ BlockedByObstacle = 226,
666
+ ReturnToChargeFailed = 1000
543
667
  }
544
- /** VERIFIED on r2532a 2026-05-02 — TASK_STATUS (siid 4 piid 1). */
668
+ /**
669
+ * TASK_STATUS (siid 4 piid 1). Codes 1/2/3/6/12/14 carry the labels VERIFIED
670
+ * live on r2532a 2026-05-02 — these are KEPT verbatim because they were
671
+ * observed against real task transitions and differ from the donor's labels for
672
+ * the same integers (donor: 1=AUTO_CLEANING, 2=ZONE_CLEANING, 3=SEGMENT_CLEANING,
673
+ * 6=AUTO_CLEANING_PAUSED, 12=MOPPING_PAUSED, 14=ZONE_MOPPING_PAUSED). The
674
+ * remaining members are ASSUMED from Tasshack `DreameVacuumTaskStatus`
675
+ * (types.py) — added so documented codes resolve to a name. Unknown codes
676
+ * surface as raw via {@link VacuumDevice.taskStatusRaw}.
677
+ */
545
678
  declare enum TaskStatus {
679
+ Completed = 0,
546
680
  InterruptedOrPaused = 1,
547
681
  Active = 2,
548
682
  Transitioning = 3,
683
+ SpotCleaning = 4,
684
+ FastMapping = 5,
549
685
  OnDockIdle = 6,
686
+ ZoneCleaningPaused = 7,
687
+ SegmentCleaningPaused = 8,
688
+ SpotCleaningPaused = 9,
689
+ MapCleaningPaused = 10,
690
+ DockingPaused = 11,
550
691
  TransientPauseEdge = 12,
551
- NeedsIntervention = 14
692
+ SegmentMoppingPaused = 13,
693
+ NeedsIntervention = 14,
694
+ AutoMoppingPaused = 15,
695
+ AutoDockingPaused = 16,
696
+ SegmentDockingPaused = 17,
697
+ ZoneDockingPaused = 18,
698
+ CruisingPath = 20,
699
+ CruisingPathPaused = 21,
700
+ CruisingPoint = 22,
701
+ CruisingPointPaused = 23,
702
+ SummonCleanPaused = 24,
703
+ ReturningInstallMop = 25,
704
+ ReturningRemoveMop = 26,
705
+ StationCleaning = 27,
706
+ PetFinding = 30,
707
+ AutoCleaningWashingPaused = 31,
708
+ AreaCleaningWashingPaused = 32,
709
+ CustomCleaningWashingPaused = 33
552
710
  }
553
711
 
554
712
  /**
@@ -1024,6 +1182,14 @@ declare class VacuumDevice extends BaseDevice<VacuumDeviceEvents> {
1024
1182
  constructor(input: BaseDeviceInput);
1025
1183
  /** Rich, vacuum-specific capability record (booleans + supported enums). */
1026
1184
  get vacuumCapabilities(): VacuumCapabilities;
1185
+ /**
1186
+ * The suction levels this model supports, as a {@link SuctionLevel} enum array
1187
+ * (from the capability record). Lets a consumer see which fan speeds are
1188
+ * selectable without reaching into {@link vacuumCapabilities}.
1189
+ */
1190
+ get supportedSuctionLevels(): readonly SuctionLevel[];
1191
+ /** The water/mop volumes this model supports, as a {@link WaterVolume} enum array. */
1192
+ get supportedWaterVolumes(): readonly WaterVolume[];
1027
1193
  get statusRaw(): number | null;
1028
1194
  get status(): MiotState | null;
1029
1195
  get battery(): number | null;
@@ -1215,13 +1381,104 @@ declare enum MowerControlAction {
1215
1381
  }
1216
1382
  /**
1217
1383
  * Observed TASK_STATUS codes (siid 5 piid 104), service5.py TASK_STATUS_MAPPING.
1218
- * Only `SpotIncomplete` (7) has a confirmed meaning; the others in the donor are
1219
- * "Unknown task status: N" — ASSUMED / not exposed as named members here.
1384
+ * Only `SpotIncomplete` (7) has a confirmed meaning; the donor explicitly marks
1385
+ * codes 2/3/10/13 as "Unknown task status: N" (observed after RAIN/LOST/
1386
+ * LOW_BATTERY events). Those are NOT invented as named members — they surface as
1387
+ * raw via {@link MowerDevice.taskStatusRaw}. This is the FULL documented set:
1388
+ * the donor names exactly one code.
1220
1389
  */
1221
1390
  declare enum MowerTaskStatus {
1222
1391
  /** "Task incomplete - spot mowing". */
1223
1392
  SpotIncomplete = 7
1224
1393
  }
1394
+ /**
1395
+ * Mower device-code / fault value space for DEVICE_CODE (siid 2 piid 2). This is
1396
+ * the FULL donor `BASE_DEVICE_CODES` registry (property/device_code.py), codes
1397
+ * 0..73 contiguous. Each integer is documented by the donor with a name +
1398
+ * severity (INFO / WARNING / ERROR — noted inline). 0 = NO_DEVICE_CODE (normal
1399
+ * operation). Codes not in this table (model-specific extensions) fall through
1400
+ * the cast-free lookup and surface as raw via {@link MowerDevice.faultRaw}.
1401
+ *
1402
+ * Two donor names repeat at different integers; the second occurrence is
1403
+ * suffixed (`LidarDirtyWarning` 38, `BatteryOverheatWarning` 42) to keep enum
1404
+ * member names unique while preserving the integer source of truth.
1405
+ */
1406
+ declare enum MowerFault {
1407
+ NoDeviceCode = 0,// INFO
1408
+ Tilted = 1,// ERROR
1409
+ Trapped = 2,// ERROR
1410
+ NarrowPathToStation = 3,// ERROR
1411
+ LeftWheel = 4,// ERROR
1412
+ RightWheel = 5,// ERROR
1413
+ LiftMotor = 6,// ERROR
1414
+ Cutter = 7,// ERROR
1415
+ SidedMotor = 8,// ERROR
1416
+ CrashPlate = 9,// ERROR
1417
+ Charging = 10,// ERROR
1418
+ BatteryOverheat = 11,// ERROR
1419
+ LidarCovered = 12,// ERROR
1420
+ LidarOverheatWithoutMap = 13,// ERROR
1421
+ LidarOverheatWithMap = 14,// ERROR
1422
+ LidarOverheat = 15,// ERROR
1423
+ LidarDirty = 16,// ERROR
1424
+ LidarAbnormal = 17,// ERROR
1425
+ LocationWeak = 18,// ERROR
1426
+ LocationLost = 19,// ERROR
1427
+ Sensor = 20,// ERROR
1428
+ InForbiddenArea = 21,// ERROR
1429
+ OutOfMap = 22,// ERROR
1430
+ EmergencyStop = 23,// ERROR
1431
+ BatteryLow = 24,// ERROR
1432
+ MapFileCrack = 25,// ERROR
1433
+ AwayFromMap = 26,// ERROR
1434
+ HumanDetected = 27,// ERROR
1435
+ BladeLoss = 28,// ERROR
1436
+ StationLoss = 29,// ERROR
1437
+ MaintainLoss = 30,// ERROR
1438
+ BackChargeFailed = 31,// WARNING
1439
+ DockingFailed = 32,// WARNING
1440
+ LocatingFailedWithMap = 33,// WARNING
1441
+ LocatingFailedWithoutMap = 34,// WARNING
1442
+ LocatingAbnormal = 35,// WARNING
1443
+ TaskStartFailed = 36,// WARNING
1444
+ PathImpassable = 37,// ERROR
1445
+ LidarDirtyWarning = 38,// WARNING (donor LIDAR_DIRTY at 38)
1446
+ CamDirty = 39,// WARNING
1447
+ CamAbnormal = 40,// WARNING
1448
+ CamCover = 41,// WARNING
1449
+ BatteryOverheatWarning = 42,// WARNING (donor BATTERY_OVERHEAT at 42)
1450
+ BatteryTempLow = 43,// WARNING
1451
+ AutobuildBorder = 44,// WARNING
1452
+ AutobuildSide = 45,// WARNING
1453
+ BorderFinish = 46,// INFO
1454
+ NewMap = 47,// INFO
1455
+ TaskFinish = 48,// INFO
1456
+ DestinationNotReachable = 49,// INFO
1457
+ TaskStart = 50,// INFO
1458
+ CruiseStart = 51,// INFO
1459
+ PointAndGoStart = 52,// INFO
1460
+ ScheduleStart = 53,// INFO
1461
+ BatteryLowReturning = 54,// INFO
1462
+ BatteryLowScheduleSuspend = 55,// INFO
1463
+ BadWeatherProtecting = 56,// INFO
1464
+ RainScheduleInterupted = 57,// INFO
1465
+ RainScheduleSuspend = 58,// INFO
1466
+ ForzenReturning = 59,// INFO
1467
+ FrozenScheduleSuspend = 60,// INFO
1468
+ NotDisturbReturning = 61,// INFO
1469
+ NotDisturbScheduleSuspend = 62,// INFO
1470
+ WorkingScheduleSuspend = 63,// INFO
1471
+ RemoteControlingScheduleSuspend = 64,// INFO
1472
+ EmergencyStoppedScheduleSuspend = 65,// INFO
1473
+ TopCoverOpenScheduleSuspend = 66,// INFO
1474
+ FaultModeScheduleSuspend = 67,// INFO
1475
+ ScheduleTimeout = 68,// INFO
1476
+ StationNotConnectedToWorkingArea = 69,// INFO
1477
+ ContinueFromBreakpoint = 70,// INFO
1478
+ IdleTimeoutReturning = 71,// INFO
1479
+ PauseTimeoutReturning = 72,// INFO
1480
+ TopCoverOpen = 73
1481
+ }
1225
1482
 
1226
1483
  /**
1227
1484
  * Cast-free mower decoders. Re-exports the shared numeric primitives, and adds
@@ -1440,6 +1697,19 @@ declare class MowerDevice extends BaseDevice {
1440
1697
  get isDocked(): boolean;
1441
1698
  get isMowing(): boolean;
1442
1699
  get taskStatusRaw(): number | null;
1700
+ /**
1701
+ * TASK_STATUS (5:104) decoded to {@link MowerTaskStatus}, or null. The donor
1702
+ * names only code 7 (SpotIncomplete); codes 2/3/10/13 are documented "Unknown
1703
+ * task status" and intentionally surface as raw via {@link taskStatusRaw}.
1704
+ */
1705
+ get taskStatus(): MowerTaskStatus | null;
1706
+ get faultRaw(): number | null;
1707
+ /**
1708
+ * DEVICE_CODE (2:2) decoded to a {@link MowerFault} (the donor's
1709
+ * BASE_DEVICE_CODES registry, 0..73), or null for a model-specific/undocumented
1710
+ * code — which still surfaces as the raw number via {@link faultRaw}.
1711
+ */
1712
+ get fault(): MowerFault | null;
1443
1713
  /** Parsed scheduling task descriptor (2:50), or null. */
1444
1714
  get task(): MowerTaskDescriptor | null;
1445
1715
  /**
@@ -1503,6 +1773,9 @@ declare class MowerDevice extends BaseDevice {
1503
1773
  static readonly DEFAULT_PROPS: readonly [{
1504
1774
  readonly siid: 2;
1505
1775
  readonly piid: 1;
1776
+ }, {
1777
+ readonly siid: 2;
1778
+ readonly piid: 2;
1506
1779
  }, {
1507
1780
  readonly siid: 3;
1508
1781
  readonly piid: 1;
@@ -1521,4 +1794,4 @@ declare class MowerDevice extends BaseDevice {
1521
1794
  }];
1522
1795
  }
1523
1796
 
1524
- export { BaseDevice, type BaseDeviceEvents, type BatchDeviceDataFetcher, type CapabilityResolver, ChargingStatus, type CleanOpts, CleaningMode, type CreateDeviceArgs, DefaultCapabilityResolver, type DeviceCapabilities, type DeviceEvent, DreameApiError, DreameAuthError, type DreameCloudState, type DreameDevice, DreameDeviceOfflineError, DreameError, type DreameRegion, type DreameSession, DreameTransportError, LIBRARY_NAME, MODEL_CAPABILITIES as MOWER_MODEL_CAPABILITIES, type MapBoundingBox, type MapCleanedAreaOverlay, type MapDimensions, type MapFrameType, type MapLayer, type MapLayerType, type MapLowLyingArea, type MapObstacle, type MapPath, type MapPathType, type MapPoint, type MapPose, type MapRestrictedArea, type MapRoom, type MapRoomWall, type MapRun, type MapSegment, type MapStorey, type MapVirtualWall, type MapWallsInfo, type MiotAction, MiotError, type MiotProp, MiotState, type MowerAvailableMap, type MowerCapabilities, MowerCapabilityResolver, MowerChargingStatus, type MowerContour, MowerControlAction, type MowerControlState, MowerDevice, type MowerDeviceInput, type MowerMap, type MowerMapBoundary, type MowerMowPath, type MowerPathEntry, type MowerPoint, type MowerSpotArea, MowerStatus, type MowerTaskDescriptor, MowerTaskStatus, type MowerZone, Nodreame, type NodreameDeps, type NodreameEvents, type NodreameOptions, type OssFetchInput, type OssFetcherLike, type PropertyChangedEvent, type PropertyResult, type PropertyState, type PropertyWrite, type RenderMowerSvgOptions, type RenderVacuumPngOptions, type StateChangedEvent, SuctionLevel, TaskStatus, MODEL_CAPABILITIES$1 as VACUUM_MODEL_CAPABILITIES, type VacuumCapabilities, VacuumCapabilityResolver, VacuumDevice, type VacuumGetMapInput, type VacuumMap, WaterVolume, getMowerCapabilities, getVacuumCapabilities, renderMowerSvg, renderVacuumPng, resolveCapabilities };
1797
+ export { BaseDevice, type BaseDeviceEvents, type BatchDeviceDataFetcher, type CapabilityResolver, ChargingStatus, type CleanOpts, CleaningMode, type CreateDeviceArgs, DefaultCapabilityResolver, type DeviceCapabilities, type DeviceEvent, DreameApiError, DreameAuthError, type DreameCloudState, type DreameDevice, DreameDeviceOfflineError, DreameError, type DreameRegion, type DreameSession, DreameTransportError, LIBRARY_NAME, MODEL_CAPABILITIES as MOWER_MODEL_CAPABILITIES, type MapBoundingBox, type MapCleanedAreaOverlay, type MapDimensions, type MapFrameType, type MapLayer, type MapLayerType, type MapLowLyingArea, type MapObstacle, type MapPath, type MapPathType, type MapPoint, type MapPose, type MapRestrictedArea, type MapRoom, type MapRoomWall, type MapRun, type MapSegment, type MapStorey, type MapVirtualWall, type MapWallsInfo, type MiotAction, MiotError, type MiotProp, MiotState, type MowerAvailableMap, type MowerCapabilities, MowerCapabilityResolver, MowerChargingStatus, type MowerContour, MowerControlAction, type MowerControlState, MowerDevice, type MowerDeviceInput, MowerFault, type MowerMap, type MowerMapBoundary, type MowerMowPath, type MowerPathEntry, type MowerPoint, type MowerSpotArea, MowerStatus, type MowerTaskDescriptor, MowerTaskStatus, type MowerZone, Nodreame, type NodreameDeps, type NodreameEvents, type NodreameOptions, type OssFetchInput, type OssFetcherLike, type PropertyChangedEvent, type PropertyResult, type PropertyState, type PropertyWrite, type RenderMowerSvgOptions, type RenderVacuumPngOptions, type StateChangedEvent, SuctionLevel, TaskStatus, MODEL_CAPABILITIES$1 as VACUUM_MODEL_CAPABILITIES, type VacuumCapabilities, VacuumCapabilityResolver, VacuumDevice, type VacuumGetMapInput, type VacuumMap, WaterVolume, getMowerCapabilities, getVacuumCapabilities, renderMowerSvg, renderVacuumPng, resolveCapabilities };