Litter Robot Connect

Thank you so much! I now have something to play with. I was starting to lament that there wasn’t anything new for me to integrate for the past few months. I’ve been scanning the forum for something like this to pop up but it’s been mostly threads to help IRIS refugees. (Not that there’s anything wrong with that. :slightly_smiling_face: )

And also thanks for the laugh with that Device Name on the screenshot.

I’ll count that as a win then, haha. But that seriously has been the name of my robot since I got it and didn’t want to bother changing it.

Let me know how the integration goes. I’m definitely interested if someone else is able to utilize it. I know there is room for improvement with some of the capabilities and reporting of statuses. I used the proposed robotCleanerMovement capability, but since that isn’t actually live, it’s kinda just a hack of what I wanted to do. It would be nice to actually utilize the alarm state from that capability and be able to control other devices or alerts for a “full” drawer or other issues. I may need to repurpose the contact sensor or look into child devices for additional data to accomplish that, but didn’t wanna venture too far down that path without getting an initial release out and some feedback from other owners/developers/smart home enthusiasts since it’s my first SmartThings integration.

Also, it unfortunately suffers from the same issues as the official Android Litter-Robot app since it uses their reverse engineered API and not every command to the robot is honored on the first attempt. :man_shrugging:t2: Not sure if the iOS app does any better, but I’m guessing it doesn’t.

I just installed the app and dth and so far so good. I set up a smart lighting rule to turn on the bathroom fan when motion is detected in the robot and turn it off after 5 minutes. (I assume motion detection reflects if a cat is currently in the robot?) I haven’t tested it… but I should notice if it works in the next 24 hours.

I hadn’t noticed the API was inconsistent on my Galaxy S9 Android, but I never use the app other than for full drawer notifications.

I concur that being able to detect a drawer full event would be great for triggering Alexa, etc. From what I could tell, the open/close capability is used to indicate the cycling status? Maybe button capability would be better than switch? I don’t know much about the button capability, but does a button have additional states besides on and off? So maybe the additional states could be used for cycling, etc. Maybe a long press or double click could be used to initiate the cycling.

Update: I’m not sure if my last paragraph makes sense now that I look at the device page again. I see that you are indicating the cycling state outside of the sensor capability and you use a separate tile to control the bot power. Do you really need that open/close sensor for a cycling trigger? Or can the switch state be used to trigger routines, etc? And maybe button lends itself to multiple states better than a switch for triggering?

Just an update… the smart lighting rule I created to run the bathroom exhaust fan for 5 minutes when there’s “motion” in the litter robot appears to have executed this morning. Very cool. Thanks again for putting this together.

1 Like

The reporting status in the app is pretty consistent and seems to be based off of the last reported update from the unit. Mine will sometimes briefly read as “Offline” if the API has attempted to reach the unit and didn’t get a response (or whatever their logic is). That usually resolves fairly quickly though. I have also noticed that mine occasionally misses a status update from the unit (Clean Cycle In Progress without an associated Clean Cycle Complete or vice versa). Not sure if that is an issue with my unit and/or WiFi setup or a Litter-Robot server issue since I haven’t actually captured the traffic being sent from my unit to sniff it out. When a command is sent from the app it occasionally does nothing and I have to try it again. Again, that might be an issue with my setup if it is having communication issues, so maybe other setups are more reliable. All my info is based off of my one robot in one setup, so who knows, haha.

As far as capabilities, some of them are slightly redundant or have only one status reported by the unit that differs in how they get updated. Motion, as you said, is triggered by the cat being in the robot which is reflected by two statuses from the API: cat sensor timing and cat sensor interrupt. I’m not actually sure if the cat sensor interrupt status resolves itself eventually or if manual intervention is needed. If the latter, then motion would remain active until it is resolved.

Contact (open/close) is used for any time the bonnet is not in the normal stationary position. So it shows as open during the following statuses: Bonnet Removed, Clean Cycle In Progress, Cat Sensor Interrupt, and Clean Cycle Paused. I haven’t actually removed the bonnet on my unit to test that status, but probably will at some point just to see.

Switch capability is currently used for the on/off feature where you can actually turn the unit “off” without cutting power to it. I figured the way switches show up in other SmartApp configurations/selections that it made more sense since it is an on/off set of statuses with associated on/off commands. It would probably be just as easy to switch (no pun intended) this to indicate the drawer full status though as “on”. Then you could trigger rules based on when and/or how long the switch is on like you mentioned. The associated commands would then do nothing. I could then implement the power on/off like I did the night light, sleep mode, and panel lock features. I’ll have to think about this one! Other thoughts on it?

I looked at Button briefly, but didn’t implement it since I wasn’t really sure about it and it doesn’t hold on/off statuses natively.

I also thought about using the Alarm capability for drawer full statuses, but chose not too because I thought that might cause an unintentional trigger in people’s Smart Home Monitor setups, haha.

The Robot Cleaner Movement capability actually has an alarm state. But like I stated earlier, it’s only proposed in the SmartThings documentation and I haven’t seen it used elsewhere.

I’m glad your lighting rule worked! That’s way rad! :slight_smile:

1 Like

