Package tracking in Home Assistant — PostNL, DHL, DPD, GLS + 70 more carriers

Track your packages in Home Assistant. This is a suite of custom integrations for 73 parcel carriers across Europe, North America, South America, Asia and Oceania — PostNL, DHL, DPD, GLS, PostNord, UPS, FedEx, USPS, Canada Post, Amazon, Evri, Posti, Hermes, Swiss Post, Correos, Packeta, Österreichische Post and many more — plus an aggregator that merges them into one set of sensors. Counting sister brands sold under a different name (BRT, Bring, Zásilkovna, Colissimo and others), that’s 81 carrier brands over 47 countries. Every integration speaks the same parcel contract, so your automations and dashboards work the same no matter who delivers.

:open_book: Full documentation: https://ha-parcel-integrations.github.io/
:package: All repositories: Home Assistant Parcel / Package Integrations · GitHub

Most carriers need nothing but a tracking number — no account, no API key, no developer portal.

Supported carriers

Sorted alphabetically; a sister brand of another integration (same repo, same backend) is listed in its own place with a note pointing to the parent entry.

Carrier Country / region What you need
:globe_showing_asia_australia: 4PX Cross-border Tracking code
:greece: ACS Courier Greece Tracking code
:sweden: Airmee Sweden Tracking link, or log in with an SMS code
:netherlands::belgium::germany::france::united_kingdom::ireland::spain::italy::sweden::poland::united_states::canada::mexico::brazil::australia::japan::india: Amazon 17 Amazon storefronts Account — every shipment of your recent orders, one sign-in per storefront; handed over to the delivering carrier’s own integration when you have it
:netherlands: Ampère Netherlands Tracking link from the shipping e-mail
:ireland: An Post Ireland Account — with a watchlist for parcels not yet linked to your account
:canada::united_states: Apple Express Canada & United States Order or reference number
:australia::new_zealand: Aramex Australia & New Zealand Tracking code
:czechia: Balikovna Czechia Tracking code — Ceska Posta’s pickup-point and locker brand, see below
:united_states: Better Trucks United States Tracking code
:bulgaria::greece::croatia::cyprus: BoxNow Bulgaria, Greece, Croatia & Cyprus Tracking code — pick your country’s backend at setup
:belgium: bpost Belgium Barcode + postal code, or a My bpost account for incoming & outgoing
:norway::sweden::denmark: Bring Norway, Sweden & Denmark Account — incoming & outgoing; Posten’s sister brand, see below
:italy: BRT Italy myDPD account — DPD’s brand name in Italy, see below
:sweden::netherlands::belgium::denmark::finland::norway: Budbee Nordics & Benelux Tracking or order number, no e-mail address needed — incoming & outgoing
:globe_showing_asia_australia: Cainiao Cross-border Tracking code
:canada: Canada Post Canada Tracking code or delivery-notice card number, or an account
:canada: Canpar Canada Tracking code
:czechia: Ceska Posta Czechia Tracking code — same repo also covers the Balikovna brand above
:france: Chronopost France Tracking code — La Poste’s express brand, see below
:france::belgium::luxembourg: Colis Privé France, Belgium & Luxembourg Tracking code + delivery postcode
:france: Colissimo France Tracking code — La Poste’s parcel brand, see below
:spain: Correos (Express) Spain Tracking code
:portugal::spain: CTT Portugal & Spain Tracking code — same repo also covers CTT Express, see below
:spain: CTT Express Spain Tracking code — CTT’s Spanish parcel arm, see above
:denmark: DAO Denmark Account — parcels already linked in the DAO app show up automatically
:india: Delhivery India Tracking code
:globe_showing_europe_africa: DHL Worldwide Tracking code worldwide for DHL Parcel, DHL Express and DHL Freight Sweden — or an account in Germany & Poland, incoming & outgoing
:netherlands: DHL NL Netherlands Account — incoming & outgoing
:netherlands::argentina::austria::belgium::croatia::czechia::switzerland::germany::estonia::france::united_kingdom::hungary::italy::latvia::lithuania::luxembourg::poland::portugal::slovakia::slovenia: DPD Netherlands & 19 more countries myDPD account — incoming & outgoing; Germany, Poland and Austria each on their own backend, the rest on myDPD; also sold as BRT in Italy, see above
:netherlands::australia: Dragonfly Netherlands & Australia Tracking code — also sold as Intelcom in Canada, see below
:netherlands::belgium: Dynalogic Netherlands & Belgium Order number + postal code — also sold as MediaMarkt, Samsung, Nespresso, Menken
:bulgaria: Econt Bulgaria Tracking code
:greece: ELTA Courier Greece Tracking code
:united_kingdom: Evri United Kingdom Tracking code + postal code — incoming & outgoing
:romania: FAN Courier Romania Tracking code
:globe_showing_europe_africa: FedEx Worldwide Your own FedEx API key + tracking code
:netherlands::germany::austria::belgium::switzerland::croatia::czechia::denmark::finland::france::hungary::ireland::italy::luxembourg::serbia::slovakia::slovenia::canada::united_states::poland: GLS 20 countries Tracking code + postal code (US and Poland need only the tracking code) — 15 countries on GLS’s pan-EU tracker, plus Canada, Germany, the Netherlands, Poland and the US on national backends
:canada::united_states: GoBolt Canada & United States Tracking code
:united_states::canada::italy::france::spain::netherlands: GOFO Express US, Canada, Italy, France, Spain & Netherlands Tracking code
:norway: Helthjem Norway Tracking code
:germany: Hermes Germany Tracking code, or an account
:canada: ICS Courier Canada Tracking code
:poland::italy::portugal::united_kingdom::spain: InPost Poland, Italy, Portugal, UK & Spain Account in Poland, or keyless tracking codes in Italy, Portugal, the UK & Spain
:canada: Intelcom Canada Tracking code — Dragonfly’s Canadian brand, see above
:france: La Poste France Tracking code — covers Colissimo and Chronopost parcels, see above
:finland: Matkahuolto Finland Tracking code
:france::belgium::netherlands::spain::portugal: Mondial Relay France, Belgium, Netherlands, Spain & Portugal Account — incoming & outgoing
:ukraine::moldova::poland::lithuania::czechia::romania::germany::slovakia::estonia::latvia::hungary::italy::finland::united_kingdom::france::spain::austria::netherlands::united_states: Nova Post Ukraine, Europe & the US Tracking code
:new_zealand: NZ Post New Zealand Tracking code
:united_states: OnTrac United States Tracking code
:poland: ORLEN Paczka Poland Tracking code
:austria: Österreichische Post Austria Tracking code
:spain::portugal::france::italy: Paack Spain, Portugal, France & Italy Tracking code + delivery postcode
:czechia::slovakia::hungary::poland::romania::germany::slovenia: Packeta Central Europe, Germany & Slovenia “Z” tracking code — incoming & outgoing; also sold as Zásilkovna in Czechia, see below
:switzerland::liechtenstein: Planzer Switzerland & Liechtenstein Tracking code or IKEA order number — the carrier behind IKEA home delivery
:poland: Poczta Polska Poland Tracking code
:italy: Poste Italiane Italy Tracking code
:norway::sweden::denmark: Posten Norway, Sweden & Denmark Account — incoming & outgoing; also sold as Bring, see above
:finland: Posti Finland Tracking code, or an account
:netherlands::belgium: PostNL Netherlands & Belgium Account — parcels and announced MyMail letters, incoming & outgoing
:sweden::denmark::norway::finland: PostNord Nordics Tracking code, or an account for incoming & outgoing
:czechia: PPL CZ Czechia Passwordless e-mail + PIN login, or just a tracking code — incoming & outgoing
:canada: Purolator Canada Tracking number (PIN) — incoming & outgoing
:switzerland: Quickpac Switzerland Tracking code — delivery arm for Galaxus/Digitec
:romania::hungary::bulgaria: Sameday South-East Europe AWB number — easybox lockers
:spain: SEUR Spain Account — incoming & outgoing
:brazil::indonesia::malaysia::philippines::thailand::vietnam: Shopee Xpress Brazil, Indonesia, Malaysia, the Philippines, Thailand & Vietnam Tracking code
:slovakia: Slovak Parcel Service Slovakia Tracking code + postal code
:slovakia: Slovenská Pošta Slovakia Tracking code
:united_states: Spee-Dee Delivery United States Tracking code
:united_states: SpeedX United States Tracking code
:canada: Straightship Canada Tracking code
:globe_showing_asia_australia: SunYou Cross-border Tracking code — SYPost, ahead of the local carrier that delivers it
:switzerland: Swiss Post Switzerland Tracking code, or a SwissID account for incoming & outgoing
:netherlands::belgium: Trunkrs Netherlands & Belgium Tracking code + postal code
:canada::united_states: UniUni Canada & United States Tracking code
:globe_showing_europe_africa: UPS Worldwide Tracking code — no UPS account needed, though updates arrive slowly
:united_states: USPS United States Informed Delivery account, or your own USPS API key
:netherlands::belgium::france::spain::portugal: Vinted Go Netherlands, Belgium, France, Spain & Portugal Passwordless e-mail login — incoming & outgoing; formerly Homerr
:czechia: Zásilkovna Czechia “Z” tracking code — Packeta’s own brand name in Czechia, see above

