Notify html5 Error after upgrade to 0.45.1

Wonder if someone can help, I’m suddenly getting the following error in my error log after the upgrade. It was working on 0.40 and I upgraded it all the way to 0.45.1. Now, obviously my notify 5 push notifications stopped working :frowning:

I’m using Hassbian by the way and I’m quite new at this…

2017-05-23 22:22:40 ERROR (Thread-6) [homeassistant.util.package] Unable to install package pywebpush==1.0.0: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-79l17yum/http-ece/
2017-05-23 22:22:40 ERROR (MainThread) [homeassistant.setup] Not initializing notify.html5 because could not install dependency pywebpush==1.0.0
2017-05-23 22:22:40 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform notify.html5: Could not install all requirements.
2017-05-23 22:22:40 ERROR (MainThread) [homeassistant.components.notify] Unknown notification service specified

I’m not a Hassbian user, but have you tried installing pywebpush manually?

I’m not quite sure how to do that… When I initially configured it, hassbian installed pyywebpush already I think.
Sorry I’m quite new to this.

These command (run from the venv, logged in as the HA user and with the venv activated) should tell you whether pywebpush and cryptography are installed:

pip list | grep pywebpush
pip list | grep cryptography

This thread should also help:

hi rpitera,

I think hassbian is slightly different. When I tried to run the virtual environment like the one in the link you provided, I get an error.

pi@hassbian:~ $ sudo systemctl stop [email protected]
pi@hassbian:~ $ source /srv/homeassistant/homeassistant_venv/bin/activate
-bash: /srv/homeassistant/homeassistant_venv/bin/activate: No such file or directory

I think I got into the virtual environment of hassbian by looking through the docs, but when I ran your commands I got errors.

pi@hassbian:~ $ sudo su -s /bin/bash homeassistant
homeassistant@hassbian:/home/pi $ source /srv/homeassistant/bin/activate
(homeassistant) homeassistant@hassbian:/home/pi $ pip list | grep pywebpush
DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
(homeassistant) homeassistant@hassbian:/home/pi $ pip list | grep cryptography
DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.

My html5 notify stopped working as well with 0.46-DEV but I have nothing in log indicating error.
Service is called but no message is sent.

I also stopped using notify.html5, tired of having to fix things.

YOu need desktop or smartphone notifications? For Android notification check Zanzito @MrMep it just works, and does not break after HASS updates

1 Like

Yeah I confirmed last night it was 0.45.1 that broke the notify html5 notifications. I re-flashed back to 0.40 and notify html5 worked. As soon as I upgraded Hassbian to the latest release, which is currently 0.45.1, rebooted, and notify html5 stopped working.

Thanks I will check this out.
I wanted to use html5 because I didn’t want to have to manage another app on my phone. Usually browsers will take care of it. I’m running windows/chrome and android/chrome so I think I meet the requirements of Zanzito.

I have a MQTT server on my pi for OwnTracks presence detection, just not encrypted though… (which is something I still need to figure out)

But I think you need the browser running.

Go with Zanzito you will not regret it. It has many more features

Not on an Android device. It comes up in notifications. But on a desktop browser, unless you have Chrome options to let it run in the background as a tray app for notifications, then you are correct.

Just make sure you install these dependencies and you should be good
sudo apt-get install libpython-dev libffi-dev libssl-dev

Question is, how do I install it on hassbian?
Do I need to log into a virtual environment?

$ sudo su -s /bin/bash homeassistant
$ source /srv/homeassistant/bin/activate

And then run the sudo apt-get install libpython-dev libffi-dev libssl-dev?

Edit: I tried doing the above and it asked for a password for Hassbian. I don’t know what the password is… I tried all my passwords and nothing worked.

No - dont do it in the virtual environment. Just run when logged on as pi

Hi 12-hak,

I tried and got the error below.

pi@hassbian:~ $ sudo apt-get install libpython-dev libffi-dev libssl-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
libffi-dev is already the newest version.
libpython-dev is already the newest version.
libssl-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 13 not upgraded.
pi@hassbian:~ $ sudo apt-get install pywebpush
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package pywebpush

I must be typing the command in wrong to get pywebpush…

These were the instructions I got from Robbie - the dev - who helped me to get it running in a Gitter chat.

Maybe they’ll help?

1. Shutdown Home Assistant
2. If you use a virtual environment (virtualenv/venv), activate it.
   sudo apt-get install libpython-dev libffi-dev libssl-dev
3. pip uninstall pywebpush
4. pip install "https://github.com/web-push-libs/pywebpush/archive/e743dc92558fc62178d255c0018920d74fa778ed.zip#pywebpush==0.5.0"
5. Start up Home Assistant
6. Attempt to send a notification over HTML5.

It seems Wheezy is missing libpython-dev and just downgrading to pywebpush==0.5.0 didn´t help

sudo apt-cache search libpython*

libpythia8 - PYTHIA event generator of high energy physics
l ibpythia8-dev - PYTHIA event generator of high energy physics - development files
libpython2.6 - Shared Python runtime library (version 2.6)
libpython2.7 - Shared Python runtime library (version 2.7)
libpython3.2 - Shared Python runtime library (version 3.2)
libpythonqt2-dev - Dynamic Python binding for the Qt framework - development
libpythonqt2.0 - Dynamic Python binding for the Qt framework - runtime

So for me this was a no go

Weird how pip is not installed?

pi@hassbian:~ $ pip install "https://github.com/web-push-libs/pywebpush/archive/e743dc92558fc62178d255c0018920d74fa778ed.zip#pywebpush==0.5.0"
-bash: pip: command not found

This was a cut and paste from the chat - let me check but I think that should be pip3 if you are running in the venv.

EDIT: Went back and reread the entire chat transcript and only pip was mentioned but I did do it all with the venv activated so it may be that I just didn’t correct him or ask because I was a 4 month noob at the time in a chat with a core dev. LOL Was trying to give @robbiet480 due respect. And it was such a great intro to how nice this community was (is) that a core dev - who at the time was managing a point release at the same damn time - would take time out to help some noob fix his setup.

I really think that should be pip3 since you are in a Python 3 environment when the venv is activated.