moralmunky / Home-Assistant-Mail-And-Packages

Home Assistant integration providing day of package counts and USPS informed delivery images.
MIT License
609 stars 77 forks source link

[Feature Request] Add support for Amazon.it #310

Closed NdR91 closed 3 years ago

NdR91 commented 3 years ago

Can you kindly add the support for Amazon.it (Italy)?

It would be amazing if Italians can use this great Integration!

Thank you =)

firstof9 commented 3 years ago

In order to get this working properly can you follow these steps or similar to provide a copy of the email(s) Amazon sends?

NdR91 commented 3 years ago

Sure!

Here attached you can find two emails type: the one I receive when Amazon ships and the one I receive when the shipping is delivered.

Please tell me if you need also the order confirmation email.

Thank you!

Emails.zip

firstof9 commented 3 years ago

This will be a little tricky since they don't use "shipment-tracking". I'll see what I can get done.

NdR91 commented 3 years ago

If I can help, I can tell you that an italian Telegram Bot can track Amazon Shipment using the link inside that email.

firstof9 commented 3 years ago

I worked it out 👍

firstof9 commented 3 years ago

This should work in b16.

p1ranha commented 3 years ago

B16 breaks with: Logger: custom_components.mail_and_packages.helpers Source: custom_components/mail_and_packages/helpers.py:264 Integration: Mail and Packages (documentation, issues) First occurred: 10:39:07 PM (43 occurrences) Last logged: 10:39:08 PM

Error searching emails: SEARCH command error: BAD [b'Could not parse command']

firstof9 commented 3 years ago

Your image path is wrong.

p1ranha commented 3 years ago

I corrected it (don't use it), but the remaining error is still there:

Logger: custom_components.mail_and_packages.helpers Source: custom_components/mail_and_packages/helpers.py:264 Integration: Mail and Packages (documentation, issues) First occurred: 12:26:47 AM (43 occurrences) Last logged: 12:26:48 AM

Error searching emails: SEARCH command error: BAD [b'Could not parse command']

firstof9 commented 3 years ago

Please enable debugging and report what shows up in the log.

firstof9 commented 3 years ago

I found the issue, typo in the search builder, b17 will resolve it.

NdR91 commented 3 years ago

So, I tried b17 and those are my findings. Please, forgive me if it isn't professional, I never coded anything =D

As you can see from my last screenshot, I have some question: 1- Do I have the Delivery Message Sensor? If yest, which one is it? Did I miss some sensor from the "Sensor List" selected during the setup? 2- If I click on my "Amazon Package Sensor" link, It opens Amazon.com instead of Amazon.it. 3- When it's supposed to have the first image on the card? Do I have to wait the next mail from Amazon?

Thank you for your work!

NdR91 commented 3 years ago

One more finding:

I have one package in transit from Amazon. Expected delivery on Monday.

Probably the counter is 0 cause the integration will scan only new emails and not the old. Is this corrected?

firstof9 commented 3 years ago

One more finding:

I have one package in transit from Amazon. Expected delivery on Monday.

Probably the counter is 0 cause the integration will scan only new emails and not the old. Is this corrected?

This is covered by the wiki.

As for the custom card, that's all @moralmunky, feel free to open a feature request on the custom card's github about the link. Alternatively you could use some examples from the wiki to display your deliveries as well.

NdR91 commented 3 years ago

This is covered by the wiki.

As for the custom card, that's all @moralmunky, feel free to open a feature request on the custom card's github about the link. Alternatively you could use some examples from the wiki to display your deliveries as well.

Thank you as usual for your reply! I'll switch to another card, thank you!

moralmunky commented 3 years ago

Delivery message sensor is also covered in the wiki. You must create one yourself, examples are provided.

The link in the card is hard coded for Amazon.com. Not sure of a way to change that based on the integration, I suppose it could be an option in the card setting to provide the address the link should take you to.

Please create a request in the card repository.

NdR91 commented 3 years ago

Hello, i'm still trying B17. But all of the sensors used are listing 0 packages. Today i'm going to receive 4 shimpents.

Do I wrong something?

firstof9 commented 3 years ago

Please enable debugging and post the messages from the log.