OH 3 - Roomba / iRobot Querying Syntax for Battery Level

Can someone using the latest iRobot binding provide me the syntax to query the Roomba’s battery level?

What I’m noticing is the default querying of the Roomba’s is very random when they aren’t running.

Sometimes it could be hours or even a day to show the Roomba’s battery level is back to 100%. It stays around 9x% a lot after it’s been charging hours after a run.

I’m running the version that comes with OH 3.2 Final.

openhab> list -s | grep irobot
272 │ Active │ 80 │ 3.2.0 │ org.openhab.binding.irobot

Best, Jay

I discovered that just sending a command will auto refresh the status of the battery level. Here’s the syntax I’m using a few times a day.

			var RoombaMainFl = getThingStatusInfo("irobot:roomba:80C5F272XXXX")
			if ((RoombaMainFl !== null) && (RoombaMainFl.getStatus().toString() == "ONLINE" && MainFloorRoomba_Command.state == 'stop')) { MainFloorRoomba_Command.sendCommand('stop') }

			var RoombaUpStairs = getThingStatusInfo("irobot:roomba:5014794EXXXX")
			if ((RoombaUpStairs !== null) && (RoombaUpStairs.getStatus().toString() == "ONLINE" && UpstairsRoomba_Command.state == 'stop')) { UpstairsRoomba_Command.sendCommand('stop') }	

Best, Jay