Installing Home-Assistant on Linksys EA6500v2 Router or Entware enabled router

try installing gcc if its available for your architecture

opkg install gcc 
1 Like

thx! Solved the problem after “Headers installation”

makwanajigneshm
lRadix
you have already set up autorun hass?

Not auto run but in daemon mode. It does not start automatically but runs fine once started. I had a streak of 45 days continuous run before mosquito degraded.

I installed cffi following the instructions: https://github.com/Entware/Entware-ng/wiki/Self-installation-of-python-modules


creating /opt/lib/python3.7/site-packages/cffi-1.12.2-py3.7-linux-mips.egg
Extracting cffi-1.12.2-py3.7-linux-mips.egg to /opt/lib/python3.7/site-packages
cffi 1.12.2 is already the active version in easy-install.pth

but I encountered an error when executing the command

HOME=/opt/ha/ pip3 install homeassistant

Could not find a version that satisfies the requirement cffi>=1.1 (from versions: )
No matching distribution found for cffi>=1.1

Please help.

You may want to follow this guide.

By the way, I am using home assistant 0.75.3

1 Like

Okay, So I ran into some troubles with the disk and I had lost all setup. So had to start from begining, starting from creating the opt partition. Below is the command log that is specific to HA.

opkg install gcc
opkg install busybox ldd make gawk sed
opkg install coreutils-install
wget -qO- http://pkg.entware.net/binaries/armv7/include/include.tar.gz | tar xvz -C /opt/include
opkg install python3
opkg install python3-pip
python3 -m pip install --upgrade pip setuptools
mkdir /opt/pip_home 
source /opt/bin/gcc_env.sh
cd /opt/lib
ln -s libffi.so.6 libffi.so
opkg install python-dev
opkg install python3-dev
HOME=/opt/pip_home pip3 install homeassistant

After long wait time, all packages are compiled and installed including cffi.

Installing collected packages: voluptuous, voluptuous-serialize, ruamel.yaml, Unidecode, python-slugify, attrs, multidict, idna, yarl, chardet, async-timeout, aiohttp, certifi, MarkupSafe, jinja2, pyyaml, pytz, astral, urllib3, requests, asn1crypto, six, pycparser, cffi, cryptography, PyJWT, bcrypt, homeassistant
Running setup.py install for voluptuous-serialize ... done
Running setup.py install for ruamel.yaml ... done
Running setup.py install for python-slugify ... done
Running setup.py install for multidict ... done
Running setup.py install for yarl ... done
Running setup.py install for MarkupSafe ... done
Running setup.py install for pyyaml ... done
Running setup.py install for pycparser ... done
Running setup.py install for cffi ... done
Successfully installed MarkupSafe-1.1.1 PyJWT-1.6.4 Unidecode-1.0.23 aiohttp-3.5.4 asn1crypto-0.24.0 astral-1.10.1 async-timeout-3.0.1 attrs-18.2.0 bcrypt-3.1.6 certifi-2019.3.9 cffi-1.12.2 chardet-3.0.4 cryptography-2.5 homeassistant-0.90.1 idna-2.8 jinja2-2.10 multidict-4.5.2 pycparser-2.19 python-slugify-1.2.6 pytz-2018.9 pyyaml-3.13 requests-2.21.0 ruamel.yaml-0.15.88 six-1.12.0 urllib3-1.24.1 voluptuous-0.11.5 voluptuous-serialize-2.1.0 yarl-1.3.0

Hi, I followed your advice but I ran into this error:

Cannot allocate memory while executing command python setup.py egg_info

How can I solve this?

Following below guide will help you.

1 Like

Thank you for your reply but I´m doing this on Asus router.
Just for the record: turned out to be a problem with lack of RAM, so I resolved it easily by setting up a swap on external disk.

Sorry for a newb question, I manged to install HA according to this post but I don´t know how to actually run it.

How about reading something here?

did you try this ?

daemonize -c /opt/ha/ -p /opt/ha/pid.file -l /opt/ha/lock.file -o /opt/ha/out.log -e /opt/ha/err.log /opt/bin/hass --c /opt/ha

then open with your http://routerIP:port

HA up and running on Asus AC68U w/ Entware, thank you guys.

1 Like

Need some more help, please. I´m getting this error

