natekspencer / pylitterbot

Python package for controlling a Whisker connected self-cleaning litter boxes and feeders
MIT License
87 stars 11 forks source link

Litter-Robot 4 Compatibility #14

Closed elmigbot closed 2 years ago

elmigbot commented 2 years ago

Was wondering if you had any information on compatibility?

I'm willing to help if not. Just placed an order.

Thanks!!

natekspencer commented 2 years ago

No idea as of right now. There's a lot of new features in the LR4, so I expect it will actually use a new endpoint for a lot of things. I'll need to get my hands on one so I can figure it out haha

pdivers commented 2 years ago

I just got mine. Let me know what to do and how to do it if I can help

natekspencer commented 2 years ago

I've made some decent progress on this in the lr4 branch. I'm hoping to push a release of it in the next day or two.

elmigbot commented 2 years ago

I've made some decent progress on this in the lr4 branch. I'm hoping to push a release of it in the next day or two.

Wow! Great Work. I haven't even received mine yet!

Shadow00Caster commented 2 years ago

@natekspencer I just received my LR4, if there is anything I can do to assist (pcaps or whatever) please don't hesitate to reach out, more than willing.

natekspencer commented 2 years ago

I've released beta version 2022.8.0b0 which has support for Litter-Robot 4 if anyone wants to test it out. There are quite a few changes internally to allow for additional robots (feeder-robot for instance), but I tried to make it as backwards compatible as possible.

Shadow00Caster commented 2 years ago

I've released beta version 2022.8.0b0 which has support for Litter-Robot 4 if anyone wants to test it out. There are quite a few changes internally to allow for additional robots (feeder-robot for instance), but I tried to make it as backwards compatible as possible.

@natekspencer I can test it out

Shadow00Caster commented 2 years ago

@natekspencer Sorry, how do I use the beta in HA?

natekspencer commented 2 years ago

@natekspencer Sorry, how do I use the beta in HA?

Good question, haha. That's a little more complicated in HA. You'd probably have to check out my branch and run it locally until my code changes get merged if you are trying to test that way: https://github.com/natekspencer/home-assistant-core/tree/litterrobot

But if you want to test just the python code, you can download the package python3 -m pip install pylitterbot==2022.8.0b0 and then run the sample file: https://github.com/natekspencer/pylitterbot/blob/main/sample.py

jfarley248 commented 2 years ago

Dropping in on this thread to say great work!

I got the beta working in HA by indeed checking out the beta branch, and moving only the litterrobot component into the my HACs custom_components directory, adding an arbitrary "version":"54445", entry to the manifest since that's required to override default components. Once I did that, restarted and added the integration as usual, the litter robot 4 populated under entities.

(I'm also unsure if this is best practice or not, so if anyone knows if this is a no-no or something let me know!)

natekspencer commented 2 years ago

Awesome, thanks for validating that! I don't think it goes against best practices and it was actually on my mind as a a possible suggestion. Just remember that you'll want to delete the custom component when it is released or you'll have to continue making the necessary syncs on your own.

natekspencer commented 2 years ago

Support added in pylitterbot==2022.8.0