Notify html5 Error after upgrade to 0.45.1

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.

Did all these things but same problem.

2017-06-04 16:05:36 ERROR (Thread-10) [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-rbmwlg7l/http-ece/
2017-06-04 16:05:36 ERROR (MainThread) [homeassistant.setup] Not initializing notify.html5 because could not install dependency pywebpush==1.0.0
2017-06-04 16:05:37 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform notify.html5: Could not install all requirements.
2017-06-04 16:05:37 ERROR (MainThread) [homeassistant.components.notify] Unknown notification service specified

Any idea ?

Sorry, 'm out of ideas at this point. Maybe Robbie will check in when he gets a chance. I’m sure he’s been busy with the new release.

I can wait :slight_smile:

I’m at the beginning of the automation trip and have plenty of over things to explore.

I was able to get mine to work (using hassbian) with:

sudo su - # Make myself root
source /srv/homeassistant/bin/activate
pip install --upgrade setuptools #Required to fix http_ece errors
pip install https://github.com/web-push-libs/pywebpush/archive/1.0.1.zip
2 Likes

that’s great, I will give that a try after back up my card in the next couple of days and report back.

Question, so

sudo su -

makes yourself root?
or should it be just:

sudo su

and the password is the one you assigned for pi?

Both commands work. And yes, when asked for a password use the one from current user (usually pi)

1 Like

Unfortunately this didn’t help me but I’m not running Hassbian so it might help others.

Think I need to look for other options for notify

instead of sudo apt-get install pywebpush

go into virtual environment and type

pip3 install pywebpush

1 Like

The key is to install lib-ssl-dev (sudo apt-get install libssl-dev) Then when you restart Home Assistant, it should install the updated version pywebpush. If you still get errors, install pywebpush manually (sudo pip3 install pywebpush==1.0.0)

Hi guys!
Had the same problem with the HTML5 Push.
Updating the setuptools did the trick for my setup. ( Hassbian, Pi1 )

$ sudo systemctl stop [email protected]
$ sudo su -s /bin/bash homeassistant
$ source /srv/homeassistant/bin/activate
$ pip install --upgrade setuptools
$ pip3 install pywebpush
$ exit
$ sudo systemctl start [email protected]

This steps installed the following: ( As today, 19th Jun 17 )
setuptools-5.5.1 > setuptools-36.0.1 and pywebpush-1.0.5
Witch issn’t ideal. I think its better to difine the wanted version ( pip3 install pywebpush==1.0.4 )
Or just leave the line out and let HA sort things out on boot.

2 Likes

I used Youri’s method and managed to get rid of the error message but html5 is still not working for me. I no longer get error messages in the logs but when I test the notify, I only get pushbullet notifications and not html5. Strange since I created a boolean just to test this. I will keep digging and report back to see if there is something missing in my configuration.

Looks like I had to update my html5_push_registrations.conf. Everything is working now.
I noticed that under Developer tools>services. Under the Domain > Notify, there were like 5 unnamed devices under services. This prompted me to check the html5_push_registrations.conf. Once I deciphered which one was for my phone, i just renamed it and everything works!

Thanks everyone for replying and helping out. I really appreciate the community. Hope this will help someone else who runs into this issue.

Hi Frelev,

Pushbullet was working very well for me. I actually like it more than html5 only because I can change the ringtone and notification LED on my phone to something different. I really only use it for message notifications and not the sms stuff so I just really did the minimal set up for it to get it to work.

@wouf
I was getting the error homeassistant.setup] Not initializing notify.html5 because could not install dependency pywebpush==1.1.0 in your case pywebpush==1.0.0

This is what i did and it worked.
$ sudo systemctl stop [email protected]
$ sudo su
$ source /srv/homeassistant/bin/activate
$ pip install --upgrade setuptools
$ pip3 install pywebpush==1.1.0 ####### in your case 1.0.0
$ exit
$ sudo systemctl start [email protected]

see if it helps

Thx @juan11perez.

I no longer use Notify html 5, I have replaced it with Telegram notification. (I have also moved from hassbian to hassio)