ERROR (MainThread) [homeassistant.setup] Error during setup of component cloud
Traceback (most recent call last):
File “/opt/lib/python3.7/site-packages/homeassistant/setup.py”, line 151, in _async_setup_component
hass, processed_config)
File “/opt/lib/python3.7/site-packages/homeassistant/components/cloud/init.py”, line 141, in async_setup
from hass_nabucasa import Cloud
File “/opt/ha/deps/lib/python3.7/site-packages/hass_nabucasa/init.py”, line 16, in
from .remote import RemoteUI
File “/opt/ha/deps/lib/python3.7/site-packages/hass_nabucasa/remote.py”, line 16, in
from .acme import AcmeClientError, AcmeHandler
File “/opt/ha/deps/lib/python3.7/site-packages/hass_nabucasa/acme.py”, line 9, in
import OpenSSL
File “/opt/ha/deps/lib/python3.7/site-packages/OpenSSL/init.py”, line 8, in
from OpenSSL import crypto, SSL
File “/opt/ha/deps/lib/python3.7/site-packages/OpenSSL/crypto.py”, line 16, in
from OpenSSL._util import (
File “/opt/ha/deps/lib/python3.7/site-packages/OpenSSL/_util.py”, line 6, in
from cryptography.hazmat.bindings.openssl.binding import Binding
File “/opt/lib/python3.7/site-packages/cryptography/hazmat/bindings/openssl/binding.py”, line 14, in
from cryptography.hazmat.bindings._openssl import ffi, lib
ImportError: libssl.so.1.0.0: cannot open shared object file: No such file or directory

Below is output of my opkg command.

root@motog:/tmp/home/root# opkg list-installed | grep ssl
libmosquitto-ssl - 1.5.7-1
libopenssl - 1.1.1a-2
libwebsockets-openssl - 3.1.0-1
mosquitto-client-ssl - 1.5.7-1
mosquitto-ssl - 1.5.7-1
python-openssl - 2.7.15-5
python3-openssl - 3.7.2-4a

What do you get? If anything is not coming up install it with opkg command.

Some of them were indeed missing but unfortunately after installing them the error stays the same

What is the output of below command? Shared output from my box for reference.

root@motog:/opt/lib# ls -l libss*
-rw-r--r--    1 root     root        434380 Mar 22 15:41 libssl.so.1.1
lrwxrwxrwx    1 root     root            15 Mar 23 23:46 libssp.so.0 -> libssp.so.0.0.0
-rwxr-xr-x    1 root     root          5732 Mar 22 15:41 libssp.so.0.0.0
root@motog:/opt/lib#

torta@DSL-AC68U:/tmp/mnt/MYPART/lib# ls -l libss*
-rw-r–r-- 1 torta root 434380 Mar 22 19:41 libssl.so.1.1
lrwxrwxrwx 1 torta root 15 Mar 30 09:13 libssp.so.0 -> libssp.so.0.0.0
-rwxr-xr-x 1 torta root 5732 Mar 22 19:41 libssp.so.0.0.0
torta@DSL-AC68U:/tmp/mnt/MYPART/lib#

Hello @makwanajigneshm,

What version of HA are you using? For a long time, everything worked for me on the xiaomi 3g device with entware, but the latest updates broke the integration. HA components using cryptography produce errors that appear to be solved by the libssl-dev package.

log example
2019-05-05 12:49:51 ERROR (MainThread) [homeassistant.setup] Error during setup of component asuswrt
Traceback (most recent call last):
  File "/opt/home/admin/hassio/lib/python3.7/site-packages/homeassistant/setup.py", line 153, in _async_setup_component
    hass, processed_config)
  File "/opt/home/admin/hassio/lib/python3.7/site-packages/homeassistant/components/asuswrt/__init__.py", line 45, in async_setup
    from aioasuswrt.asuswrt import AsusWrt
  File "/opt/home/admin/hassio/lib/python3.7/site-packages/aioasuswrt/asuswrt.py", line 9, in <module>
    from aioasuswrt.connection import SshConnection, TelnetConnection
  File "/opt/home/admin/hassio/lib/python3.7/site-packages/aioasuswrt/connection.py", line 6, in <module>
    import asyncssh
  File "/opt/home/admin/hassio/lib/python3.7/site-packages/asyncssh/__init__.py", line 31, in <module>
    from .agent import SSHAgentClient, SSHAgentKeyPair, connect_agent
  File "/opt/home/admin/hassio/lib/python3.7/site-packages/asyncssh/agent.py", line 35, in <module>
    from .public_key import SSHKeyPair, load_default_keypairs
  File "/opt/home/admin/hassio/lib/python3.7/site-packages/asyncssh/public_key.py", line 43, in <module>
    from .encryption import get_encryption_params, get_encryption
  File "/opt/home/admin/hassio/lib/python3.7/site-packages/asyncssh/encryption.py", line 23, in <module>
    from .crypto import BasicCipher, GCMCipher, ChachaCipher, get_cipher_params
  File "/opt/home/admin/hassio/lib/python3.7/site-packages/asyncssh/crypto/__init__.py", line 27, in <module>
    from .ec import ECDSAPrivateKey, ECDSAPublicKey, ECDH
  File "/opt/home/admin/hassio/lib/python3.7/site-packages/asyncssh/crypto/ec.py", line 24, in <module>
    from cryptography.hazmat.backends.openssl import backend
  File "/opt/home/admin/hassio/lib/python3.7/site-packages/cryptography/hazmat/backends/openssl/__init__.py", line 7, in <module>
    from cryptography.hazmat.backends.openssl.backend import backend
  File "/opt/home/admin/hassio/lib/python3.7/site-packages/cryptography/hazmat/backends/openssl/backend.py", line 71, in <module>
    from cryptography.hazmat.bindings.openssl import binding
  File "/opt/home/admin/hassio/lib/python3.7/site-packages/cryptography/hazmat/bindings/openssl/binding.py", line 15, in <module>
    from cryptography.hazmat.bindings._openssl import ffi, lib
ImportError: /opt/home/admin/hassio/lib/python3.7/site-packages/cryptography/hazmat/bindings/_openssl.abi3.so: undefined symbol: ENGINE_set_default_RAND

I was using 0.90.1. But I did upgrade today and I upgraded to latest version that is 0.92.2 and odd enough I did not have to do that upgrade. Probably because I do not use xiaomi device.