Litter Robot Manager app

Looks like Whisker has made some changes to their APIs or sites in the last few days. My robots have stopped reporting or turning on/off as automated. A few days ago, the authentication through the HE app was working but the mobile app wouldn't log me in. Turns out their previous App was replaced by a new Whisker app. And as of tonight the authentication through the HE app no longer works. Stating Invalid API keys. I'm don't think @natekspencer is around anymore. Or if someone else took over the development/management of this app.

Yep. Dominic Meglio ported Nate Spencer’s SmartThings integration to Hubitat a few years ago, then Nate Spencer left SmartThings for Home Assistant and has been developing his integration for Home Assistant, where it now supports LR3, LR4, and the Whisker feeder. Dominic Meglio left Hubitat for Home Assistant over a year ago.

Nate Spencer makes several updates/changes to his Home Assistant Litter Robot integration each week, trying to keep up with Whisker’s API changes. Most of his Home Assistant stuff works.

When the Hubitat Litter Robot integration authentication broke on August 22, I put my Litter Robot on Home Assistant and brought the devices back to Hubitat through HADB. That part works fine. Still working on getting the Gauge reset function to pass from Hubitat to Nate’s Home Assistant integration. Right now, the LR Gauge reset seems broken everywhere (whisker app, Home Assistant integration, and, of course, Hubitat).

One I get that working, I will study Nate Spencer’s revised Python code for the authentication changes on Home Assistant and see if that portion can be put into the Groovy Hubitat version. Part of the difficulty is that Nate Spencer’s code hasn’t stabilized on Home Assistant, and keeps changing a few times a week, as it has for many months. It’s a nice integration, though, and does work on LR3, LR4, and the Whisker Robot Feeder.

Details on how to bring Litter Robot from Home Assistant to Hubitat are here:

2 Likes

Good to know. I was just looking at updating my LR3 to be smart. Looks like I may be better off with a simple project to tap into the DFI (drawer full indicator) and keep everything local.

It shouldn’t work at all. Whisker is blocking anything with a Home Assistant header currently as they are upgrading the authentication method or something like that.

Well, DFI is an issue. Yes, you can expose it in the Hubitat Litter Robot driver (it’s a one line addition, I posted it a couple of years ago) but it now is useless. I talked with Tom Denton, the Whisker head of software, a year or so ago, just after he had taken over software at Whisker and brought development in house from an outside contractor. He insisted that DFI couldn’t be reset from the API, neither the old nor the new API, and it certainly can’t be reset from the new Whisker app. However it was able to be reset from the old Whisker app (which uses the old API that the Hubitat integration uses), but Tom Denton wasn’t willing to dig into the old Litter Robot app and figure out what it did differently from the new Whisker app to make DFI resettable. He stated that DFI was broken in the LR3 firmware, which wasn’t going to be updated. Tom indicated that DFI couldn’t be depended on, and should be worked around (which I did, see below).

As you may know, the old Litter Robot app has been pulled from the App Store, and, right now, it won’t authenticate with or onboard with a Litter Robot 3 (it never worked with LR4). So, it looks like Whisker is full steam ahead with the new API.

Simply for posterity, here are the Rules necessary to create a functioning virtual DFI.

Create these Hub Variables:

Only virtualDFI is of interest. The others manage under counter Hue light strips which flash when there is a Litter Robot error condition.

Here is the Rule:

Of course, with authentication to the Litter Robot broken right now, these don’t work. Nate Spencer’s Home Assistant automation doesn’t expose Online/Offline the same way as the Hubitat Litter Robot device, and I’m still testing to see whether all of the codes are passed.

Respectfully, I beg to differ. Nate Spencer has worked around that. It is working. Here is my Hubitat rule that logs the codes brought to Hubitat from Nate Spencer’s Litter Robot integration on Home Assistant, using HADB bring the status to Hubitat:

and here are my logs:

If I change the first-posted Rule above (LR Status Monitor) to reference the HADB imported codes (which are now lower case) and HADB attributes from Home Assistant, that rule will work. The only part I haven’t gotten working is passing a button back to Home Assistant to press Nate Spencer’s waste reset button on Home Assistant. The reset button isn’t working anywhere right now (not even Whisker app) during this upheaval by Whisker.

Nate Spencer’s Home Assistant integration doesn’t expose Cycle Count, so that’s left from the (non-functioning, at present) Hubitat device driver.

I’m slowly testing each of the codes to be sure that the Home Assistant codes are simply lower case versions of the Hubitat driver codes. Testing is slow. When that is done, I will change the LR Status Monitor Rule.

I just know that mine stopped working last week and Nate posted this:

Yep, I saw that, but there have been updates since then. It has been working for me for several days since I installed HADB.

Oh, how I detest figuring out the YAML to get the Waste Reset button working.

1 Like

Not to get off topic, as I really would love for this integration to be fixed and not put my LR's into HA, but.... The reset button within the app worked for me yesterday. It's slightly buried, as in not as simple as it was before. But it reset my percent full to 0 when I pressed it.

