Petsafe Smart Feed 2.0

There are two infrareds, infrared 1 gives you the top level of the container, the lower the infrared reading the lower the food and I assume it’s to measure the levels ‘full’ and ‘low’, whereas the infrared 2 will give you the levels ‘low’ and ‘empty’. Although, come to think of it I did build a sensor to give me the % but to be honest I think the sensor you created is more than enough, the infrared readings are not that precise anyways.

Ah! Didn’t know about that, thanks.

Just have one last suggestion for easier integration with google assistance for eg. (took this idea from the Litter-Robot integration) which is to create one device, under the domain ‘vacuum’, with all the information from the sensors including the button to feed, my example below:

vacuum:
  - platform: template
    vacuums:
      pet_feeder:
        friendly_name: Pet feeder
        unique_id: pet_feeder
        start:
          - service: rest_command.feed_the_tigers
        value_template: >-
            {% if states('sensor.petsafe_notification').lower() == 'unknown' %}
                error
            {% else %}
                docked
            {% endif %}
        battery_level_template: "{{ states('sensor.feeder_battery') }}"
        attribute_templates:
          notification: "{{ states('sensor.petsafe_notification') }}"
          food_level: "{{ states('sensor.food_level') }}"
          food_level_%: "{{ states('sensor.food_level_2') }}"
          last_feed: "{{ as_timestamp(state_attr('sensor.petsafe_notification', 'created_at'))|timestamp_custom('%I:%M%p %d/%m/%y') }}"
          battery_installed: >-
            {% if is_state_attr('sensor.petsafe_battery', 'is_batteries_installed', false) %}
                Not intalled
            {% elif is_state_attr('sensor.petsafe_battery', 'is_batteries_installed', true) %}
                Installed
            {% endif %}
          payload: "{{ state_attr('sensor.petsafe_notification', 'payload') }}"

And btw, please share your “Buy Me a Coffee” link when you can :wink:

Just installed this via HACS. Setup was a breeze. I did only have 2 entities for the first few minutes (child lock, and feeding pause) but shortly after the remaining entities populated (feed button, battery level, food level, last feeding, and signal strength). I am using the SmartFeed 2.0 (Amazon.com). Excellent work @dman2306. Thank you very much for your efforts on this.

1 Like

Let me think about the vacuum. Something seems “wrong” about making a pet feeder a vacuum, but interesting to see that’s how Litter Robot works so I’ll take a look at that. No donation necessary, but my link is Buy Me a Coffee :slight_smile:

2 Likes

Thanks Dominick, working great! Would you be able to add a sensor for timing/idle of the litterbox? I want to increase the air purifier speed if the box is not idle (aka, the cats just used the box).

Thanks! You mean to know when it’s in the mode where it detected the cat has used it but it hasn’t yet run?

Yeah exactly, if it is idle/timing/raking status

Thanks again!

Got it, so basically a sensor with values like “idle” “timing” “raking” and I guess I’d add “jammed” for the state when the bar gets stuck. All of that is available in the API so it’s possible. Let me see what it would take.

Edit: Actually I have to see if it sends an update when the rake is running or just after it finishes

1 Like

Got it working, just want to do more testing.

Turns out the device does NOT report when it’s in the middle of raking unless you manually pushed the button which is a little odd. So what I did is, if the current time >= time_of_cat_in_box + rake_delay and the status is still “timing” then it means the rake should be running (because the timer elapsed) and so I set the status to “raking” this should be accurate except for one corner case:

  • Cat in box, then you lost power or internet

I think it seems reasonable to say we’ll have bad data in that situation.

I just want to put it through its paces for a day or so and then I’ll push out an update.

image

Sound awesome, looking forward to it

If you enable beta releases for the PetSafe integration in HACS (it’s hidden in the Redownload option), you can install 1.1.0-b1 which has this sensor added if you want to give it a try and let me know if it works for you

Thanks, updated this morning and looks good so far!

1 Like

Been working great for a week. Beta had a timing bug but release after that has been solid. Have been able to ramp up my air purifier automatically after the cats do their thing.

Thanks again!

1 Like

Yeah I discovered my logic was backwards right after I released the beta so it should be good now. Out of curiosity, how well does the air purifier help you out? I haven’t considered that but I’d love a way to contain the odors

Yeah it works decent depending on the age of the litter. For the most part it keeps odour down until the box hits ~60 rakes and then it’s just time to change it.

1 Like

What purifier do you use?

Levoit, unfortunately just cloud based through VeSync integration but that was pretty much my only options on Amazon.ca at the time.

1 Like

Anyone else searching for this, the repo is now listed in HACS so you no longer need to setup the custom repository

2 Likes

Trying to get this integration working, but I never see any devices/entities show up. The only unique thing about my deployment might be that I have two separate feeders, both under the same account. Is it possible that the integration doesn’t parse for multiple devices?

I have two boxes and one feeder, all three are coming through fine. I don’t have multiple feeder’s however.

Curious if any others using this integration have experienced frequent disconnect/logout from the account in Home Assistant. For the past few weeks about once per day I get a notification that the integration needs to be reconfigured and I have to repeat the login process (type in email, get code from email, paste into HA and submit) to fix the integration. If anyone has an idea of possibly what causes this or any potential workarounds it is greatly appreciated. Thanks!