The carriers page has the same list with versions, what each one exposes, and which ones are still marked beta (they work, but their status vocabulary hasn’t been confirmed against enough real shipments yet).

Parcel Aggregator — all carriers, one set of sensors

Running more than one of the above? The optional Parcel Aggregator discovers them automatically and re-emits everything merged:

  • sensor.parcel_aggregator_incoming_parcels / _outgoing_parcels / _delivered_parcels / _outgoing_delivered_parcels / _en_route_to_pickup_point / _awaiting_pickup
  • sensor.parcel_aggregator_next_delivery — the earliest expected delivery across every carrier
  • calendar.parcel_aggregator_deliveries — every expected delivery in one agenda
  • one unified event stream

Nothing to configure, no credentials. A carrier you install next month is picked up without a reload.

One automation, every carrier

triggers:
  - trigger: event
    event_type: parcel_aggregator_parcel_status_changed
    event_data:
      new_status: out_for_delivery

actions:
  - action: notify.mobile_app
    data:
      title: "📦 On its way"
      message: >-
        {{ trigger.event.data.carrier }} is delivering
        {{ trigger.event.data.sender or 'your parcel' }} today.
20 Likes

I think this is already looking very good! Going to use it for sure when realeased for public!

Great job

Always like new features. Looks nice.