Finally figured out how to reset the gauge based on @Collisionc’s work and my own reverse engineering. It appears that this information is not stored physically with the robot and is only on the LR servers associated with that particular unit. (Hypothesizing). You actually use the same patch command as changing the name, but can omit the nickname to reset the gauge:

x-api-key: Gmdfw5Cq3F3Mk6xvvO0inHATJeoDv6C3KfwfOuh0
Authorization: token that is given upon login, unique to the account.

    "cycleCapacity": "35",
    "cycleCount": "0",
    "cyclesAfterDrawerFull": "0"

This will set each of the properties above to the specified value. Meaning you can theoretically up the cycle count to whatever you want. I’m not sure if Litter-Robot eventually resets them to a standard amount. All three parameters are required as well, or else you’ll receive an “Invalid parameters supplied” 500 error message.

It looks like my litter robot has been mia from ST (shows offline) since May 5th.

Resolved: Actually, the wifi wasn’t communicating at all. The litter connect app also showed offline. I had to hard reset the robot by unplugging it while it was turned on and wait 10-15 seconds before plugging it back in.

Mine has done the same thing. I actually have a smart plug attached to it so I can hard power cycle the robot remotely.

Just a heads up for everyone, IFTTT support has been enabled:

I tried it out a little and it works pretty well.

1 Like

Awesome. Going to try this right now! Thanks!

Anyone having trouble with this integration today? The Litter Robot app is working fine, but the last activity in the ST device history was yesterday and I cannot control the device in the classic ST app. I tried powering the LR off and on… no improvement.

Update: The integration appears to be working again as of this morning. I’m not sure if I just needed to wait after powering off/on the LR, or if there was some temporary backend issue that got resolved.

Thanks for creating this Litter Robot Smart App. I got it up and running in the Classic Smartthings app but is there any way you can add code to remotely trigger the “Reset” button? My Litter Robot 3 Connect which is only 2 months old just started getting the Dump Position Fault. I can clear the fault if I physically press the reset button but when I’m away or at work I would need a way to do it remotely.
Right now my only work around is when I get the notification of the Fault is to remotely power off then on the unit which activates a clean cycle but the Dump Position Fault returns.
I was hoping you can add a button in your app to activate the “Reset Button”

Litter Robot support should help you get that sorted - at 2 months, it’s under warranty (that includes shipping costs).

That said, we ran into an issue that sounds similar to yours with the pinch detect terminals - rather than replacing them, I just sanded them and bent them a little bit, and it’s been working great since. Not sure if that’s the same error you’re running in to:

How is this integration working for everyone? Are you running into issues? Mine stopped working on 9/9. I can still access the LR via the LR Connect phone app, but ST isn’t working. I haven’t tried powering off/on the LR yet. But I’m wondering if there could be something unaccounted for in the DTH code that is causing this to happen.

Update: I went into the Litter Robot Manager ST Smart App and could see that the API authorization was in a Disconnected status. I had to re-authorize and it connected again. I wonder if there may be an expiration issue that needs to he accounted for in the DTH? Or could this have been caused by an ST hub update that recently occurred?

Sorry for my delayed response, @RU0929 .

There is a “<R” command that is valid to be sent to the endpoint that I haven’t programmed into the SmartApp, but I haven’t determined what it actually does. I’m not sure if it is the same functionality as the “Reset” button on the front of the Litter-Robot or a simple refresh request that is sent to the robot. I haven’t been able to find a command for the “Empty” button either. My guess is that they don’t exist because they aren’t part of the Litter-Robot App’s interface either. And probably from a safety concern, they don’t want them to be triggered remotely.

As @ydant said, you should be able to reach out to Litter-Robot directly if it is an ongoing issue.

@TylerDurden, I occasionally have had to re-authorize as well. The token expires every 24 hours, so I wrote the SmartApp to attempt to re-authorize every day and refresh the token. It seems that the Litter-Robot authorization URL occasionally times out, too. Since the SmartApp only tries to hit it twice in a row before giving up, you’ll see this. I should probably build in an exponential back-off strategy for refreshing the token so that it doesn’t completely lose the integration and will keep trying.

1 Like

Did anyone determine how to calculate the UDP Checksum?

I never figured it out. I got as far as dumping the flash directly from the chip and reversing part of it, but I could never find the checksum generation.

Oh, and I also managed to mitm the device and get a python app to act as a relay to the server. Basically, if anyone ever figures out the checksum, I could create a home assistant integration that would act as a master for the litter robot and also relay commands to the server.

so is this a dead device handler? I am about to purchase this unit. hoping that someone has tweaked it.

With or without the device handler go ahead and get it @MikeBro97 if you’re thinking about it. I have mine for about 2 months and it’s the best ‘‘tech’’ I purchased in years. I’m in no way affiliated with LR but for cat owners this is truly an amazing invention. I’m sure anyone that has one feels the same. The price is quite high I agree but that’s honestly the only bad thing about it. And since it works with ifttt it’s pretty easy now to link it with your other smart devices like the roomba :wink:

© 2019 SmartThings, Inc. All Rights Reserved. Terms of Use | Privacy Policy

SmartThings; SmartApps®; Physical Graph; Hello, Home; and Hello, Smart Home are all trademarks of the SmartThings, Inc.