NickWaterton / Roomba980-Python

Python program and library to control iRobot Roomba 980 Vacuum Cleaner
MIT License
377 stars 106 forks source link

Script to start clean #94

Open usamitysam opened 3 years ago

usamitysam commented 3 years ago

Great project thanks. Fresh installed with a freshly build config file that makes sense.

I'm trying to write a very simple script to start a default clean cycle on a e5 with nothing special, exactly like hitting the CLEAN button on the Roomba. I took examples/simple.py change the address, blid, and roombaPassword (as shown in config file) and commented in 'myroomba.send_command("start")'. I thought that would be all. While a bunch of XML does flash by the screen, the clean/start cycle does not kick off. LEDs light up on the Roomba, but it never takes off. Not sure what I'm doing wrong.

Thanks in advance for the assistance.

NickWaterton commented 3 years ago

Try “clean”, I haven’t tried an e5 (should work though).

Sent from my iPad Nick Waterton P.Eng.


From: usamitysam @.> Sent: Sunday, August 8, 2021 3:58:21 PM To: NickWaterton/Roomba980-Python @.> Cc: Subscribed @.***> Subject: [NickWaterton/Roomba980-Python] Script to start clean (#94)

Great project thanks. Fresh installed with a freshly build config file that makes sense.

I'm trying to write a very simple script to start a default clean cycle on a e5 with nothing special, exactly like hitting the CLEAN button on the Roomba. I took examples/simple.py change the address, blid, and roombaPassword and commented in 'myroomba.send_command("start")'. I thought that would be all. While a bunch of XML does flash by the screen, the clean/start cycle does not kick off. LEDs light up on the roomba but it never takes off. Not sure what I'm doing wrong.

Thanks in advance for the assistance.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FNickWaterton%2FRoomba980-Python%2Fissues%2F94&data=04%7C01%7C%7Cda26973630f54e3a7b8608d95aa6e087%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637640495040760185%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=hvdUFmzicZu4pZNLkyOvih9jHZCkmj8AALQ%2FSmJDT0k%3D&reserved=0, or unsubscribehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FACYJIZ3UVLAXH5LXD427DATT33OV3ANCNFSM5BYZVUWQ&data=04%7C01%7C%7Cda26973630f54e3a7b8608d95aa6e087%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637640495040770127%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=AcMw0Cp5AStUZorjQvpSwNsICiQ51fyoPzPEXchlaqE%3D&reserved=0. Triage notifications on the go with GitHub Mobile for iOShttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapps.apple.com%2Fapp%2Fapple-store%2Fid1477376905%3Fct%3Dnotification-email%26mt%3D8%26pt%3D524675&data=04%7C01%7C%7Cda26973630f54e3a7b8608d95aa6e087%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637640495040780099%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=qHaMOn0yTb2WdxkGiKeVYTmXkxeHHl1ss1PQPwzIcO0%3D&reserved=0 or Androidhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.github.android%26utm_campaign%3Dnotification-email&data=04%7C01%7C%7Cda26973630f54e3a7b8608d95aa6e087%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637640495040780099%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=DwpQYsqveGFSklVVZ5xU7Xuy%2Fd87RAg1MhfQovABKBE%3D&reserved=0.

demono10000 commented 2 years ago

I had the same issue. Adding delay between connect() and send_command() helped.

async def test():
    myroomba.connect()

    await asyncio.sleep(5)

    myroomba.send_command("start")

    import json, time
    for i in range(10):
        #print(json.dumps(myroomba.master_state, indent=2))
        await asyncio.sleep(1)

    myroomba.disconnect()