#Dog food - auto order

1 messages · Page 1 of 1 (latest)

white fable
#

Howdy! I have a problem with my dog food. I have a "subscribe and save" setup on amazon. but it never shows up on time.

If I use a weight kit and esp home, is there a way for the system to auto order another bag of dog food (from either chewy or amazon) when the dog food bins get low? I can get the esp home end figured out, but it's the other end– the ordering– that I don't quite know how to process.

astral cipher
#

This might be a good place to start... I don't believe that Amazon offers the ability to auto order any more (Dash) but the HA elements should be pretty simple:

automation:
  - alias: "Dog Food Low Alert"
    trigger:
      - platform: numeric_state
        entity_id: sensor.dog_food_weight
        below: 5  # pounds
    action:
      - service: notify.mobile_app_your_phone
        data:
          title: "Dog Food Running Low"
          message: "Only {{ states('sensor.dog_food_weight') }} lbs remaining"
          data:
            actions:
              - action: "ORDER_FOOD"
                title: "Order Now"
            url: "https://www.chewy.com/yourproduct"

This will at least give you a prompt on your mobile phone with the link to the product which you can of course customise. There's a load of other automations that you could look at as well, but this feels like a 'keep it simple' might be the best approach.

If there's an API that Chewy offers then there would be the ability to add/order a product then this could be enhanced further, as well as using Zapier to trigger with Amazon directly perhaps, but I would suggest keeping the trigger logic in HA then using an external integration if you want to do more than the notification approach?

astral cipher
#

I'm not based in the US, but I've seen that PetCo offer an API interface which might give you a better option: https://rxapi-prod.membership-prod.petco.com/. Worth reaching out to see what the art of the possible is. If they're able to give you an API key for your account, then automating the ordering would be downhill from there.