[RELEASE] A bunch of various integrations (no longer maintained)

It wouldnā€™t be the same code. Itā€™d require someone to code support for the feeder.

There are two apis right now, the litter robot api and the autopets api. Autopets is completely different and seems to be firebase based. The litter robots api seems easier, though it is going away some time in 2021. Iā€™ll have to think of a path forward. Litter robots api seems like a 5-10 hour fix. Autopets seems like 40+ and
Iā€™d have to get my workbench setup to sniff all the firebase stuff. Thatā€™ll take some time. Either way, they changed it significantly enough that there is a bunch of work :frowning:

Well, if you need assistance testing, there are a bunch of us to help.

First thanks for maintaining the litter robot manager integration. It seems this is a common problem with all of these companies in terms of nerfing their own products, not understanding that automation isn't about a bunch of standalone devices, but integration. I don't understand their motivation in this case though as they don't make money on maintenance. It seems this company should benefit from playing friendly with developers. Would it be helpful if us owners started opening tickets and putting pressure on their support to open up their API? The only benefit I have obtained from the wifi connect is the integration with my hub... otherwise it's just a really expensive and virtually unneeded app.

I suppose it wouldnā€™t hurt. But I donā€™t know that it helps either. I have spoken to the Autopets COO, Jacob Zuppke, and he at least recognizes the value of an api. He had told me it was originally in their 2020 plans but, as with many businesses, plans changed in 2020 due to COVID-19. So maybe at some point they will but who knows when. The reality is most of these companies arenā€™t thinking of home automation, theyā€™re just checking the box of ā€œwe have an appā€

Really quick and dirty fix, https://raw.githubusercontent.com/dcmeglio/hubitat-litterrobot/new-api/smartapps/natekspencer/litter-robot-manager.src/litter-robot-manager.groovy it will probably break at some point (I need to implement reauthentication/error handling) but it would be helpful if a few people could test. You'll need to run through the app to set it up again -- you might get a cryptic error at some point, exit the app and go back in and it should be good (but please let me know if it happens!)

I have more work to do but at least wanted to see if this works for people. But now I'm calling it a night, I'll look more tomorrow.

I get this when trying to run the app now.

There is an if statement inside the mainPage method that needs to be removed but Iā€™m not by a pc at the moment.

Edit: just tried submitting the fix from my phone but no promises that worked since I canā€™t test.

Ok, now, different error on app install:

Previously, I had the same error as @Bear

Steps: removed old driver & app, uninstalled from HPM, imported new app code, imported old driver code, installed new app, got error.

Something didnā€™t commit right. Can you try again?

Ok, trying now.

Ok. Iā€™ll look at it tomorrow.

Thanks. Get a good nightā€™s sleep, donā€™t let the litter bugs bite.

1 Like

Actually I saw the cause of that error and fixed it but that occurred because you got an access denied. Are you sure the email and password is correct? If so Iā€™m wondering if the secret is user specific (usually they are not)

Yes, I am sure my email and password were correct. I will try the whole process again to be sure (I just now restored a backup). Will go through process again:

Delete old app, delete old driver, uninstall with HPM, import new app, import new driver, install app.

1 Like

Ok then Iā€™m at a slight loss here

Same error on install app, but different log error.

Iā€™m never getting to the point in the app where I enter credentials. This happens immediately on install app, select user app, ...

I can tell I am pasting the correct driver code, because I see the attribute exposure that @Bear had you add a month ago.

I can tell I am getting the new app because I import directly from the link you provided above, and I see the different uri endpoints.

Get some sleep.

Made a bunch of fixes, give it a try now.

1 Like

Looks like it works! Everything looks good. Restoring rules now to fully test. I believe you can put it into HPM (I used the app from your link above, with the older driver code) so manual install not necessary.

Thanks so much!

Edit: Restored all rules, everything works great!

For those of you struggling with the order in which things have to be updated/restored (I certainly did), this might save you some time:

  1. backup your database. If things go badly, you need this to come back to.
  2. export any RM rules that use the Litter Robot device, because they are going to break. As a warning, if you do this on an iOS (iPad, iPhone) device, iOS will append a .txt suffix to the file, which means that RM will not import it back (wants to see .json). Doesn't matter whether you export a bunch of rules or just one rule, same issue. You will have to go to a computer and delete the .txt suffix in order to import (below).
  3. delete the RM rules that you exported, which used Litter Robot device. If you want, you can check the "In use by" section on the LR device to see that all are gone. All that should be left "In use by" are dashboards, the tiles will break but can be fixed easily (below).
  4. Remove the Litter Robot Manager app.
  5. Remove the Litter Robot device. You will see a complaint that the dashboards are using the device, ignore that.
  6. If you had installed the Litter Robot integration via Hubitat Package Manager, uninstall the Litter Robot integration. This will delete the Apps Code for Litter Robot Manager and the Driver Code for Litter Robot. The driver code for Litter Robot does not change, but, sigh, it gets deleted.
  7. import the modified Litter Robot Manager app code from @dman2306's link for the fixed code:
    https://raw.githubusercontent.com/dcmeglio/hubitat-litterrobot/new-api/smartapps/natekspencer/litter-robot-manager.src/litter-robot-manager.groovy
  8. import the old Litter Robot driver code from @dman2306's GitHub repository:
    https://raw.githubusercontent.com/dcmeglio/hubitat-litterrobot/master/devicetypes/natekspencer/litter-robot.src/litter-robot.groovy
  9. install user app Litter Robot Manager, enter credentials. Your login should be successful. Do the configuration for the app.
  10. import (not restore) the RM rules that you exported above in step 2. An import is needed because this is a different Litter Robot device, and you need to get the chance to choose the newly-installed device.
  11. Go to any Dashboard child apps that showed Litter Robot attributes, check the checkbox for the new Litter Robot device so that it can be used on those dashboards. Go to each dashboard, fix those broken tiles. For some odd reason, after selecting the Litter Robot device, the attribute selection list for Litter Robot device doesn't appear, only HSM attributes. Choose Last Updated, close the tile editor, open the tile editor, and you will now be able to choose from the Litter Robot attributes. :man_shrugging:

Enjoy! And thanks, Dominic (@dman2306).

Also verified - Great work, and much appreciated. The kittehs thank you. :slight_smile:

1 Like