Reading sensors using XML

Extensible Markup Language (XML) is a markup language that defines a set of rules for encoding documents in a format that is both human-readable and machine-readable (Wikipedia). Roomba Wi-fi Remote has an externally accessible file that allows developers the ability to perform a reading of the various sensors of the robot through an interpreter / standard XML parser.

Different tags or fields are included in the XML file. Each tag defines a sensor of the iRobot Roomba. The structure defines the request commands [142][0] were all sensors are read. These files are named roomba.xml and rwr.xml that can be accessed from the URL http:// Roomba_Wi-fi_Remote_IP/roomba.xml and http:// Roomba_Wi-fi_Remote_IP/rwr.xml

Remember that Roomba Wi-fi Remote requires of user and password. For this reason leave this two fields in blank when configuring the device with XML. Otherwise the communication will be very slow.

Given that the file is updated at the same time of execution, only two simultaneous connections to roomba.xml and/or rwr.xml are allowed. This also occurs when accessing through the web interface of the Roomba Wi-fi Remote.

Finally, another important information to take into account: in order to balance the embedded workload and create an efficient TCP/IP connection, when a connection to 9001 port is detected (Transparent Mode or Gateway), the refresh process of these files is interrupted (explained in Transparent Mode Section).


roomba.xml file is a read-only file and it is only updated with the value read from the robot sensors. Sensors value is updated every 500ms and it does not depends on the accesses or reads to the file (values are updated periodically). Note this is an important data, see Angle and Distance dedicated section on the SCI iRobot Roomba manual.

The fix part of the XML file structure is as shown below:

    <name>'Bumps Wheeldrops'</name>
    <name>'Cliff Left'</name>
    <name>'Cliff Front Left'</name>
    <name>'Cliff Front Right'</name>
    <name>'Cliff Right'</name>
    <name>'Virtual Wall'</name>
    <name>'Motor Overcurrents'</name>
    <name>'Dirt Detector - Left'</name>
    <name>'Dirt Detector - Right'</name>
    <name>'Remote Opcode'</name>
    <name>'Charging State'</name>

The main field for each sensor is called <rX>, where X represents the sensor that is being monitored. Every tag <rX> specifies the name of the sensor by to fields: <name> which contains the name given by the vendor, and <value>, which contains the sensor value. This way the user can obtain the sensor information from the XML file and doesn’t need to store all sensors hardcoded.

All <rX> sensors are listed inside a tag called <response>: Roomba Wi-fi Remote translate the answer to a block sensors frame that allows reading all sensors at a time.


This file contains the sensors values read through an information request to the iRobot Roomba (same information that can be got from the file explained before).

The difference is that in this case the information contained in <rX> tags disappear (<name> and <value> fields are not used). In order to clarify the differences between the two files, find below an example of rwr.xml file (compare it to a Roomba.xml file).

Tagged with: , , , ,
Posted in Developers, RoombaWi-fi Remote v2