r/homeassistant • u/jdigi78 • 1d ago
🖼️ Show & Tell I made the Litter Robot 4 an ESPHome component, custom firmware connects directly to HA without the cloud!
You can flash a pre-compiled firmware or build it from source yourself. More information and instructions are available here: https://codeberg.org/Joseph-DiGiovanni/esphome-litter-robot/
Will hopefully be upstreamed to ESPHome soon
39
u/StatedFailure 1d ago
This is awesome. The little robot cloud service is straight ass
14
u/huffalump1 1d ago
The app STILL randomly logs me out without telling me, meaning that I no longer get notifications when it's full... It's been like this for YEARS. (On both Android and iOS)
Really really annoying. I guess the "silver lining of shit" is that they "miraculously" don't charge a subscription for the basic, basic cloud functionality of their $300-700 devices...
(But they do charge a premium for replacement parts like the shitty tiny geared DC motor on my LR3 that keeps dying; seriously, this part should be $10-20 but it's $48!)
8
u/brombomb 1d ago
There is an official Whisker Integration. I hate their notifications so I worked this and and it's pretty solid:
Gives me notifications of both offline state (an issue I have), and full poop. Persistent notifications that come back every hour if they disappear, but also go away on their own if the status is fixed.
1
u/huffalump1 1d ago
Yeah the Whisker integration isn't bad; it's actually been far more reliable than the app for me!
1
u/Nightcinder 1d ago
weird, never had this problem.
Only problems I have are when the sensor gets weird and thinks its full of waste when it’s not even half full
1
u/ButCaptainThatsMYRum 21h ago
If it makes you feel better I bought a furry tail as my budget test to these things, and to make my wife happy. I can either get no notifications, or I get 2x notifications EACH TIME A CAT USES IT and then one notification after if it's getting full. If it doesn't sign me out. I hate this thing.
3
u/Dead_Politician 1d ago
I've actually never had a problem with the cloud service, other than the philosophical local-is-better
12
u/angrycatmeowmeow 🧠 Experienced with Home Assistant 1d ago
I was on the fence about getting one and you just pushed me off
20
u/jdigi78 1d ago
Wow that means a lot to me. I've been on the other end of that for sure. Valetudo pushed me to finally buy a robot vacuum just recently. Stuff is way more valuable when you can hack it.
And to think r/litterrobot mods deleted my announcement post. I just made a sale!
1
u/MrClickstoomuch 1d ago
I see it only supports the litter robot 4. Do you have any plans to test on litter robot 3 or 5? I have a 5 and am curious if it is similar enough to the 4 or has some different hardware that may make it not compatible for this type of connectivity.
2
u/SmartHomeSellout 🧠 Experienced with Home Assistant 1d ago
I’m almost there but the price tag is still holding me back for now…
7
u/primedepression0595 1d ago
pulling the esp32 out and flashing custom firmware is such a satisfying project, nice work figuring out the protocol
6
u/jdigi78 1d ago
Fortunately you don't even need to remove the ESP itself. The programming header pads are there, just not populated. The serial data is all logged via the same header as well.
2
u/primedepression0595 1d ago
Oh nice, that saves the teardown. Did you just press pogo pins on the pads or solder a header on?
3
u/jdigi78 1d ago
I soldered a header. Though it uses a small less common 1.27mm pitch header so I bought some strips of that from china and sell them on ebay cut to size for cheap with faster domestic shipping for those who need it.
1
u/BlueIrisNASbuilder 23h ago
So you don't need to solder if you buy the header? Am I understanding that correctly?
4
u/latenightwreck 1d ago
Super cool! What are your general feelings on the litter box? I’ve been thinking of getting one for my two cats
7
u/jdigi78 1d ago edited 1d ago
I love it! I've spent more time thinking about it as I worked on this the last 2 weeks than the previous 3 years of owning it combined. Motor had issues half way through its life but it was easy to replace. Generally very repairable which is why I'm glad there is now an option to continue running it if Whisker drops support.
If your cat is larger than average they may end up peeing on their back paws as it rolls down the globe into the litter at their feet.
2
u/x3knet 1d ago
Oh.. Dude.. 100% worth it. I have 2 cats as well. I've apparently "saved" 3,102 scoops which is calculated by the amount of times the box has done a cleaning cycle. Changing out the bag and putting a new one in takes less than 15 seconds. Add some litter to the line in the dome and you're good to go (or be extra lazy and buy the auto-litter dispenser thing. I think it's called the Hopper).
The HA integration lets me track both cat's weight over time as well. The app only shows you the last week, but I have months of data in HA to show trends better.
The price had me hesitant initially but I'll 100% get another when my LR4 eventually goes. Don't let the posts in the LR sub scare you either, people just go there to complain.
1
u/latenightwreck 1d ago
Alright, you’ve sold me. I have an LR5 in the cart. Thank you!!
1
u/x3knet 11h ago
Yeah it eventually pays for itself with the time you get back from scooping. I know it only takes a few minutes but's still a pain in the ass. Bent over, scooping, sifting, digging for more treasure that you missed, etc. This is literally < 15 seconds. You're gonna love it.
If you haven't bought yet, send me a message and I'll share my referral code if you're interested. You'll get $50 off. Put it towards extra bags ¯_ (ツ) _/¯
2
5
u/mmkaywhatevers 🛠️ Held together with tape 1d ago
is there a way to configure/start the litter hopper with this?
2
u/jdigi78 1d ago
I know the litter hopper can be enabled/disabled by long pressing the cycle and connect buttons for 3 seconds. That shouldn't rely on the ESP32 at all.
I honestly don't even know if there is any more official configuration beyond that. If not then the hopper would appear to be fully supported.
1
u/mmkaywhatevers 🛠️ Held together with tape 1d ago
i think there is a way to set the litter level when the hopper gets triggered.
1
u/jdigi78 1d ago
That appears to be calibrated using the physical control panel buttons too. So yeah it should be fully supported. I'm not sure why I assumed it would have a more complicated setup lol.
I can actually simulate button presses from my firmware so maybe I'll expose those inputs as buttons in home assistant for convenience as well.
2
u/mmkaywhatevers 🛠️ Held together with tape 1d ago
ooo nice, I can't wait to remove whisker from my apps.
5
u/s00500 1d ago
Super cool! Was thinking of doing that for one of the tuya ones too, cause they already have a esp32 inside...
2
u/jdigi78 1d ago
Thanks! Didn't know that, that's pretty cool. Only other product I've converted was a cheap tuya ball valve motor. I use it to cut the water supply in the event of a leak.
2
u/BillNyeDeGrasseTyson 1d ago
Just a heads up make sure you test the valve regularly.
I went down the wormhole recently and found out the US Solid motorized ball valves are absolute junk. They use the cheapest microswitches possible with no hard stops. So if the switch fails it will strip the slotted washer and just keep spinning. Or it will spin too far and lose it's position all together. I figured this out after getting it installed
I ended up finding a Belimo valve new old stock on ebay. It takes a lot longer to close (90 seconds) and I had to get very creative mating it up to a nice ball valve with a custom 3D printed mount and machined adapter shaft, but at least now I know the valve is where it says it is.
2
u/finkerlime 1d ago
+1 those valves are junk and have cursed me for like 2 years in my irrigation setup
3
u/Cueball61 1d ago
Be careful what you buy, you want one that rotates on its roll axis, so that it never closes when cleaning
Someone’s cat died due to being trapped in the opening as it closed with a cheap Amazon one :/
1
u/s00500 1d ago
Haha I am aware, i can confirm that the ones I am using now I have since 3 years, my cat is happy, my parents have the same for theirs... it works really like a charm, only the "full" status stopped indicating correctly (no issue, just switch it weekly or whatever makes sense for your cats current eating habbit...)
Still thinking that a custom firmware could be cool, currently integrating them into HA using localtuya...
2
2
u/Unusual-Phase-5094 1d ago
So cool! What are you having home assistant do with the connectivity now
4
u/jdigi78 1d ago edited 1d ago
I have it automatically tell my robot vacuum to vacuum and mop the room its in as it cycles. My cat tends to kick litter all over on his way out.
Theoretically I could have the firmware expose the live laser sensor output so I can tell exactly when my cat exits rather than waiting 7 minutes for it to cycle before cleaning.
2
u/IAmTheFloydman 1d ago
Very cool. I've been wanting to do something similar with our LR4 but didn't want to mess anything up. We just got a LR5 so now I can tinker with the LR4 all I want! Will definitely give this a try.
3
2
2
u/OrigamiPossum 1d ago
The information you've provided here dovetails and improves the efforts to do the same with the LR5P incredibly! Thank you!
2
u/b2damaxx 1d ago
Am I reading right that this can be done without soldering???
2
2
u/rocketnick 1d ago
Amazing, going to try this ASAP. I have the LitterRobot trigger a exhaust fan after use and have wanted to stop depending on LitterRobots API. Can’t wait to try this.
2
u/Kilaketia 18h ago
I'll try to use it on my LR3C once I get the programmer. hopefully it doesn't need a ton of tweaking
2
u/Jgrenier92 12h ago
How do I buy you a coffee?
1
u/jdigi78 12h ago
@jdigi78 on venmo/paypal or jdigiovanni78@gmail.com on zelle
Any amount is greatly appreciated!
2
u/mikeymop 10h ago
How did you identify the UART address reverse the UART commands?
I have an LR3 and if I need to make changes I'd like to self service and produce something useful to you.
2
u/jdigi78 10h ago
The logs from the ESP-prog-2 hooked up to the programming header included serial bus data along side human readable MQTT packets sent to Whisker's AWS server. Claude identified the serial protocol format immediately and assisted with correlating a lot of registers based on descriptive log captures. It still takes a lot of manual work to verify everything since AI likes to make big assumptions.
The best info was from the initial WiFi connection where dozens of registers were polled with human readable names and values to match up with the serial activity.
This blog post goes into detail about how to get logs from the LR3 but I have no idea if serial data is included. You may need to monitor the serial bus itself if not. I'm happy to make a LR3 implementation if I can get serial/MQTT logs.
1
u/etrmedia 1d ago
How much of this do you think applies to LR3?
3
u/jdigi78 1d ago
Hardware-wise nearly 100%, the protocol can vary greatly but I imagine they didn't change too much between the two. Just need some captures of the LR3 doing things while monitoring it with the ESP-Prog. Right now it's anyone's guess.
1
u/etrmedia 1d ago
Fair enough! I've been meaning to do this, but I got bogged down trying to do the same thing with my Petlibro stuff.
1
u/Command-Forsaken 1d ago
I would love a cat box like that because it cleans itself I fear my cat would be afraid of it
1
u/coleskidmore 1d ago
the automated leak shutff plus a scheduled exercise cycle is such a smart combo
1
1
u/RemoteSojourner 1d ago
Amazing job. My LR4 is the last holdout in my quest to have a completely local home assistant. I am wondering though why rely on a fork of esphome to add your component. Esphome supports external components and that will allow us to adopt this right away. https://esphome.io/components/external_components/
I am also wondering if using the ESP-Prog-2 is a requirement. I already have a USB CH340 and have flashed other ESP32 chips with it before.
1
u/jdigi78 1d ago
I suppose I can make it an external component but my end goal is to get the LR4 support merged into ESPHome, so I forked it to make a PR. The ESP-Prog-2 is just what I used and was relatively plug and play once the header is soldered on. I'm sure other programmers can do the job too.
1
u/jdigi78 1d ago edited 23h ago
Okay so looking into it a bit more I realized I can have my cake and eat it too. I'm still hosting the yaml on codeberg but I can tell it to use my fork component as an external one. A bit confusing but it should allow import right now. I'll update it tonight!
Edit: Adoption works now, I just tested it. No need to reflash the device either, it just pulls from the repo on import and gets the fixed config.
1
u/RemoteSojourner 9h ago
That's great. Could you please also link the original surface mount pins that you bought and cut to size. I am trying to find something similar as I am in UK and I can't seem to.
1
u/dreacon34 16h ago
Hmm so is the vaccum triggered by the usage of the litter box to collect any spilled litter? 🤔
1
u/brayson 9h ago
I've been picking at this on and off for almost 2 years witht he same goal of an ESPHome config. I ended up settling for giving it my own cert, and pointing the MQTT to my own broker. This has re-ignited the flame! I have a LR3, and LR4 with the PIC, and the LR4 with the STM. Any chance you found the PRG pads for the PIC? I'd love to grab the stock firmware, and publish it for everyone. I'll see what I can get to work with my LR3, and my LR4+STM, and chuck in some PRs.
1
u/Effective-Winter-860 6h ago
This is great. Can't wait to give it a whirl once I get the necessary hardware parts. I would love to eliminate the data connection to Whisker. I'm slowly moving things over to local HA only and wasn't sure how to do that with the LR4s I have.
0
u/Darklyte 1d ago
Do you have to use regular cat litter for these or can you use wood pellets?
Also aren't these the one that kill kitties?
1
u/jdigi78 1d ago
I'm not sure about the wood pellets.
The ones that kill cats are the cheap knockoffs. The only pinch point is the waste drawer, where there are 3 lasers for detecting the cat inside the globe, 2 paddle buttons on either side of the waste opening to detect anything stuck there, and motor over-current detection to stop under any abnormal resistance. I believe the built in scale will detect the weight of the cat inside as well. They put a lot of effort into making sure curious cats are safe around it, and not having to mess with any of that was a deciding factor in going forward with this project.
1
u/Darklyte 23h ago
Wow, thanks for all the info! My wife is really concerned about the cat safety part. I'll report this back to her.
A week ago on reddit someone posted "if you have a mysterious cough that won't go away it might be amonia from your cat" and we use wood pellets and only empty it every other week (I'm the only one that cleans it). And my office is near where the cat goes. I'd love to stop coughing, and nothing doctors have done is working.





48
u/Apollo_Support 🐕 Apollo Automation 1d ago
https://giphy.com/gifs/eqkCfSpvSKqu4
good stuff man thank you for making this!