Easily track all your package/parcel!

Hello all!

I’m starting a project, it’s a WIP but, well, it works, I’ve done it in ~1h

I’m planing on cleaning it up and automate release process, make something clean out of it.

It use https://parcelsapp.com/, you can create a API key by going to Parcels App Dashboard . It’s free for 10 shipment per month. You’ll have to pay if you need more

Feel free to open issues, comment all the way you want so I can make it to the official integration store soon ahah

The latest version 0.1.1 has all the basics you need:

  • Add a parcel
  • Remove a parcel
  • A tons of attributes on sensors

Thanks all

2 Likes

Looks like a good service, but too expensive

Yeah
We want a free one :stuck_out_tongue:
This one is like this one AfterShip - Home Assistant

If I was doing 1000 parcels a month, it might be worth considering, but for maybe 10, maybe 20 let month, yeah nah. $9 (presumably US, who knows, they don’t say) per month minimum.

17track.net works and is free, and has a native integration.

It’s free for 10 shipment per months.

I just did a pre-release 0.1.0-rc2-storage basic storage is here, but custom names are not persistent yet, will be done soon

There is no way to sign up for the API without choosing at least the $9 per month option.

Edit: I was wrong, see next two parts below.

Weird, I just recreated an account using Parcels App Dashboard and I didn’t needed any payment

I got redirected to the pricing page, but on the left there’s everything you need, just click dashboard and done.

1. Register page

2. Pricing page

3. Dashboard with API key

Should I had this steps into the project’s readme?

EDIT: I don’t even have 9$ option, it starts at 19$. If you still need to pay, then maybe there’s a geo-restriction ? (sooooo, maybe a VPN could help?)

I didn’t notice that it you set up an account and don’t choose a tier, it does give you a free tier at 10 per month. Thanks for pointing that out. Cool.

1 Like

17track is better than this one?
Whats the difference?

Do you use 17 track?

As you can see in first post, this one is a work in progress. I post here for early adopters or for those who like tinkering as I need reviews so I can shape the integration based on needs.

I’m thinking about creating a new service to remove old parcel and also a custom front card to see and manage tracked parcels

Now, if your question is “17track vs parcelsapp”, it mostly depends on where you live and what are your most used delivery company. In France, 17track is really slow to update and overall parcels is better. It may be different for other countries.

Update: the latest version 0.1.1 has all the basics you need:

  • Add a parcel
  • Remove a parcel
  • A tons of attributes on sensors
  • Obviously fixed the persistence on HA reboot
  • Uses HA preferred language on parcelsapp API requests (so messages should be in your language now)

I updated the first post accordingly

I can’t seem to get it to work. Installs ok, API and country New Zealand.

But when I add a parcel, nothing happens. No sensor is created. Anything specific to check for?

