Pushing Images with Pushover 3.0

Thanks a lot bro

I also tried one more time to make this work, and using a custom component overriding the original pushover component did the trick for me! Iā€™m running the prebuilt Home Assistant container from hub.docker.com in Docker on Ubuntu 18.04. Just for clarity, I am not running hass.io, though this experience might be helpful to you.

Let me describe the steps I took in the event they might be useful to others.

  • I made a directory which will appear inside the container as /config/custom_components/pushover ā€“ for ā€œnormalā€ Home Assistant, this will just be in your configuration directory rather than /config

  • I created an empty file /config/custom_components/pushover/__init__.py

  • I created a file /config/custom_components/pushover/manifest.json which contains this:

     { 
      "domain": "pushover",
      "name": "pushover",
      "documentation": "https://home-assistant.io/components/notify.pushover/",
      "dependencies": [],
      "codeowners": [],
      "requirements": ["python-pushover==0.4"]
     }
    
  • I then put https://raw.githubusercontent.com/brkr19/home-assistant/dev/homeassistant/components/pushover/notify.py into /config/custom_components/pushover/notify.py

And then I had to restart the Home Assistant Container ā€“ just invoking the restart service didnā€™t work ā€“ it did not seem to get the updated version of the pushover library that supports attachments.

And now it works! Yay! (FYI, Iā€™m running this on version 0.93.2 of Home Assistant.)

Previously, I tried to install this as a different custom component alongside the original pushover component, and I think there were conflicts over which version of the pushover library was going get installed.

Hope this is helpful! And it would be really nice to get this merged into the standard release of Home Assistant. I think there was a desire on the part of the developers to refactor this component (and the one the attachment logic is based on) to move that common code out. While I can see that would be a really desirable thing to do, seems like it could be done in a couple of distinct steps.

In any case, thanks for the work that was done to hack this version ā€“ itā€™s going to be a really nice addition to my system.

1 Like

thanks very much to all,working right now

I took these same steps in Home Assistant 0.93.2 and also running in Docker and it works. Thanks for the detailed explanation!

Would be nice to push the updated python-pushover 0.4 into home assistant dev. I wonder why this has not yet been doneā€¦

To avoid having to create a custom component, I actually forked 0.93.2 and upgraded it that way.

You can upgrade your home assistance instance with the following:

sudo -H pip3 install --upgrade git+git://github.com/rafale77/home-assistant.git@master

1 Like

Thank you very much! It works for me too :slight_smile:

Now not working with home assistant 0.94,someone else with this problem?
attachment: invalid message parameter

Not sure if this will help, but try deleting the __pycache__ folder thatā€™s inside the custom_components\pushover folder. Also restart after you delete it.

I havenā€™t upgraded yet so Iā€™m eager to know if that helped.

Did it work for you? I returned to 93.2 again

No I havenā€™t upgraded yet. A buddy of mine upgraded and has the same problem as youā€¦ So iā€™m going to hold off on upgrading mine. He did try deleting the __pycache__ folder, but no success.

Thanks for the answer, Iā€™ll wait for some fix

Umm, wellā€¦ I decided to try upgrading anyway, and it looks like pushover still works (all good with attachments). Iā€™m running Docker btw. not Hassio.

Itā€™s good to know, to see if someone with hass.io has the same problem and knows some solution. Thanks

I am running Hass.io, just updated to version 0.94.

Got this error:
attachment: invalid message parameter

Deleting the __pycache__ folder did not help.

Same here, waiting for fix

Sounds like maybe the old pushover library is in use (as specified by the stock component). I wonder if you restarted again if it might start using the new library. Note, kill the python process rather than just having home assistant re-exec itself. It ought not to make a dfferenceā€¦ but this reminds me of an issue I had where while running HASS in a Docker container, I had to restart the container to have new new library used. Just a wild guessā€¦

Check your log to see if the custom pushover component gets loaded. It should say:

You are using a custom integration for pushover which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.

It should work. I updated my fork (which does not use custom component) to 0.94 as well.

Yes, It send me that message and send me same error even with simple notifications without pushing image

I am getting that same message, so it does load the custom pushover.