Fritz!Box Call monitor - failed on 0.42.2 pi3

I recently upgraded to 0.42.2 on my HASSBIAN (Pi3) setup and my call monitor stops working.

The log gives me the following error message

17-04-11 19:37:58 ERROR (MainThread) [homeassistant.setup] Not initializing sensor.fritzbox_callmonitor because could not install dependency fritzconnection==0.6.3
17-04-11 19:37:58 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform sensor.fritzbox_callmonitor: Could not install all requirements.

I tried installing it manually using the following command:
$ sudo su -s /bin/bash homeassistant
$ pip3 install fritzconnection==0.6.3

And got this error in return:

compilation terminated.

Compile failed: command 'arm-linux-gnueabihf-gcc' failed with exit status 1

creating tmp

cc -I/usr/include/libxml2 -c /tmp/xmlXPathInitbe_btu7f.c -o tmp/xmlXPathInitbe_btu7f.o

/tmp/xmlXPathInitbe_btu7f.c:1:26: fatal error: libxml/xpath.h: No such file or directory

 #include "libxml/xpath.h"

                          ^

compilation terminated.

error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1

*********************************************************************************

Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed?

*********************************************************************************

----------------------------------------
Cleaning up...
Command /usr/bin/python3 -c "import setuptools, tokenize;__file__='/tmp/pip-build-z7hj2vex/lxml/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-lhfuf7oe-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip-build-z7hj2vex/lxml
Storing debug log for failure in /home/homeassistant/.pip/pip.log

any help will be highly appreciated.

Cheers
Erick

@erickjoaquin, not using hassbian, but does HA run in a virtualenv on it?
Maybe activate the venv before pip install.
My fritz callmonitor runs without problems on ubuntu server with virtualenv and HA 0.42.2.

hi VDRainer,

I tried that approach as well by executing the following command

$ source /srv/homeassistant/bin/activate
(homeassistant) pi@hassbian:/usr/bin $ pip3 install fritzconnection==0.6.3

Identical result :tired_face:

It is asking for the missing lib, but not sure how to do it.

cheers
Erick .

Iā€™ve the same issue on 0.42.3.

17-04-14 20:32:36 ERROR (MainThread) [homeassistant.setup] Not initializing sensor.fritzbox_callmonitor because could not install dependency fritzconnection==0.6.3
17-04-14 20:32:36 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform sensor.fritzbox_callmonitor: Could not install all requirements.
17-04-14 20:47:14 ERROR (MainThread) [homeassistant.setup] Not initializing device_tracker.fritz because could not install dependency fritzconnection==0.6.3
17-04-14 20:47:14 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform device_tracker.fritz: Could not install all requirements.

:confounded:

Donā€™t know if this helps, but maybe you update your os first with:

sudo apt-get update
sudo apt-get upgrade

Here are my current versions.

homeassi@server:~$ . /srv/homeassi/bin/activate
(homeassi) homeassi@server:~$ pip freeze
aiohttp==2.0.5
appdirs==1.4.3
async-timeout==1.2.0
chardet==3.0.0
colorlog==2.10.0
enum-compat==0.0.2
fritzconnection==0.6
homeassistant==0.42.3
Jinja2==2.9.6
lxml==3.7.2
MarkupSafe==1.0
multidict==2.1.4
netdisco==0.8.1
netifaces==0.10.5
packaging==16.8
paho-mqtt==1.2
PyMySQL==0.7.9
pyparsing==2.2.0
pytz==2017.2
PyYAML==3.12
requests==2.13.0
six==1.10.0
typing==3.6.1
voluptuous==0.9.3
yarl==0.10.0
zeroconf==0.17.6

In cases the libxml is missing, installing the libs should help:

Login as pi:

sudo apt-get install libxml2-dev libxslt1-dev
sudo su -s /bin/bash homeassistant
source /srv/homeassistant/bin/activate
(homeassistant) pi@hassbian:/usr/bin $ pip3 install lxml
(homeassistant) pi@hassbian:/usr/bin $ pip3 install fritzconnection==0.6.3

I did pip3 install fritzconnection==0.6.3 in the virtualevn and that solved the problem for me

This failed for me when having the same problem after upgrading to HASS 0.77.3 on Debian jessie in a virtual environment on a Pi Zero W with Python 3.6.

I would get a ā€œcomponent is misconfiguredā€ message in the web interface even with a barebones

Couldnā€™t install lxml kept running into

ā€œCompile failed: command ā€˜gccā€™ failed with exit status 1ā€ ā€“ it was runnning out of memory.

The trick that worked for me was to create a swap file to avoid the memory problem. Hereā€™s the step by step of what worked for me, starting as pi user

sudo su
source /srv/homeassistant/bin/activate
sudo dd if=/dev/zero of=/swapfile bs=1024 count=524288
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
apt-get install libxml2-dev libxslt1-dev python-dev zlib1g-dev
sudo swapoff /swapfile

lxml takes forever to install, where ā€œforeverā€ = 40 minutes+ on my Pi Zero.