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

mqtt
router
Tags: #<Tag:0x00007f1b981a03a0> #<Tag:0x00007f1b981a01e8>

#1

Hello Everyone,

As this is my very first post, please pardon if I’ve posted it into an incorrect forum. I wanted to share my experience on installing Home-Assistant on Linksys EA6500v2 running Tomato Firmware 1.28.0000 -3.5-140 K26ARM USB AIO-64K.

First step was to install entware on the router using this guide.

http://tomatousb.org/tut:optware-installation

Next step was to install python 3 on the router, by using command “opkg install python3”.
Below guide helped setup rest of the packages.

Next step was to install home assistant by using setup tools, wheels and then homeassistant it self by using below commands.

HOME=/opt/ha/ pip3 install homeassistant
–/opt/ha is the path that I want to use as temp path for compilation.

Also installed MQTT Broker by below command.

HOME=/opt/ha/ pip3 install hbmqtt

Next was to daemonize the two application on router, below are commands.

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
daemonize -c /opt/hbmqtt/ -p /opt/hbmqtt/pid.file -l /opt/hbmqtt/lock.file -o /opt/hbmqtt/out.log -e /opt/hbmqtt/err.log  /opt/bin/hbmqtt -c /opt/hbmqtt/config.yaml

Configuration is standard configuration.

Edit 2018Oct
I ended up using mosquitto mqtt client as I was hbmqtt was not relaying/dispatching messages reliably.

opkg install mosquitto-nossl

And we can follow mosquitto configuraiton guide as usual. I could not get ssl version working for mosquitto.

Cheers.


#2

Hi,

There were no problems installing cffi? Can’t pass this error in entware:

  Using cached https://files.pythonhosted.org/packages/e7/a7/4cd50e57cc6f436f1cc3a7e8fa700ff9b8b4d471620629074913e3735fb2/cffi-1.11.5.tar.gz
    Complete output from command python setup.py egg_info:

        No working compiler found, or bogus compiler options passed to
        the compiler from Python's standard "distutils" module.  See
        the error messages above.  Likely, the problem is not related
        to CFFI but generic to the setup.py of any Python package that
        tries to compile C code.  (Hints: on OS/X 10.8, for errors about
        -mno-fused-madd see http://stackoverflow.com/questions/22313407/
        Otherwise, see https://wiki.python.org/moin/CompLangPython or
        the IRC channel #python on irc.freenode.net.)

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /opt/tmp/pip-install-7fyyfg9d/cffi/

#4

Thank you for your guide, managed to install it on a R7000 with an modded ASUSWRT image from xvortex

Had several errors with some python package, had to edit the cffi package per guide section at the bottom.

ps- maybe adjust your title as it can be installed on many routers who support the latest Entware packages


#5

Not really. Did not run into that error.


#6

Glad to hear I was helpful

Sure, Let me edit the title


#7

Hi,
Share your installation instructions cffi please :wink:


#8

see here


#9

Followed the instructions, but encountered an error. My actions:

  1. downloaded and unzipped the “cffi-1.11.5.tar.gz” archive to one of the directories
  2. Edited the contents of setup.py
  3. Run the command “python setup.py build” from the directory with “cffi-1.11.5”

An error is returned:

/opt/lib/cffi-1.11.5 # python3 setup.py build
unable to execute ‘mipsel-openwrt-linux-gnu-gcc’: No such file or directory
unable to execute ‘mipsel-openwrt-linux-gnu-gcc’: No such file or directory

No working compiler found, or bogus compiler options passed to
the compiler from Python's standard "distutils" module.  See
the error messages above.  Likely, the problem is not related
to CFFI but generic to the setup.py of any Python package that
tries to compile C code.  (Hints: on OS/X 10.8, for errors about
-mno-fused-madd see http://stackoverflow.com/questions/22313407/
Otherwise, see https://wiki.python.org/moin/CompLangPython or
the IRC channel #python on irc.freenode.net.)

#10

try installing gcc if its available for your architecture

opkg install gcc 

#11

thx! Solved the problem after “Headers installation”

makwanajigneshm
lRadix
you have already set up autorun hass?


#12

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.