1 Like

Ok, I will redouble my efforts, then. My first priority is to get the Rules working again on Hubitat, and the fastest way is to use HADB on Home Assistant to bring Litter Robot to Hubitat.

It’s more complex to fix the authentication on Dominic Meglio’s Hubitat port because the Hubitat integration is written in Groovy to the old Litter Robot API, while Nate Spencer’s newer Home Assistant integration is written in Python to the new/different/changing Whisker API for the Home Assistant architecture.

Neither the old Whisker API nor the new Whisker API is published. Reverse engineering is required. Nate Spencer did the reverse engineering of the old Litter Robot API for his SmartThings integration (which Dominic Meglio ported to Hubitat), and Nate Spencer did (and is doing) the reverse engineering of the new Whisker API, which is changing again to adopt a new authentication procedure.

Nate is better at reverse engineering than I am, and I would rather let him do the heavy lifting.

It may not be possible to just change the authentication section of the current Hubitat Litter Robot integration because Whisker might not allow authentication to the “old” API (used by the old, now defunct, Litter Robot app) in favor of the “new”, extensible (for other products) Whisker app.

The only solution may be to do a complete rewrite of the Hubitat integration to the new API. That’s a bigger effort than what Dominic Meglio did by porting Nate Spencer’s SmartThings Groovy integration to Hubitat, which has a similar architecture to the old SmartThings system in Groovy. It would mean a rewrite of Nate Spencer’s Home Assistant Python integration, which is written to the new Whisker API on the Home Assistant architecture, to Hubitat’s architecture in Groovy. Sigh.

1 Like

My LR3 is still the "dumb" version. So, I intend to literally tap into the DFI wiring harness. I need to put a multimeter on it, but expect that I can run some sort of electrical signal to a Zigbee GPIO board.

Spending $100 for a new circuit board and then enduring API hell sounds like less fun.

I don’t believe it’s that simple. The litter level is sensed by a laser (LED) beam across the top of the waste drawer. That beam is then sensed and processed by the microprocessor and debounced and latched in software. It’s also reset (or should be, apparently that doesn’t work too well).

The DFI sensor comes on and off as the poop drops through the hole and compacts the poop in the drawer. I see the code sometimes go DF1, DF2, then RDY as the poop level gets compacted below the beam, so that the codes will do another cycle or two before again showing DF1, DF2, DFS.

If it were me, I’d spend the $100 to upgrade to the WiFi Connect board.

But keep us informed if you succeed.

I just added the LR integration into HaaS and then chuckled. The robots are seen as Vacuum's?
image

I'm also assuming this "Docked" state will change as the robot cycles. Is this where the DF1, DFS, statuses appear? I see it shows "Ready" now when I click on it. It integrated pretty easily and since I'm using MSR, I hope to not have any issues changing my logic.

df1, df2, dfs, rdy, etc. appear in the Status Code entity. Yep, it’s presented as a robot vacuum.

HADB brings it over as separate child devices:

HADB is really a nice bit of software, just works, and the HA Litter Robot integration is nice, too. Doesn’t expose Cycle Count on LR3.

1 Like

I know this is a little off topic, but is there a way to control the power to the LR via HA? I see that the vacuum status changes from "Cleaning" to "Docked" during a cycle, and "Off" when turned off via the app or control panel. I'm looking for a way to turn the robot off during the night, but longer than the 8 hour sleep time. It looks like the "Power Status" entity doesn't work, yet?

Power Status seems to be just that - AC / DC (battery) / NC (unpowered). It’s a status (sensor), not a switch.

There is no way to turn the LR on or off remotely, but you can make it sleep (stop doing cycles) at night for a given time.

Well, assuming you bring the HA Litter Robot into Hubitat via HADB, you could set a Sleep Start time and then, via Rule Machine, 7.75 hours later, set a new Sleep Start Time, which would lengthen the sleep. Of course, you would have to reset the Sleep Time each night, but that’s easy to do with Rule Machine. Or, you could write some YAML (oh, joy) on the HA side and do it there.

I hope your cats can hold it in that long. Mine will poop on the floor if the Litter Robot stops cycling because of a full litter box. They now expect clean litter in their Litter Robot.

That's an idea, but perhaps a little more logic programming that I care to do. I used to have the LR on a smart plug that would watch for power draw. If there wasn't any, and it was between a certain time frame, turn off. But then the HE LR integration came and I moved that plug. It's not the end of the world, but a power on/off would be nice. Even if it were only on the HA side. The use of MSR allows me to create logic/rules from either hub, without the need for HADB. Which I was running for quite sometime when I had Aqara sensors in the house. I've ditched those since, just need to create a post to sell them

You can turn off/on the device via the vacuum.turn_off/on services in HA.

That information is missing in the Services section of the HA Litter Robot documentation. Thanks for the info, Nate. Great driver.