That said, i’ll be ‘frank’. I never open the post nl app to see what envelopes i am getting. It is nice that it could show it but it takes up a lot of screen. Would at least seperate the 2, 1 card for mail and 1 card for packages. That way it doesn’t matter what the preference is of a person since he can choose both if he/she wants too (or 1 card that does it all)

For the packages an option how many delivered packages it would show is a nice bonus.

And i presume to far fetched but what about an option that it counts the number of mail items untill a reset is given? So if you could have a sensor that just adds up the number of mail, that way you can automate your mailbox further (most have a sensor in the mail to trigger it) but now you could even say “you have more then 5 mail items in your box, it really is time to empty it” just thinking out loud here :wink:
(I actually have a mailbox outside, doesn’t really matter for the people where the mail drops in the house)

Thanks for the input! I had the same feeling with the images.

Already changed some stuff. I’m now waiting for the 0.92 release of HA, since I am overwriting the current component to achieve my results and they made some changes in this release. After that, I have a guide on how to achieve the Lovelace card. Depending on input, I can perhaps override the current component with my component, so you only need to install the lovelace card.

Meanwhile, I am also waiting for a package or mail to arrive. Since I currently have to work with delivered packages and an empty mailbox, which makes it hard to test :frowning:

Well if you want a mail card, just private message your address. Least i can do ha :wink:

Awaiting the 0.92 release (should be available today) to create instructions to have more people test this.

If you click on the ID of the letter, you get to see the image.
If you click on the name of the package, you are taken to the web interface of PostNL itself.

27

Hi Peter, in case you need more beta testers, I’m gladly to help. Regards, Ramon

Yeah definetly need testers. Will post instructions tomorrow!

Thanks!

1 Like

Topic description has been updated! Hope it contains enough information for you guys to know what to do.

Happy to hear your thoughts and feedback. Also see the list of known issues and upcoming features.

Best to report features and bugs within the Github repository for easy tracking.

Thanks!