Upon further investigation, I ran the curl example (the first one in the doc pages, with my own apikey, country and parcel number. It returned

{"error":"UNCONFIRMED_ACCOUNT"}

Weird thing. I can log into the dashboard,

I have no email asking me to confirm the account.

1 Like

goddamn as i typed that I thought to check spam folder. There it was and once I confirmed curl is now working.

2 Likes

Hi
I live in Belgium so main company is bpost, postnl and DHL…
Would love to see packages added automatically and a dashboard custom card is welcome too.
Main thing is, it should be free to use.

It is for 10 shipment per month, see Easily track all your package/parcel! - #8 by le.storm1er

Thank you, I had the same problem!

Hello, here’s a Frontend display for the integration. :slight_smile: It only works with versions above 0.1.2!

It can be quickly rewritten into other languages as it includes a translation option. I took the basics from the widely used Track17 markdown script and adapted it for ParcelsApp.

And below you can find a simple package removal tool.
The code is in English, only the example is in Hungarian :slight_smile:

{% set computer_text = '<ha-icon icon="mdi:laptop" style="color:yellow"></ha-icon>' %}

# **[ParcelsApp](https://parcelsapp.com/)**

{% set parcels = states.sensor | selectattr('entity_id', 'match', 'sensor.parcelsapp_tracking_*') | list %}
{% set parcels_by_status = parcels | groupby('attributes.status') %}

{% set status_translation = {
    'archive': 'Archived packages',
    'delivered': 'Delivered packages',
    'transit': 'Packages in transit',
    'arrived': 'Packages awaiting delivery',
    'pickup': 'Packages awaiting pickup',
    'pending': 'Pending'
} %}

{% for status_group in parcels_by_status %}
{% set status = status_group.grouper %}
{% set packages = status_group.list %}

## {{ status_translation.get(status, status) | capitalize }}

---

{% for package in packages %}
### <ha-icon icon="mdi:package-variant" style="color:yellow"></ha-icon> **{{ package.attributes.get('name', '') }}** [{{computer_text}}](https://parcelsapp.com/en/tracking/{{ package.attributes.get('tracking_id', '') }})

{%- if package.attributes.get('tracking_id') not in [None, 'undefined'] %}
> **Tracking number**: {{ package.attributes.tracking_id }}
{%- endif %}
{%- if package.attributes.get('message') not in [None, 'undefined'] %}
> **Status**: {{ package.attributes.message }}
{%- endif %}
{%- if package.attributes.get('carrier') not in [None, 'undefined'] %}
> **Carrier**: {{ package.attributes.carrier }}
{%- endif %}
{%- if package.attributes.get('location') not in [None, 'undefined'] %}
> **Location**: {{ package.attributes.location }}
{%- endif %}
{%- if package.attributes.get('origin') not in [None, 'undefined'] %}
> **Origin**: {{ package.attributes.origin }}
{%- endif %}
{%- if package.attributes.get('destination') not in [None, 'undefined'] %}
> **Destination**: {{ package.attributes.destination }}
{%- endif %}
{%- if package.attributes.get('days_in_transit') not in [None, 'undefined'] %}
> **Days in transit**: {{ package.attributes.days_in_transit }}
{%- endif %}
{%- if package.attributes.get('uuid') not in [None, 'undefined'] %}
> **UUID**: {{ package.attributes.uuid }}
{%- endif %}
{%- if package.attributes.get('uuid_timestamp') not in [None, 'undefined'] %}
> **UUID timestamp**: {{ package.attributes.uuid_timestamp }}
{%- endif %}
{%- if package.attributes.get('last_updated') not in [None, 'undefined'] %}
> **Last updated**: {{ relative_time(package.attributes.last_updated) }}
{%- endif %}

{% endfor %}

{% endfor %}

type: custom:auto-entities
card:
  type: entities
  title: Package Removal
  state_color: true
filter:
  include:
    - domain: sensor
      entity_id: sensor.parcelsapp_tracking_*
      options:
        type: custom:button-card
        name: |
          [[[ return entity.attributes.name ]]]
        icon: mdi:package-variant-closed
        tap_action:
          action: call-service
          service: parcelsapp.remove_package
          service_data:
            tracking_id: |
              [[[ return entity.attributes.tracking_id ]]]
          confirmation:
            text: Are you sure you want to delete this package?
        layout: icon_name
        styles:
          card:
            - padding: 10px
          grid:
            - grid-template-areas: i status
            - grid-template-columns: min-content auto
            - align-items: right
            - padding-top: 2px
            - font-size: 14px
          name:
            - grid-area: "n"
            - justify-self: start
          custom_fields:
            status:
              - grid-area: status
              - justify-self: end
              - padding-top: 2px
              - font-size: 10px
        custom_fields:
          status: |
            [[[ return entity.attributes.tracking_id ]]]

image

2 Likes

Track17 and Aftership can only query one carrier and are slower compared to Parcelsapp. I often get packages that are handled by 2-3 different carriers, and Parcelsapp can manage that seamlessly. It’s also much faster because I don’t have to wait for the main carrier to receive data from the underlying carriers.

For example, my last order from the US went with DHL within the US, then Yun Express took it to Germany, where Deutsche Post sent it to Hungary, and finally Hungarian Post delivered it. Of course, everything is trackable through the main tracking number, but by the time Hungarian Post syncs with the main track, the package is already in my hands :slight_smile:

1 Like