Easily track all your package/parcel!

I think the Free Tier still works. After registering, even though I could access and copy my API key straight away, I was seeing an error in the HA logs for something like “Unconfirmed account”. Turns out I had to wait for the ParcelsApp system to send me an e-mail (which was hiding in spam of course) and click on a link in that to confirm and verify my account, before my API key went live. I’ve since added three cards using bits of code from various posts on this thread. One for tracking, one to add a parcel (which worked successfully and is showing as 1 parcel used out of 10 in my ParcelsApp Dashboard), and one for removing a parcel. The removal card is still showing “Configuration error” at the moment, but I haven’t had a chance to dig into that. Unfortunately the parcel I’m trying to track is very new so doesn’t really have much info at the courier end for ParcelsApp to see.

EDIT: After a quick look, prod and poke at it, I realised the config error was because I didn’t have the lovelace custom button card installed. That’s now installed and the removal card is showing correctly :slight_smile:

Yes, as pointed out here Easily track all your package/parcel! - #15 by nickrout

Indeed it was @nickrout and +1 Kudos for the earlier solve. I honestly can’t remember if I read the entire thread properly, or just fast-scrolled through looking for the code snippets to help get some cards working, as the link from my google search results dropped me somewhere in the middle of the thread, around post 41 I think it was.

I only posted at the end as @Peet and @duceduc said they didn’t think the free tier was working or available anymore and I’d just registered a brand new free tier account, so it was definitely still available to new users and not just pre-existing/legacy accounts like yours.

I thought I’d add the gotchas I came across; like the email that ParcelsApp don’t tell you to look for hiding in spam (which personally I don’t often check unless I know I’m waiting for a specific mail like a verification one); and that to use the “removal” code snippet posted in the thread you need to add the custom button card, which is only referenced in the yaml snippet and not in the text or explanation around it.

Please accept my apologies for the lack of credit to your much earlier answer. I can only blame it on the heat, the time of day I was doing this, and the lack of sleep - I’d been awake about 55-60 hours by that point and still haven’t managed more than a couple of 5-10 minute snoozes since.

1 Like

No need to apologize, some things are worth repeating. I just did a PR to add this to the docs.

Hello
I was on your forum and discovered that parcel had this integration. I was already using the iOS/macOS/web version with a €5 annual subscription.
For those who are interested, here is my card and its code.

There is a conditional function that displays nothing if no tracker

le code

