Jumbo.com integration (Dutch Supermarket)

As I am getting my groceries with Jumbo.com already for a while through delivering it at home, I was missing an option to display this in Home Assistant. Especially when I was expecting a new delivery.

Therefor I reverse engineered their mobile API and built an integration for Home Assistant.

You can follow the instructions here for installation and usage:

@Voxxie created a custom lovelace card. You can follow the instructions here for installation and usage:

6 Likes

Very cool! Iā€™ll give it a try soon!

1 Like

Very interesting. But this is only based on your own orders.
Is it possible to scrap their website to see when new timeslots are available for ordering?

Indeed, it currently only shows you your next order. Iā€™ve seen an API endpoint to see possible new timeslots, however they seem to fill fast so I am not sure if it makes sense showing them in HA!?

Thatā€™s exactly the reason. When you have a sensor with available timeslots you could send a notification in order to reserve a timeslot through their website.

That would be absolutely brilliant indeed. Those timeslots are a pain in the ass especially right nowā€¦ a notification when there are slots available would be a great addition.

I had to go to jumbo.com to see what it was. Then I clicked on the beer order link. 5 hours laterā€¦

1 Like

Wauw looks promising !

But i canā€™t get it to work at me Intel NUC running HassOS. ( see the issue i logged at the repository)
Its warning my about missing ā€˜jumbo_apiā€™

Any update on HACS ?

I will check your issue.

In regards of HACS, there is a pending PR: https://github.com/hacs/default/pull/367

Work-around: add https://github.com/peternijssen/home-asssistant-jumbo to the settings as a repository.

1 Like

@heartkingz @bhartman How would you see this sensor? Is the state the next available timeslot available? Would you pick a certain day (like Wednesday) and want to know the next available timeslot on such a day? Or would it be like the orders that you see the next available timeslot and in the ā€œmore infoā€ dialog you see all available timeslots?

For me I would like to see the next available timeslot after a certain date (so that you donā€™t get all available slots but only the ones youā€™re interested in), or as an alternative in combination with an order frequency (# days) after your last confirmed order.

Could that be possible through that jumbo api?

Well, I donā€™t think the API can but we can do that within the code. The only thing is that we need to store that date somewhere. Putting it within the configuration.yaml file isnā€™t really helpful, as you would need to restart/reload HA every time you change the date.

So I am thinking more from an ā€œautomatedā€ system, for example the first available moment, 5 days after your last order., in which 5 is a configurable number within the settings of HA.

A general notice by the way to all: Itā€™s not an official supported API. So if they ever change something, the system will break and we need to fix it. I donā€™t think they change the API that often, but just to be aware.

Maybe it would be a idea you can choose which days you want to have exposed in configuration.yaml. If i speak for myself we pick up the groceries in the weekend.
An idea could be to make only one sensor and expose the days on the attributes side?

Installation with HACS went smooth. I see both sensors, however when I open the jumbo_order sensor I see my first order, but also the following :

orders   [object Object], [object Object], [object Object]

When I go to the developer portal and check the state attributes all order information is visible.

And a quick question: when does it updates itself? When HA restarts, or periodicly?
(edit) looks like it updates itself every 2 hoursā€¦

Hmā€¦ strange that I see the information myself. Will check.

And yeah, currently updates every 2 hours. I am always a bit holding back with using unofficial APIs as I want to avoid flooding their system, being marked as a bot and then have to delete the integration. Happy to change it to a more suitable setting if we think it should be different :slight_smile:

I would sugest that you use a state for that, for example input_number.day_numer so that you only see slots from that day. Or maybe you can select nput_numer.week_number. It is easy to edit those states with automation scripts.

For example if you recieved an order, that you build a automation script that automaticly search for a new slots for the specific weeknumber/date.

I am not a hero at Python, but I just released version 0.3.0. This contains a third sensor named ā€œjumbo.time_slotsā€ indicating the next available time slot. Within the more dialog you can see any future time slots available.

Time slots are based on the store that you configured within your account. So no need to configure a store at the side of HA.

Any javascript guru might also be capable of creating a custom lovelace card, showing all the information nicely. I might start up that process soon. Letā€™s first get the data in sensors so automations can be created.

2 Likes

Wow thatā€™s fast. I see the available timeslots as a sensor. Unfortunately all with the text [object Object], [object Object] while in the developer states I see the actual values.

Iā€™ll try to figure out why this happens tomorrowā€¦

For me they are showing correctly in the more info window. Any chance you have some kind of modification on the more info modals? Anyone else can confirm either they see [object Object] or the actual information?

If anyone created automations or anything else based on the collected information, please share. Always great to see what we could create with the information provided. If some information is missing or anyone has some change requests, please let me know or create a PR.

I can see timeslots

Screenshot_2020-04-28-21-50-55-385_io.homeassistant.companion.android|230x500

And they are corresponding with the information in the app :wink:

Maybe extend it with time slots for the pick-up points?