17Track.net

Need to see your logs if there are errors.

OK.

So, this only happens when I add an account. No error until that point.

...
2018-06-06 02:26:09 INFO (MainThread) [homeassistant.components.http.view] Serving /api/config/config_entries/flow/4773b6ab03584cb4908246d26280259e to 192.168.1.81 (auth: True)
2018-06-06 02:26:11 DEBUG (SyncWorker_1) [custom_components.seventeentrack] New account data received: []
2018-06-06 02:26:11 ERROR (MainThread) [homeassistant.loader] Error loading custom_components.sensor.seventeentrack. Make sure all dependencies are installed
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/homeassistant/loader.py", line 86, in get_component
    module = importlib.import_module(path)
  File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/root/.homeassistant/custom_components/sensor/seventeentrack.py", line 9, in <module>
    from homeassistant.components.seventeentrack.const import (
ModuleNotFoundError: No module named 'homeassistant.components.seventeentrack'
2018-06-06 02:26:11 ERROR (MainThread) [homeassistant.loader] Unable to find component sensor.seventeentrack
2018-06-06 02:26:11 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform sensor.seventeentrack: Platform not found.
2018-06-06 02:26:11 INFO (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=persistent_notification, service=create, service_data=title=Invalid config, message=The following components and platforms could not be set up:

 - sensor.seventeentrack

Please check your config., notification_id=invalid_config, service_call_id=140195103544656-9>
2018-06-06 02:26:11 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=persistent_notification.invalid_config, old_state=None, new_state=<state persistent_notification.invalid_config=notifying; title=Invalid config, message=The following components and platforms could not be set up:

 - sensor.seventeentrack

Please check your config. @ 2018-06-05T19:26:11.158268-07:00>>
2018-06-06 02:26:11 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_executed[L]: service_call_id=140195103544656-9>
2018-06-06 02:26:11 DEBUG (MainThread) [homeassistant.components.websocket_api] WS 140193293789392: Sending {'id': 1085, 'type': 'event', 'event': {'event_type': 'call_service', 'data': {'domain': 'persistent_notification', 'service': 'create', 'service_data': {'title': 'Invalid config', 'message': 'The following components and platforms could not be set up:\n\n - sensor.seventeentrack\n\nPlease check your config.', 'notification_id': 'invalid_config'}, 'service_call_id': '140195103544656-9'}, 'origin': 'LOCAL', 'time_fired': datetime.datetime(2018, 6, 6, 2, 26, 11, 156451, tzinfo=<UTC>)}}
2018-06-06 02:26:11 DEBUG (MainThread) [homeassistant.components.websocket_api] WS 140193293789392: Sending {'id': 1085, 'type': 'event', 'event': {'event_type': 'state_changed', 'data': {'entity_id': 'persistent_notification.invalid_config', 'old_state': None, 'new_state': <state persistent_notification.invalid_config=notifying; title=Invalid config, message=The following components and platforms could not be set up:

 - sensor.seventeentrack

Please check your config. @ 2018-06-05T19:26:11.158268-07:00>}, 'origin': 'LOCAL', 'time_fired': datetime.datetime(2018, 6, 6, 2, 26, 11, 158291, tzinfo=<UTC>)}}
2018-06-06 02:26:11 DEBUG (MainThread) [homeassistant.components.websocket_api] WS 140193293789392: Sending {'id': 1085, 'type': 'event', 'event': {'event_type': 'service_executed', 'data': {'service_call_id': '140195103544656-9'}, 'origin': 'LOCAL', 'time_fired': datetime.datetime(2018, 6, 6, 2, 26, 11, 159421, tzinfo=<UTC>)}}
2018-06-06 02:26:11 DEBUG (MainThread) [homeassistant.components.websocket_api] WS 140193293472544: Sending {'id': 2, 'type': 'event', 'event': {'event_type': 'state_changed', 'data': {'entity_id': 'persistent_notification.invalid_config', 'old_state': None, 'new_state': <state persistent_notification.invalid_config=notifying; title=Invalid config, message=The following components and platforms could not be set up:

 - sensor.seventeentrack

Please check your config. @ 2018-06-05T19:26:11.158268-07:00>}, 'origin': 'LOCAL', 'time_fired': datetime.datetime(2018, 6, 6, 2, 26, 11, 158291, tzinfo=<UTC>)}}
2018-06-06 02:26:11 DEBUG (MainThread) [homeassistant.components.websocket_api] WS 140193293274416: Sending {'id': 2, 'type': 'event', 'event': {'event_type': 'state_changed', 'data': {'entity_id': 'persistent_notification.invalid_config', 'old_state': None, 'new_state': <state persistent_notification.invalid_config=notifying; title=Invalid config, message=The following components and platforms could not be set up:

 - sensor.seventeentrack

Please check your config. @ 2018-06-05T19:26:11.158268-07:00>}, 'origin': 'LOCAL', 'time_fired': datetime.datetime(2018, 6, 6, 2, 26, 11, 158291, tzinfo=<UTC>)}}
...

These messages seem to indicate that I must have done something dumb. Not sure what, though?

First thanks for your plugin and work! :slight_smile:
I followed all instructions and got my tracking ID show up:

image

But even with seventeentrack: in my configuration.yaml this showed up on my dashboard:

image

1 Like

Just installed as well and got exactly the same error. Hassbian 0.70.1

Hello,

Has someone figured out if it`s possible to change config_entries.py in Hassio?
Maybe @tielemans.jorim had an answer via discord?

Or is this component outdated?

It’s not possible on a Hassio installation, best solution would be to get this into the official HA.

I understand that this component is not working anymore.
Anyone can has an alternative component to get information from 17track or Cainiao ?

Hi everyone – as I was telling @tielemans.jorim in Discord, I had to put this down in order to focus on other projects, but I’m ready to pick it back up. :+1:t2:

One unfortunate thing I’ve noticed: in the time since I last looked at this, it appears that 17track.net has made it very difficult to get tracking data for individual packages (long story short: their unpublished API appears to add some sort of token to that call and I’ve been unable to determine where it comes from).

So, my question: does everyone see value in only being able to track packages attached to an account? Put another way, is not being able to track individual, ad hoc packages – as we were able to previously – a deal-killer?

1 Like

Great to see this happening! Personally I don’t mind adding tracking numbers to my account.
Would the integration be able to automatically add new packages (and get rid of the ones archived)?

Yes – my thought is that we’d:

  1. Always read from the account for new info
  2. Hide “Delivered” packages by default (perhaps this could be overridden in configuration.yaml)

I’ll proceed with the account-based option; at some point, if I should figure out a way to get ad hoc tracking in there, I’ll do it. Thanks!

Hi bachya,
I do see value in tracking packages attach to an account.
Why the parsing is different when it’s in account and not ad hoc ?
Regarding the ad hoc parsing, I noticed that when using postman chrome extension - the data does not received from 17Track but when I installed Interceptor extension (https://www.getpostman.com/docs/v6/postman/sending_api_requests/interceptor_extension) the data received correctly.It might give you and idea how to track ad hoc packages.

Thanks for your thoughts. I’m using a similar method to snoop their unpublished API. As I said above, the problem lies in recreating the proper query:

One unfortunate thing I’ve noticed: in the time since I last looked at this, it appears that 17track.net has made it very difficult to get tracking data for individual packages (long story short: their unpublished API appears to add some sort of token to that call and I’ve been unable to determine where it comes from).

FYI: https://github.com/home-assistant/home-assistant/pull/18038

2 Likes

Great !
When it will be available in home assistant release ?
Can I install it before ? From where ?

Guessing it will be in 0.83, but that hasn’t been confirmed yet. You can always install the dev branch to get the latest.

Hi,
I just installed 0.83 and configured 17track.
I got an error in the log: Error while setting up platform seventeentrack
Can someone help ?

Log Details (ERROR)
Thu Nov 29 2018 21:50:41 GMT+0200 (Israel Standard Time)

Error while setting up platform seventeentrack
Traceback (most recent call last):
File “/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py”, line 128, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=hass.loop)
File “/usr/local/lib/python3.6/asyncio/tasks.py”, line 358, in wait_for
return fut.result()
File “/usr/local/lib/python3.6/site-packages/homeassistant/components/sensor/seventeentrack.py”, line 78, in async_setup_platform
await data.async_update()
File “/usr/local/lib/python3.6/site-packages/homeassistant/components/sensor/seventeentrack.py”, line 263, in _async_update
show_archived=self._show_archived)
File “/usr/local/lib/python3.6/site-packages/py17track/profile.py”, line 79, in packages
packages.append(Package(package[‘FTrackNo’], **kwargs))
File “<attrs generated init 1e2f778bb8606af2ada9f0ca9f47be0bba6741c6>”, line 10, in init
self.attrs_post_init()
File “/usr/local/lib/python3.6/site-packages/py17track/package.py”, line 272, in attrs_post_init
self.package_type = PACKAGE_TYPE_MAP[self.package_type]
KeyError: ‘מודיעין’

There was an issue with 17track sensor, and there is a fix coming with 0.83.1 as soon as that is released.

Seems like it was sending unexpectedly formatted responses that was messing up the sensor.

0.83.1 fixed the problem - thanks !
Now I can see the sensors.
Is there a way to show all the sensors of the packages on the UI without configuring each one the groups.yaml ?

Same question as @Yoni_Almog.

I can see how many packages are in transit or something else, but how to group all the packages and show the attributes?

Thanks

1 Like

Glad 17Track is finally released officially with HA
I am on 0.83.1 but getting related errors: Platform seventeentrack does not generate unique IDs

018-12-03 12:41:20 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 343, in _async_add_entity
    raise HomeAssistantError(msg)
homeassistant.exceptions.HomeAssistantError: Entity id already exists: sensor.un225493236cn. Platform seventeentrack does not generate unique IDs
2018-12-03 12:41:20 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 343, in _async_add_entity
    raise HomeAssistantError(msg)
homeassistant.exceptions.HomeAssistantError: Entity id already exists: sensor.ub010930527sg. Platform seventeentrack does not generate unique IDs
2018-12-03 12:41:20 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 343, in _async_add_entity
    raise HomeAssistantError(msg)
homeassistant.exceptions.HomeAssistantError: Entity id already exists: sensor.laodd1005051004yq. Platform seventeentrack does not generate unique IDs
2018-12-03 12:41:20 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 343, in _async_add_entity
    raise HomeAssistantError(msg)
homeassistant.exceptions.HomeAssistantError: Entity id already exists: sensor.rp051098423cn. Platform seventeentrack does not generate unique IDs
2018-12-03 12:41:20 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 343, in _async_add_entity
    raise HomeAssistantError(msg)
homeassistant.exceptions.HomeAssistantError: Entity id already exists: sensor.rc195602831my. Platform seventeentrack does not generate unique IDs