Pushing Images with Pushover 3.0

The obvious problem seems to be that if you use the custom component, it still makes use of the base HA python-pushover library. If you are upgrading HA, HA will update and downgrade that library during the update. The best way around this is to push the library update to the base repository which is what my fork does so I am not using a custom component but I am not making the pull request because I am not the author of this excellent code… I would prefer the author to do it. :slight_smile:

If you use a custom component, and call it “pushover”, and update the manifest.json file with the 0.4 version of the library, does it work? This is what I had done previously, but I haven’t tried the updated to the 0.94 version of Home Assistant. I might have had to restart the container once, I don’t recall if that was strictly necessary.

Ok, so I just upgraded my Home Assistant installation from 0.93.2 to the latest 0.94.3 version, in the form of the docker container on docker hub that’s generated by the Home Assistant team. I run it on an Ubuntu 18.04 Linux box, no Hass.io is used this picture, though perhaps it also applies there?

Upon restart, Home Assistant apparently retrieved the 0.4 version of the pushover library; I checked by firing up a shell inside the container to see what was actually installed:

root@hass:/usr/src/app# pip list | grep pushover
python-pushover                  0.4

…and I also got my expected pushover notification upon start-up…

As I described in a post earlier in the thread, I created a custom component named pushover and a manifest.json file that in that custom component’s directory that references version 0.4 of the library. My guess is that both of these factors are important to keep Home Assistant ensuring that the old version is present for the original component.

See Pushing Images with Pushover 3.0 - #125 by lmamakos for that post describing my environment; perhaps this is helpful to others.

This worked for me. Nothing else in this thread did. On hass.io V 0.93.4 now.

@tiaan I am running hassio V 0.93.4 on a pi3+ but did not have success with this…

@BigBen. Were you able to execute the necessary commands successfully?
Perhaps you can outline the steps you took to date, and I may compare it to the steps I took. I am sure if I got it to work, we can get you up and running as well.:upside_down_face:

@tiaan I took all the steps as mentioned above. Logged in via SSH (port 22222), I upgraded from version 0.3 to 0.4 but still get the same error. I even did a second time to check but it said 0.4 was already running and that it found and uninstalled an old version 0.3

Do you use a manifest file ? Maybe I should download a new pushover.py I might have tried altering it based on suggestions in this thread.

@BigBen

I do use a manifest file as mentioned through this thread. To simplify matters here is a link to a zip file I created for you. It contains the working copies put together. from Github repos. I have it in my custom_components folder under “pushover”

PS [forum mods]. Not sure if attaching link like this violates an forum rules. Not been active on here for a long time. I did go through them. If it does, please let me know and I will remove accordingly.

1 Like

@tiaan unfortunately I still get the same error

Ok @BigBen

Best I can do is recap what I did, perhaps something in there is a eureka moment for you.

I first tried EVERYTHING mentioned above (some recollection may be wrong, but essentially correct)

  1. Downloaded the files from @brkr19 's Github repo. The version I downloaded seemed to have all the latest recommended edits. The files in the link essentially are what I am running, so they should work for you as well.
  2. After doing this, I got the “attachment: invalid message parameter” error. I then, again, ensured the files were correct. They were.
  3. I followed a suggestion above to remove(comment out) the pushover configuration from my config file, restart, and put it back to see if hassos will upgrade python_pushover. It did not.
  4. At this point I gave up, and rolled back hass.io to 0.93.2, and of course pushover (with file attachments) started working as expected. Perhaps you can make sure that it works when you roll back to this version?
  5. I then read the post of @michalt. I upgraded back to 0.94.3 and followed his steps.
  6. After rebooting, hass.io was on 0.94.3, and my pushover with image attachments were working.

Final though. Make sure you FULLY reboot HASSOS, and not just restart homeassistant via the frontend.

I tried this on Hass.io 0.94.3 on rpi. This was the only solution that worked for me.
Thanks!!

I had this working in my docker container on 0.94.3

But now I’ve moved over to HAssio on a RPi3 on 0.94.3 and I also get the attachment: invalid message parameter error. I’ve been pulling my hair out, it just won’t work… :exploding_head:

Are you using pushover as the custom component name, and do you have a manifest.json file with the 0.4 version of the pushover library referenced? My theory is that you need to have the custom component shadow/pre-empt the stock pushover component, and you need to have the newer library version present in the manifest file. That error message is evidence that the older version of the pushover python library is being used.

Yes, I have the manifest with version 0.4 referenced.

I literally just copied the folder from my Docker to the raspberry. I can see in the startup log that the custom component is loaded (as you get that warning message about using custom components).

None of my messages work at the moment though due to the ‘invalid message parameter’. I need to remove the custom component to even send a standard pushover notification.

Where on my Docker container, it’s still working fine.

As one datapoint, when I look inside my Docker container (via docker exec -it hass bash) I notice this:

root@hass:/usr/local/lib/python3.7/site-packages# python -c 'import sys; print(sys.path)'
['', '/usr/local/lib/python37.zip', '/usr/local/lib/python3.7', '/usr/local/lib/python3.7/lib-dynload', '/usr/local/lib/python3.7/site-packages']
root@hass:/usr/local/lib/python3.7/site-packages# head -5 /usr/local/lib/python3.7/site-packages/pushover.py
# pushover 0.4
#
# Copyright (C) 2013-2018  Thibaut Horel <[email protected]>

# This program is free software: you can redistribute it and/or modify

which indicates that the newer dependency for version 0.4 of the pushover library got installed in what looks like the standard python library path for site-specific packages.

I wonder when hass.io resolves package dependencies, where/if it managed to install the 0.4 version of the pushover library, and if the sys.path in the running Home Assistant would resolve to the newer version if it didn’t get put into the same place. Maybe there’s something different here with how hass.io supports its own extensions? Just a wild-ass guess on my part.

I can’t get it to work, I tried everything above but no luck

I noticed this thread Integrating Blue Iris, Pushover, Node-RED, and Amazon Rekognition which is another means of getting access to this capability via Node Red. This might be something to consider if you’re already using Node Red…

I’m using HA in Unraid in container and had the same issues…
I simply updated it in container console by running:
pip3 install --upgrade python-pushover
And I restarted the container.

Works fine now.
Just in case it help users with this setup.

1 Like

Yep, this worked for me

sfnetwork wrote:
I simply updated it in container console by running:
pip3 install --upgrade python-pushover

I saw someone else mentioned that above, but how do I do that from hassio?

FYI, after updating to HA 0.94.4, still the same issue.