janitoo_roomba package

Submodules

janitoo_roomba.roomba module

The Roomba Janitoo helper It handle all communications to the Roomba vacuums

class janitoo_roomba.roomba.Roomba900(bus=None, addr=None, **kwargs)[source]

Bases: janitoo.component.JNTComponent

check_heartbeat()[source]

Check that the component is ‘available’

command(command, value=None, args=None)[source]

Send command to the roomba 900

get_battery_charge(node_uuid, index)[source]

Return the battery charge

get_battery_left(node_uuid, index)[source]

Return the battery charge

get_battery_percent(node_uuid, index)[source]

Return the battery charge

get_cycle(node_uuid, index)[source]

Return the current cycle

get_phase(node_uuid, index)[source]

Return the current phase

get_status(node_uuid, index)[source]

Return the dock state

get_telemetry()[source]

Roomba method which fetches telemetry data about the robot. {

“status”: “OK”, “method”: “getStatus”, “sku”: “”, “country”: “”, “postalCode”: “”, “regDate”: “2016-06-23”, “hardwareVersion”: “”, “manualUpdate”: 0.0, “swUpdateAvailable”: “”, “schedHold”: 0.0, “autoEvacCount”: “”, “autoEvacFlags”: “”, “wifiDiagnostics”: “”, “autoEvacModel”: “”, “milestones”: “”, “robotName”: “Roomba”, “robotLanguage”: 1.0, “tzName”: “Europe/Paris”, “twoPass”: 0.0, “noAutoPasses”: “”, “openOnly”: 0.0, “carpetBoost”: 0.0, “binPause”: 1.0, “vacHigh”: 0.0, “noPP”: 0.0, “ecoCharge”: 0.0, “mission”: “{“nMssn”:8,”done”:”cncl”,”flags”:32,”sqft”:0,”runM”:0,”chrgM”:0,”pauseM”:1,”doneM”:0,”dirt”:0,”chrgs”:0,”saves”:0,”evacs”:0,”pauseId”:0,”wlBars”:[0,0,0,0,0]}”, “preventativeMaintenance”: “[{“partId”:”bin”,”date”:”2016-06-23”,”distance”:55,”runtime”:0,”months”:0,”notified”:false},{“partId”:”core”,”date”:”2016-06-23”,”distance”:55,”runtime”:0,”months”:0,”notified”:false},{“partId”:”extractor”,”date”:”2016-06-23”,”distance”:55,”runtime”:0,”months”:0,”notified”:false}]”, “cleanSchedule”: “{“cycle”:[“none”,”none”,”none”,”none”,”none”,”none”,”none”],”h”:[0,0,0,0,0,0,0],”m”:[0,0,0,0,0,0,0]}”, “robot_status”: “{“flags”:8,”cycle”:”quick”,”phase”:”run”,”pos”:{“theta”:0,”point”:{“x”:0,”y”:0}},”batPct”:97,”expireM”:0,”rechrgM”:0,”error”:0,”notReady”:0,”mssnM”:0,”sqft”:0}”, “softwareVersion”: “v1.2.9”, “lastSwUpdate”: “2016-06-23 17:55:55+0000”, “engBuild”: “”, “bbrun”: “{“hr”:0,”min”:8,”sqft”:0,”nStuck”:0,”nScrubs”:0,”nPicks”:23,”nPanics”:0,”nCliffsF”:24,”nCliffsR”:34,”nMBStll”:0,”nWStll”:0,”nCBump”:0}”, “missing”: false, “ota”: “{“st”:0,”err”:0,”lbl”:”“}”

}

set_button(node_uuid, index, data)[source]

Return the dock state

class janitoo_roomba.roomba.RoombaRoowifi(bus=None, addr=None, **kwargs)[source]

Bases: janitoo.component.JNTComponent

For roowifi

check_heartbeat()[source]

Check that the component is ‘available’

command(ip, port, device, command)[source]

Other way to acces the roowifi using a simple tcp socket. A simple copy paste ... does not work

get_battery_capacity(node_uuid, index)[source]

Return the battery

get_battery_charge(node_uuid, index)[source]

Return the battery

get_battery_percent(node_uuid, index)[source]

Return the battery charge

get_current(node_uuid, index)[source]

Return the current

get_state(node_uuid, index)[source]

Return the dock state

get_telemetry()[source]

Roomba method which fetches telemetry data about the robot.

Other values that can be implemented:

  • sensors[‘Bumps Wheeldrops’] = self.j[‘response’][‘r0’][‘value’]
  • sensors[‘Wall’] = self.j[‘response’][‘r1’][‘value’]
  • sensors[‘Cliff Left’] = self.j[‘response’][‘r2’][‘value’]
  • sensors[‘Cliff Front Left’] = self.j[‘response’][‘r3’][‘value’]
  • sensors[‘Cliff Front Right’] = self.j[‘response’][‘r4’][‘value’]
  • sensors[‘Cliff Right’] = self.j[‘response’][‘r5’][‘value’]
  • sensors[‘Virtual Wall’] = self.j[‘response’][‘r6’][‘value’]
  • sensors[‘Motor Overcurrents’] = self.j[‘response’][‘r7’][‘value’]
  • sensors[‘Dirt Detector - Left’] = self.j[‘response’][‘r8’][‘value’]
  • sensors[‘Dirt Detector - Right’] = self.j[‘response’][‘r9’][‘value’]
  • sensors[‘Remote Opcode’] = self.j[‘response’][‘r10’][‘value’]
  • sensors[‘Buttons’] = self.j[‘response’][‘r11’][‘value’]
  • sensors[‘Distance’] = self.j[‘response’][‘r12’][‘value’]
  • sensors[‘Angle’] = self.j[‘response’][‘r13’][‘value’]
  • sensors[‘State’] = State[int(self.j[‘response’][‘r14’][‘value’])]
  • sensors[‘Voltage’] = self.j[‘response’][‘r15’][‘value’]
  • sensors[‘Current’] = self.j[‘response’][‘r16’][‘value’]
  • sensors[‘Temperature’] = self.j[‘response’][‘r17’][‘value’]
  • sensors[‘Charge’] = self.j[‘response’][‘r18’][‘value’]
  • sensors[‘Capacity’] = self.j[‘response’][‘r19’][‘value’]
  • sensors[‘battery-level’] = int(self.j[‘response’][‘r18’][‘value’])*100 / int (self.j[‘response’][‘r19’][‘value’])
get_temperature(node_uuid, index)[source]

Return the temperture

get_voltage(node_uuid, index)[source]

Return the voltage

set_button(node_uuid, index, data)[source]

Return the dock state

set_drive(node_uuid, index, data)[source]

Drive the robot

janitoo_roomba.roomba.make_roomba900(**kwargs)[source]
janitoo_roomba.roomba.make_roowifi(**kwargs)[source]

janitoo_roomba.thread module

The Roomba Janitoo helper It handle all communications to the Roomba vacuum

class janitoo_roomba.thread.RoombaThread(options=None)[source]

Bases: janitoo.thread.JNTBusThread

The Roomba thread

init_bus()[source]

Build the bus

janitoo_roomba.thread.make_thread(options, force=False)[source]

Module contents