Litter Robot (Cat box monitoring)

Hi @zpriddy – I updated to the latest release and seem to have run into a problem. Here’s what happened:

  1. Updated the device type and smart app in the IDE
  2. Uninstalled the old device type and smart app, then reinstalled the new versions
  3. Went to set up the app, but found under the “Litter Robot Virtual Device” the litter bot was not an option that could be selected.

As a bit of extra info, I tried the uninstall/reinstall process twice, and also noticed that under “Auto Shutoff Options” I can select the littler bot virtual device in the “Litter Robot Switch” list.

Am I missing something here? Thanks for any help you can offer!

1 Like

Hahaha…

So when i fixed it from type ‘Dimmer’ to no longer being dimmer… I never fixed the smartapp to reflect that…

If you pull the newest version you should be good to go!

I also posted another smart app that will turn of the litter robot for X minutes based off of something being triggered… i.e. When i go to bed I don’t want the litter robot to run for the next 60 minutes so I can fall asleep…

@GuyInATie - I hope this fixes your problem

Hi @zpriddy – Thanks for having a look and fixing the bug. Hate to be a pain, but it seems there’s another one… Here’s what I did:

  1. Uninstalled the previous version of the smartapp and device so I could start fresh
  2. Installed the newest device and smartapp using your code on Github and the ST IDE interface
  3. Cycled the litter box, but found the device sits in the ‘cleaning’ mode indefinitely and never increments the cycle counter.

Thoughts?

This is a bug that I ran across once before… I thought I fixed it… But try to press the reset button and see if that fixes it.

I did push another update that should fix this problem… Let me know if you’re still having it. Ill take another look.

Hi @zpriddy – I tried your suggestion and hit the reset button, but it didn’t seem to resolve the issue. Just updated the app and will let you know what I see over the next day or so of usage… In any case, thanks again for staying on top of this one. I hope you submit a version to be published in the ST Marketplace.

Late to the game, but the Litter Robot is, uh, litterally one of the most valuable lifestyle purchases I’ve ever made. Instead of scooping and bagging for 5-10 minutes every morning, buying Litter Genies and refills, and managing two different litter boxes in different rooms for my two cats, I just swap out a garbage bag once a week and top it off with fresh litter when it’s getting low.

It’s one of those devices in my life that if it breaks, I won’t waste time thinking about whether I should replace it or not. The new one would be on order immediately.

2 Likes

@EvilBit - I totally agree! My fiancée thought I was stupid when I spent the money on it… But after a month of having it she now thinks it was the best investment that we have ever made!

Hi @zpriddy – just checking in to let you know what’s going on with the latest update. Unfortunately, the Litter Bot SmartApp still isn’t counting the open/close events. The Litter Bot device activity log picks up events that read “ZP Litter Robot SmartApp sent on command to Litter Bot” every time the cleaning cycle is initiated, but the count never increments, and no other information is tracked in the recent activity log.

I’m wondering if part of the problem is because I’m using a different litter box – here’s the picture on Amazon:

Half of the open/close sensor is mounted on purple hatch, while the other is on the white frame. As a result, the closed/open/closed cycle happens in about 25 seconds. This is enough for the open/close contact sensor to see the activity, but perhaps there’s something about the SmartApp that doesn’t track events this quickly…?

Did you replace both the smartApp and the device code? or just the smartapp?

@zpriddy I replaced just the SmartApp since github indicated the device type hadn’t been recently updated. Since you asked, I tried updating the device type today. Again, no luck.

What if you try ‘Cycle Count’ then ‘Reset Count’ then ‘Cycle Count’ -> Thats what I had to do once when this bug happened to me… If not can you send me some of the logs as it runs and you execute these commands?

Hi @zpriddy – I tried the cycle/reset/cycle command sequence you suggested but still haven’t had any success (was away over the weekend, so out of sight, out of mind). In any case, here’s what I’m seeing in the live log:

b187e5a2-0516-468b-8b07-9d0f28760b6a 10:20:24 AM: trace LitterRobot Cycles = 1
b187e5a2-0516-468b-8b07-9d0f28760b6a 10:20:22 AM: trace LitterRobot Cycles = 0
68abee71-5969-44c4-9edb-25ad496bdc7a 10:20:22 AM: trace SET COUNT TO 0
b187e5a2-0516-468b-8b07-9d0f28760b6a 10:20:20 AM: trace LitterRobot Cycles = 2

Thanks again for help in trying to debug this one!

Cat people are weird.

1 Like

I know that there is a 5 minute delay before it will count the cycle… Could that be it?

@zpriddy I don’t think so – it’s been sitting at the same number despite numerous open/close cycles over the last couple days. Does the sensor have to stay open for a certain period of time in order to register in the virtual device?

This is probably another stupid question to ask… But the door sensor is ‘Closed’ when the litterbox is not cleaning right?

Im just trying to think of anything it could be… :confused:

Correct – it generally sits in the ‘closed’ state, opens for about 10 seconds during the cleaning, then returns to closed.

Let me ask this one – the litter bot switch in the Auto Shutoff Options of the SmartApp is the same switch as the virtual device, right? For my particular catbox, cycling power does not initiate a cleaning cycle. Thus I just figured I’d point it back to the virtual device since… well… Since it seemed to make sense…?

No - That would be for a smart outlet. However even setup that way it should not interfere with it.

Okay… I just removed the virtual device from the switch and then noticed another peculiar thing. If I cycle the litter box and wait for it to finish its cleaning cycle, the count remains unchanged even if I wait 5+ minutes. But if I go into the SmartApp settings page and simply click ‘done’ without changing any settings, then I see in the litter bot’s activity log a message that says “ZP Litter Robot SmartApp sent cycleEnd command to Litter Bot” and “Litter Bot cycle count is #” where # is the incremented count of cycles! In other words, opening the SmartApp up seems to update the counter! I just tried it a couple different times and it’s definitely reproducible. Thoughts?

Try to replace the roboHandler code in the smartApp with this:

def robotHandler(evt)
{
	robotSwitch.on()
	if (evt.value == "open" && state.cycleInProgress == false )
    {
    	log.trace "New Cycle Starting.."
    	litterRobot.cycleStart()
        state.cycleInProgress = true
        log.trace "Counting Cycle in 3 minutes."
        runIn(3 * 60, countCycle);
    }
    if (evt.value == "closed" && state.cycleInProgress == false)
    {
    	litterRobot.cycleEnd()
    	litterRobot.on()
    }
}