Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ISSUE: sensor.mail_image_url is "Unknown" but the image is in the file system #984

Open
ajtatum opened this issue Oct 26, 2024 · 8 comments
Assignees
Labels
help wanted Extra attention is needed work-in-progress

Comments

@ajtatum
Copy link

ajtatum commented Oct 26, 2024

Describe the bug
I'm not sure exactly when this started happening as, at first, I thought it was just a one off issue. However, for the past couple weeks now the sensor.mail_image_url is reporting as "Unknown". sensor.mail_image_system_path has the image path and camera.mail_usps_camera loops through all the pieces of mail I have coming via USPS. But the URL never updates.

Environment (please complete the following information):

  • OS: Installed as a VM on Proxmox through helper-scripts.
  • Type of device: VM
  • Home Assistant Core Version: 2024.10.4
  • Home Assistant Supervisor Version: 2024.10.3
  • Home Assistant OS Version: 13.2
  • Component version: 0.4.0

Logs
Not sure how to best capture this.

Screenshots
N/A

Additional context
This used to work without issue as I had a template sensor replace the internal IP address of the mail_image_url with an externally accessible domain and send the image as a URL via notification to my phone. I'm not sure when or what changed.

@ajtatum ajtatum added the pending Pending review label Oct 26, 2024
@firstof9
Copy link
Collaborator

The code for the url hasn't changed, check your HA config's external URL setting.

@firstof9 firstof9 added more-info-needed Further information is requested and removed pending Pending review labels Oct 27, 2024
Copy link

github-actions bot commented Nov 6, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@github-actions github-actions bot added the no-issue-activity Stale issue label Nov 6, 2024
@ajtatum
Copy link
Author

ajtatum commented Nov 18, 2024

I don't think it's the external URL, as the Mail Image URL sensor shows as unknown and doesn't point to a local address like it used to.

thorium_Q3nUf29Ipz

@firstof9
Copy link
Collaborator

Check your HA's URL config.

@ajtatum
Copy link
Author

ajtatum commented Nov 19, 2024

Both look fine to me:

thorium_9lwJUkzHlw

@firstof9
Copy link
Collaborator

HA Cloud is messing it up. Will have to check for cloud links somehow.

@firstof9 firstof9 reopened this Nov 19, 2024
@firstof9 firstof9 added help wanted Extra attention is needed work-in-progress and removed more-info-needed Further information is requested no-issue-activity Stale issue labels Nov 19, 2024
@ajtatum
Copy link
Author

ajtatum commented Dec 2, 2024

Hey there, I just wanted to let you know that I found a work around for my solution by creating a custom template sensor:

- name: "Mail Image URL External"
      state: >
        {% set base_url = "https://ha.mydomain.com/local/mail_and_packages/" %}
        {% set file_path = states('sensor.mail_image_system_path') %}
        {% if file_path %}
          {% set file_name = file_path.split('/')[-1] %}
          {{ base_url ~ file_name }}
        {% else %}
          none
        {% endif %}

I appreciate you looking into this, but since it appears I may be the only one with this issue, this work around may work well enough instead of trying to figure something out in the code.

Thanks,
AJ

@firstof9
Copy link
Collaborator

firstof9 commented Dec 2, 2024

Still good to have on the radar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed work-in-progress
Projects
None yet
Development

No branches or pull requests

2 participants