[RE-RELEASE] iRobot Scheduler

Two things. What version of nodejs do you have on the pi? And also did you change the TLS cipher setting?

Node: v12.18.2

I don't recall every having done that as I wasn't aware that was needed (or frankly don't know what that does), so probably not, are there instructions for that?

Cool that version of node should work. I’ll get the cipher variable later tonight. Not at home right now. It was “documented” as in it was mentioned in the GitHub issue thread but that’s all I saw.

ROBOT_CIPHERS=TLS_AES_256_GCM_SHA384 npm start --prefix=/home/pi/rest980-basement&

That's the command I have setup in my rc.local, it works for me. Without that ROBOT_CIPHERS though the app can't communicate with the roomba.

2 Likes

If you've set it up in systemd, you can add this line in your /etc/systemd/system/roomba.service file, under the [Service] section...

Environment="ROBOT_CIPHERS=TLS_AES_256_GCM_SHA384"

EDIT: added quotes above

Should accomplish the same end of having the ROBOT_CIPHERS set in the environment for the nodejs process(es)

2 Likes

Life savior. That did it for me!

I tried that before going the rc.local route, but it didn't work for me.

What I was really hoping to do is have this managed by PM2. But was struggling to get the startup environment right.

Thank you both, I'm not NOW sitting with a working HE + J7 Integration!! :raised_hands:

2 Likes

Hoping and guessing you meant now :upside_down_face:

Haven't ever tried PM2, but this page might help? PM2 - Environment Variables

1 Like

Loving this integration. Successfully have an automation capturing my current lights state before turning all of my lights on, then restoring the previous state after the Roomba is done cleaning.

One question I have for you @dkilgore90 - is how often does this app poll for status? This app is the most active app on my hub, and am interested in tweaking a bit if possible to reduce how often it's checking.

It polls every 30s - see the Cron expression here: https://github.com/dkilgore90/iRobot/blob/master/Roomba/Roomba-app.groovy#L1285

I can easily make this configurable - there is one catch... previous developers built in a dormancy check: https://github.com/dkilgore90/iRobot/blob/master/Roomba/Roomba-device.groovy#L134-L158 - to try to auto-recover if for some reason the App stops calling the driver - this checks once a minute, and triggers an App initialize if there is no action within 5 minutes. Obviously if the App polling rate is adjusted, this dormancy check would need to back off too.

Super helpful! I don't mind making the change in my own app code for now, as I do prefer to move the polling to every 60 seconds, which would probably mean I should change the dormancy check to every 1.5min or 2min.

If in the future you made this configurable in the UX, that would be awesome. But it might just be me looking to reduce the pull.

1 Like

60s you're probably ok, I was more thinking if it only polls every 2min or even 5min, then the cutoff to re-initialize the app needs to go from 5min to 10 or 15...

1 Like

Where are the png files for the dashboard? Thank you.

Ex: roomba-charge.png

Never mind. I found them,

Yep, that's the original repo - same images also in my forked repo here:

Ok. Thank you for responding.

So glad I stumbled upon this thread. I just bought an iRobot Roomba J7+ and this looks like the best way to get it integrated into my smart home. The Alexa integration is super lame constrained by the limitations of routines. Will give this a whirl and let you know if it works.

Make sure you add the ROBOT_CIPHERS for the J+ as outlined in this (or one of the following) post: [RE-RELEASE] iRobot Scheduler - #29 by dman2306

2 Likes

I had to reinstall my Braava Mop from scratch because I had a hardware problem. Thankfully iRobot just sent me a full replacement. After setting up successfully in the iRobot app, I wanted to reinstall this awesome app on my pi4 and HE.

Would it be correct to assume that I can start with the Rest980 configuration steps in these instructions? Since my rpi is unchanged from the prior Mop, I'm assuming I don't need to reinstall Dorita980 and Rest980. And the rpi already has a share drive and already has Node and GIT installed.

Despite all this, after pressing Dock/Spot on the mop and getting the tone 2 seconds later, when I pressed the "Press any key in the SSH Windows #2", I got the below error message, which I've never seen before. Any ideas? I do have the correct IP address and it is reserved. TIA...

Then press any key here...
Robot Data:
undefined
events.js:377
throw er; // Unhandled 'error' event
^

Error: connect EHOSTUNREACH 10.0.0.21:8883
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1159:16)
Emitted 'error' event on TLSSocket instance at:
at emitErrorNT (internal/streams/destroy.js:106:8)
at emitErrorCloseNT (internal/streams/destroy.js:74:3)
at processTicksAndRejections (internal/process/task_queues.js:82:21) {
errno: -113,
code: 'EHOSTUNREACH',
syscall: 'connect',
address: '10.0.0.21',
port: 8883
}

Make sure you don't have your iRobot App open on your phone, as only one client is allowed to connect via your local LAN. If your phone is occupying that connection, then dorita980 cannot, and vice versa (of course your phone can fall back to the cloud connection)

If you want to manually test that the connection can be established from your Pi, you could try running command nc 10.0.0.21 8883 and hit enter a few times. If it can't connect it should return an error, otherwise it might print some garbage binary data or just blank lines. Can ctrl-C to exit the command and get your prompt back.

Sure enough I did have the iRobot app open on my phone. After I killed that (hard closed), I reran get-roomba-password and got the same error. Repeatedly. Grrr. My router definitely sees the Braava.

When I issue "nc 10.0.0.21 8883" and enter a few times from the command prompt, I just get the command prompt after a second or two, without any errors or anything else. FWIW my pi4 is headless--I am using SSH from MacOS via Terminal to control the pi. Maybe this has to be done physically from the pi?

EDIT: I ended up reading up on Dorita980 and trying some other diagnostics. I think my problem is actually with a flaky wifi connection. The mop shows shows up on the router then disappears. If I then open the iRobot iOS app, sure enough it says the robot is not connected to the network. Weird. I think I need to solve my robot connectivity issues first. BTW, when I did "nc -zv [IP address] 8883" instead of just "nc [IP address] 8883", I got the expected "No route to host response". After rebooting the robot and seeing it was connected to the network (and making sure the iOS app was closed), I did the nc command, and got a succeeded response. Thinking I was in great shape, I went back to get-roomba-password and still got the same error.