[RE-RELEASE] iRobot Scheduler

Yes, the 2nd one should contain my latest code. I think HPM uses the author from the repository.json, but I'll update my packageManifest to avoid confusion

1 Like

Thanks, yeah in your app manifest I see "Aaron Ward" as the package author and David isn't mentioned anywhere, so was super confused which HPM package has the latest.

Ok. I've followed all of the instructions and have the server up and running on my Pi,
image

For the life of me I can't get the app to work, and am not seeing anything in the logs that I recognize as an issue.

Any thoughts?


.
.
.

Edit: Probably worth calling out I have the new "J+" rumba... not sure if things are different.

Not sure, you might be the first user with a J model...

The App tries to call http://192.168.0.66:3000/api/local/info/state - you can check this in your browser, should return a large JSON object.

Additionally, when you click Done on the App page, it will try to run this query - if it hits an error (which seems likely from what you pasted, it should generate an error log: Rest980 Server not available: $e - where $e is filled in with the actual exception hit

Looks like it, I don't think the two dependent libraries support the J yet, so that query gives me an empty JSON. :frowning:

No worries, I'll wait to see if those projects ever update to include J support, which I was lucky to have been gifted.

Did some reading on the dorita980 project that supports this App - seems the process to get the robot password for the mqtt connection changed in the latest firmware (which of course applies to the J series)...

Now it has to go through the cloud API, as discovery mode cannot be retriggered once the robot has connected to wifi. The developer of dorita980 implemented a new command for this, and documented it here: https://github.com/koalazak/dorita980#how-to-get-your-usernameblid-and-password

Give that a try, update the configuration on your pi, and relaunch the rest980 service -- see if we get any further

Note: the above method was only published a couple days ago, so you may need to update dorita980 on your pi

Great catch, but luckily I did do this and that is how I got my passwords when following your steps, as the "hold" instruction would just kick off the vacuum bin, so I went to the dorita980 git readme to see if there was a workaround and found the cloud API.

Now, I have a suspicion that http://192.168.0.66:3000/api/local/info/state doesn't behave the same on the J. The next thing I'm going to do is see if I can get any of the /info/ states when the Roomba is in action, as on the dock I'm getting empty JSON returns.

Ok. Let me know... there was much discussion around the J7 in this issue: https://github.com/koalazak/dorita980/issues/142 - I think it was opened by @dman2306 - maybe he has some guidance?

1 Like

The only other item I can suggest would be to review /var/log/syslog on your pi for any errors or details that might provide insight into dorita980 and/or rest980.

1 Like

Yup. J7 is working fine for me. I went down the road of using a proxy on iOS (I used Charles, not Thor as described in that thread, but same principles apply). After grabbing the blid and password everything just worked as expected both on the dorita and Hubitat side. The state command is working fine for me.

1 Like

Interesting. I went the cloud API route to get those, I wonder if those are wrong or different enough? Would love to be in your state.

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.