type: vertical-stack
cards:
  - type: vertical-stack
    cards:
      - type: markdown
        content: |
          # **{{ states('sensor.parcel_nb_de_paquet_actif') }}** colis en cours
        visibility:
          - condition: numeric_state
            entity: sensor.parcel_nb_de_paquet_actif
            above: 0
        card_mod:
          style: |
            ha-card {
              background: #C24444;
              color: white;
              text-align: center;
              border: 1px solid rgba(100,100,100,0.4)
            }
      - type: markdown
        content: >
          ## 🚚 En Route

          {% set parcels = state_attr('sensor.parcel_raw_shipment_data',
          'deliveries') or [] %}

          {% set found_parcel = false %}

          {% for parcel in parcels %}
            {% if parcel.get('status_code') in [1, 2, 3, 4, 8] %}
              {% set found_parcel = true %}

          📦  **[{% set carrier = parcel.get('carrier_code', 'N/A')|upper %}{%
          if carrier == 'LP' %}La Poste{% elif carrier == 'RELAY' %}Mondial
          Relais{% else %}{{ carrier }}{% endif %}] {{parcel.get('description',
          'Description inconnue') }}**

          **• Statut :** {% set status = parcel.get('status_code') %}{% if
          status == 1 %}Livraison bloquée. Il n'y a pas eu de mises à jour
          depuis longtemps, ou quelque chose d'autre fait croire à l'application
          qu'elle ne sera jamais mise à jour à l'avenir.{% elif status == 2 %}le
          colis est en cours d'acheminement{% elif status == 3 %}le colis est
          parti pour la livraison finale{% elif status == 4 %}Prêt pour
          récupération ou Disponible en point relais{% elif status == 5
          %}Livraison non trouvée.{% elif status == 6 %}Tentative de livraison
          échouée.{% elif status == 7 %}Exception de livraison, quelque chose ne
          vas pas et necessite votre attention.{% elif status == 8 %}le
          transporteur a reçu des informations sur un colis, mais ne l'a pas
          encore reçu physiquement.{% else %}Statut inconnu{% endif %}  

          **• N° Tracker :** {{ parcel.get('tracking_number', 'N/A') }}  

          {% if parcel.get('date_expected') %} **• Date attendue de livraison
          le:** `{% set date_obj = strptime(parcel.date_expected, '%Y-%m-%d
          %H:%M:%S') %}{{ date_obj.strftime('%A %d %B %Y')|replace('Monday',
          'Lundi')|replace('Tuesday', 'Mardi')|replace('Wednesday',
          'Mercredi')|replace('Thursday', 'Jeudi')|replace('Friday',
          'Vendredi')|replace('Saturday', 'Samedi')|replace('Sunday',
          'Dimanche')|replace('January', 'janvier')|replace('February',
          'février')|replace('March', 'mars')|replace('April',
          'avril')|replace('May', 'mai')|replace('June', 'juin')|replace('July',
          'juillet')|replace('August', 'août')|replace('September',
          'septembre')|replace('October', 'octobre')|replace('November',
          'novembre')|replace('December', 'décembre') }}`{% endif %}

          {% if parcel.get('events') and parcel.events|length > 0 %}**• Dernier
          événement:** **<font color="#C24444">{{ parcel.events[0].get('event',
          'Aucun événement') }}</font>**


          {% if parcel.events[0].get('location') %}

          **• Localisation:** [{{parcel.events[0].get('location')
          }}](https://www.google.com/maps/search/?api=1&query={{
          parcel.events[0].get('location')|urlencode }}){% elif
          parcel.events|length > 1 and parcel.events[1].get('location') %}
          **Retrait à:** [{{ parcel.events[1].get('location')
          }}](https://www.google.com/maps/search/?api=1&query={{
          parcel.events[1].get('location')|urlencode }}){% endif %}

          {% if parcel.events[0].get('date') %}**• MàJ** {{
          parcel.events[0].date[:10] }} {{ parcel.events[0].date[11:16] }}{%
          endif %}

          {% endif %}


          ---
            {% endif %}
          {% endfor %}
        visibility:
          - condition: numeric_state
            entity: sensor.parcel_nb_de_paquet_actif
            above: 0
      - type: markdown
        visibility:
          - condition: state
            entity: sensor.parcel_nb_de_aujourdhui
            above: 0
        content: >
          ## ✅ **Livrée**

          {% set parcels = state_attr('sensor.parcel_raw_shipment_data',
          'deliveries') or [] %}

          {% set found_parcel = false %}

          {% for parcel in parcels %}
            {% if parcel.get('status_code') == 0 %}
              {% set found_parcel = true %}

          📦  **[{% set carrier = parcel.get('carrier_code', 'N/A')|upper %}{%
          if carrier == 'LP' %}La Poste{% elif carrier == 'RELAY' %}Mondial
          Relais{% else %}{{ carrier }}{% endif %}] {{parcel.get('description',
          'Description inconnue') }}**   

          **• N° Tracker :** {{ parcel.get('tracking_number', 'N/A') }}   {% if
          parcel.get('events') and parcel.events|length > 0 %}

          **• Dernier événement:** {{ parcel.events[0].get('event', 'Aucun
          événement') }}

          {% if parcel.events[0].get('date') %}**• MàJ** {{
          parcel.events[0].date[:10] }} {{ parcel.events[0].date[11:16] }}{%
          endif %}

          {% endif %}


          ---
            {% endif %}
          {% endfor %}

(sorry, I’m French and the card is adapted to change date format etc…).

I added an PR @le.storm1er to take care of postal code etc. I also added a prune method that cleans up when the last update date was 2 months ago. Just so I don’t have to manually remove them :-).

For the impatient ones, you can install it via my github repo (GitHub - marijnvandevoorde/ha_integration_parcelsapp: Easily track all your delivery in Home Assistant, uses https://parcelsapp.com/ API) as well, but I would advise against it unless the OP does not merge the changes (or fix the issues on the main repo). I also included the fixes from other forks (numeric tracking codes mostly, and adding the info about who is doing the delivery.

Now I need to finetune my card a bit better. The markdown one is better but it’d be awesome if each parcel had a “remove” button next to it, which is impossible in markdown as far as I know.

1 Like

Hi, could you please help me the card like you did ?

I installed the ParcelsApp integration, added a french tracking number and nothing displays

I might be missing some sensors you have, could you provide more informations ?

Edit : just realised you where talking about parcelapp wich is a different service

thanks

Has anyone managed a workflow to automatically add tracking numbers from say, Emails received?

I’m not a dev - but was thinking I can some how manage something using make.com… but wanted to ask if anyone has tried this or come up with a solution.

Also - any free parcel trackers, other than USD 9 per month for parcelsapp.

Edit: I now see there is indeed a free tier. It’s just not so obvious. For others - click on dashboard. You will see it.

thanks!

Is it just me or is/did anyone else get really confused before realising there are two, completely different apps?

and

Of which I think we seem to cross between, when seeing integrations etc in this thread?..

2 Likes

I just created a modern, easy-to-use Lovelace card for this integration which can be added directly from the Dashboard Editor. I have also submitted a PR for this on GitHub and am waiting for the creator to accept it.

:sparkles: Features

  • Easy Tracking: Add new packages by simply pasting the tracking ID and name for the package.
  • Visual Editor: Configure the card title and height directly in the UI - no YAML required!
  • Rich Details: See status, carrier, location, origin, destination, and transit time at a glance (and hide them when they aren’t available).
  • Smart Coloring: Badges color-code automatically based on your theme color settings for each status - Delivered, Pending, Transit, or Unknown.
  • Responsive: Adapts to your dashboard columns and scales perfectly.
  • Scrollable: Optional max-height setting with a built-in scrollbar for long lists.


:hammer_and_wrench: How to Install It Manually Till The Pull Request Is Accepted

Step 1: Create the Folders

  1. Use a File Manager (like Studio Code Server, File Editor addon, or Samba) to access your Home Assistant configuration files.
  2. Navigate to the www folder in your configuration directory (usually /config/www).
  • If www doesn’t exist, create it.
  1. Inside www, create a new folder named parcelsapp.

Step 2: Create a New File and Add the Code

  1. Create a new file in the parcelsapp folder called parcels-app-card.js.
  2. Paste the code from the following page and save:
    ha_integration_parcelsapp/www/parcelsapp/parcels-app-card.js at main · krishpuri/ha_integration_parcelsapp

Step 3: Register the Resource

  1. Go to your Home Assistant Dashboard.
  2. Click the Edit Dashboard button.
  3. Click on Manage Resources.
  4. Click + ADD RESOURCE (bottom right).
  5. Enter the following details:
  • URL: /local/parcelsapp/parcels-app-card.js
  • Resource type: JavaScript Module
  1. Click Create.
  2. Restart Home Assistant.

Step 4: Add to Your Dashboard

  1. Open your Dashboard inside HomeAssistant and click on the Edit Dashboard button in the top right corner.
  2. Click the + button inside the dashboard to bring up the card selector.
  3. Search for “Parcels App” in the list of cards.
  4. Select Parcels App Tracking Card.
  5. (Optional) Use the visual editor to change the Title or set a Max Height (e.g., 400px).
  6. Click Save.

:tada: You’re done! Enjoy tracking your packages.

2 Likes

Can this be added manually and not through the gui in step 4? I know what to do from 1-3, but step 4 I am a bit lost.

Do I something like this in my card yaml file? What is the actual sensor entity needed to be added.

      - type: custom:parcels-app-card
        entity: sensor.xxx

Simply add the following:

- type: custom:parcels-app-card
  title: Parcels App Packages
  max_height: 400px

No entity needs to be specified.

I am getting a config error.

Uncaught error from Chrome 142.0.0.0 on Windows 10 SyntaxError: Cannot use import statement outside a module Cannot use import statement outside a module::

Agree, parcel use to be (X) amount of shipments track at once for free, not (X) amount of shipments per month. It was once of the first apis i looked at when starting Home Assistant, but for those who still love parcel this will be fantastic!

Can you specify the file in which you’re adding the code? Also, is there any reason why you’re not directly adding the card to the dashboard using the GUI?

Have been using yaml since the start and never touched the gui.
I’m pointing to the .js as such in my lovelace.yaml

      - url: /local/custom_ui/parcels-app-card.js?v=4
        type: js

Added this code to my lovelace card yaml.

      - type: custom:parcels-app-card
        title: Parcels App Packages
        max_height: 400px

I have only been using Home Assistant for a year so I have always used the new GUI based dashboards, so I’m not sure if I can help you there.

Did you try changing js to module instead?

- url: /local/custom_ui/parcels-app-card.js?v=4
  type: module

Don’t you need an API for this to work? never mind, I found it
How do I enter my postal code, since some carriers want that so they can show you your package status?

Hey, what is the status of this project? I see the github repo was archived. Is there a new alternative?

There are 8 forks of the code.