koalazak / dorita980

Unofficial iRobot Roomba and Braava (i7/i7+, 980, 960, 900, e5, 690, 675, m6, etc) node.js library (SDK) to control your robot
MIT License
931 stars 147 forks source link

How to Determine if Robot State is Paused? #145

Closed rcoletti116 closed 2 years ago

rcoletti116 commented 2 years ago

I've been looking through the code, docs, and old issues trying to determine how we can tell if the robot is in a paused state. I've not seen anything to this effect in getMission or getRobotState. Does anyone know?

I've seen reference to bbpause with various numerical values. Does anyone know what these mean?

rcoletti116 commented 2 years ago

For those who might be following I've got two methods I'm exploring.

  1. Keying off 'lastCommand', e.g.,

lastCommand: { command: "pause", time: 1632170499, initiator: "manual" },

OR

  1. cycle + phase combo. Cycle is "clean" and the phase is "stop" when it is paused while cleaning, while the cycle property is "none" when it is fully stopped, not engaged in a job.
jeremywillans commented 2 years ago

Hey @rcoletti116, I mapped out a lot of the settings in my HA Package for rest980/dorita980.

This should give some guidance for this and other options - ref here

rcoletti116 commented 2 years ago

Thanks @jeremywillans!