Pushing Images with Pushover 3.0

This pushover custom_component broke for me too on. .94 update… on hassio on Rasp Pi3 … i get “attachment: invalid message parameter” no matter what i try

Had to roll back to .93.2 (and clear pycache and reboot host) to get it working again

1 Like

I have the same problem after upgrade to 0.94.
Home Assistant on Docker
I got
2019-06-07 20:10:24 ERROR (SyncWorker_3) [custom_components.pushover.notify] attachment: invalid message parameter
So for now I have to downgrade do 0.93 and wait for maybe some fix or way to resolve this problem with 0.94 version.

My notify.py file has 2 lines that this https://raw.githubusercontent.com/brkr19/home-assistant/dev/homeassistant/components/pushover/notify.py file doesn’t have.

my notify.py file:

REQUIREMENTS = ['python-pushover==0.4']
_LOGGER = logging.getLogger(__name__)
Domain = 'pushover'

.

The original notify.py file only has:

_LOGGER = logging.getLogger(__name__)

Mine seems to works fine in 0.94, although I am using Docker, but maybe one of you on Hassio can upgrade again to 0.94 and give it a try… Good luck.

I am still on 0.94. In a few hours I will give it a try!

EDIT:
I tried changing this:

To this:

But getting the same error message:
attachment: invalid message parameter

Someone find solution for this? I want to update but need the notifications available

You shouldn’t need the requirements line in notify.py anymore - the devs moved that outside of the file in https://github.com/home-assistant/home-assistant/pull/23024, and I merged that with my changes about a month or so ago. FWIW, I’m running 0.94.1 just fine right now (running from source, not in Docker or anything).

1 Like

After some messing around I finally got this working again. To clarify:

  • i was getting the attachment: invalid message parameter

  • i am running homeassistant 94.1 in a docker container

  • I have the notify.py and manifest.json in a pushover_custom folder inside custom_components folder

    Im not sure what actually got it working again as I was trying a few different edits to files but in the end none of the edits had worked and my pushover files are unchanged, but I run Falco for extra container security and it sent me a notification after one of my restarts that python was installing pushover .04 in the container as required by this custom component. So here is what i believe worked, comment out all the pushover lines from configuration.yaml so that it is essentially disabled and delete the pycache folder and restart home assistant. after home assistant is back up, un-comment your pushover lines in configuration.yaml and restart home assistant again. Like I said im not sure what exactly got it working again because i had restarted a few times, but the key was python installing the pushover 0.4 again then it started working. if your not on docker maybe you could also try manually installing it yourself. the exact command that was run is
    python -m pip install --quiet python-pushover==0.4 --no-cache-dir --upgrade --constraint
    hopefully this info can help someone.

Are you also referencing the stock pushover component? I had problems with the 0.4 version of the pushover library not getting properly installed. I ended up naming the custom component “pushover” which seemed to then avoid the conflict of which version of the library was required since the stock component was no longer in the mix.

I’m also running Home Assistant in a regular docker container on Ubuntu. No Hass.io in the picture. I seem to recall needing to restart the container the first time to ensure that the 0.4 version of the pushover component replaced the older version distributed in the container. At least I think that what was going on…?

Originally I was not using the stock component, when the custom version stopped working for me on v .94 I started using stock until I could get it going again. I disable stock component along with custom component during one of the container restarts. Now I am only using custom component that is named “pushover_custom”

im on hass.io,i tried to do all that things but not working,same error here attachment: invalid message parameter.
Someone running hassio could confirm that is working this custom component on his machine?

Same problem here with hassio. I tried with pushover and pushover_file and same issue with attachment: invalid message.

same problem

I’m getting this error when I try to attach an image: “Could not load file from insecure path:” This is in the same path that I can attach images to email notifications.

I did get that error once when i added an incorrect path to a file. Changed the path to the following in my automation and the error was gone. But still i get the attachment: invalid message.

filename: /config/www/tmp/cam.jpg

path: /local/tmp/cam.jpg

Also did a whitelist of the directories in the configuration.yaml.

whitelist_external_dirs:
- /tmp
- /config/www/tmp

I had the same error (file: invalid message parameter) after updating to 0.94.1. Here are the steps I did to get it working again.

  • My custom component path was allready this one:
    \homeassistant\custom_components\pushover\notify.py

  • Opened notify.py and commented out:
    # REQUIREMENTS = ['python-pushover==0.4']

  • Created the manifest.json file with these contents:

    {
    “domain”: “pushover”,
    “name”: “Pushover”,
    “documentation”: “https://www.home-assistant.io/components/pushover”,
    “requirements”: [
    python-pushover==0.4
    ],
    “dependencies”: [],
    “codeowners”: []
    }

  • Removed all files from:
    \homeassistant\custom_components\pushover\__pycache__

  • Restarted and it worked again :smiley:

Pushover4

Are you running HA or hass.io?

I’m using HA.

I thought so, thanks forma answer

tried this again for 2nd time. no success. rolled back 0.93.2

confirming - i cannot get this working hass.io (Rasp Pi 3) 0.94+ update.

tried many things including overwrite pushover or pushover_custom . reboot host. clear pycache .etc etc

error is: attachment: invalid message parameter
even when trying to send non-image messages.

please help clever people :wink:

I have good news - Pushover works for me in v0.94.3 (rpi3, docker, hassio).
What you need:

  • https://developers.home-assistant.io/docs/en/hassio_debugging.html
    access via ssh port 22222
  • ssh IP -l root -p 2222
  • hassio > login
  • check id of docker conatiner with home assistant (type - “docker ps | grep homeassistant/raspberrypi3-homeassistant”)
  • exec in to docker container (ex. docker exec -it 804fa00e6168 bash)
  • update pushover (pip3 install --upgrade python-pushover)
  • pip3 should upgrade version from 0.3 to 0.4
  • restart home assistant
  • works with images :smiley:
3 Likes