Made an issue, if your on discord could just look into it but don’t know your nick there.

Solved some issues with help from @riemers.
Custom component as well as the lovelace card have been updated.

Hi i’m getting the following error:

[homeassistant.components.sensor] Error while setting up platform postnl_custom Traceback (most recent call last): File "/usr/src/app/homeassistant/helpers/entity_platform.py", line 126, in _async_setup_platform SLOW_SETUP_MAX_WAIT, loop=hass.loop) File "/usr/local/lib/python3.7/asyncio/tasks.py", line 416, in wait_for return fut.result() File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs) File "/config/custom_components/postnl_custom/sensor.py", line 34, in setup_platform from postnlpy.postnlapi import PostnlApi ModuleNotFoundError: No module named 'postnlpy'

I’m running version 0.92 in a docker container.

I’ve updated the gist by adding a manifest.json file. This is now a requirement as of HA 0.92.

After restart, It should work.

Thanks alot @ptnijssen! Wish I could tell you that it fixed the issue. But I get a different error now…:frowning:

Traceback (most recent call last):
File “/usr/src/app/homeassistant/helpers/entity_platform.py”, line 261, in _async_add_entity
await entity.async_device_update(warning=False)
File “/usr/src/app/homeassistant/helpers/entity.py”, line 377, in async_device_update
await self.hass.async_add_executor_job(self.update)
File “/usr/local/lib/python3.7/concurrent/futures/thread.py”, line 57, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/src/app/homeassistant/util/init.py”, line 224, in wrapper
result = method(*args, **kwargs)
File “/config/custom_components/postnl/sensor.py”, line 92, in update
shipments = self._api.get_package_deliveries(True)
File “/config/deps/lib/python3.7/site-packages/postnlpy/postnlapi.py”, line 114, in get_package_deliveries
self.update()
File “/config/deps/lib/python3.7/site-packages/postnlpy/postnlapi.py”, line 79, in update
self.update_letters()
File “/config/deps/lib/python3.7/site-packages/postnlpy/postnlapi.py”, line 105, in update_letters
document_id = documents.get(‘documents’)[0].get(‘documentId’)
IndexError: list index out of range
2019-04-27 07:07:15 ERROR (MainThread) [homeassistant.components.sensor] postnl: Error on device update!
Traceback (most recent call last):
File “/usr/src/app/homeassistant/helpers/entity_platform.py”, line 261, in _async_add_entity
await entity.async_device_update(warning=False)
File “/usr/src/app/homeassistant/helpers/entity.py”, line 377, in async_device_update
await self.hass.async_add_executor_job(self.update)
File “/usr/local/lib/python3.7/concurrent/futures/thread.py”, line 57, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/src/app/homeassistant/util/init.py”, line 224, in wrapper
result = method(*args, **kwargs)
File “/config/custom_components/postnl/sensor.py”, line 140, in update
letters = self._api.get_letters()
File “/config/deps/lib/python3.7/site-packages/postnlpy/postnlapi.py”, line 132, in get_letters
self.update()
File “/config/deps/lib/python3.7/site-packages/postnlpy/postnlapi.py”, line 79, in update
self.update_letters()
File “/config/deps/lib/python3.7/site-packages/postnlpy/postnlapi.py”, line 105, in update_letters
document_id = documents.get(‘documents’)[0].get(‘documentId’)
IndexError: list index out of range

Could this be an user error on my side? Running version 92.1 now.

Seems like something I need to fix. I suppose not every letter has an image or the API is not giving a good response.

Let me try to fix something over here. Will report back in half an hour.

Thanks. Take your time.

I’ve updated the custom component. Please see the change in the gist. (Basically change the dependency to 0.2.4).

Either it’s solved, or you will have a very similar error. I aim for the first case :wink:

1 Like

Thank you for the quick fixes! It works now :smiley:

1 Like

very nice!! maybe it’s an idea to add it into the custom updater? so we can update the component and the card very easy. and never miss some work of you :slight_smile:

Thanks Remco!
I’ve already marked it as an thing to do: https://github.com/peternijssen/lovelace-postnl/issues/5

In the end, I also want to update the component in HA. Just making sure it’s now feature complete and it’s working for everyone, before breaking stuff :wink:

2 Likes