Turnkey raspberry pi deployment with Fabric

Awesome! Glad it helped :slight_smile: you pick the port for openzwave-control-panel. Given the nature of the tool, I opted to not run it automatically. You cd /srv/hass/src/open-zwave-control-panel and run ./ozwcp -p 8888 (or whatever port you want. can also use -d for debug output).

Thanks! Will try that when my Z-wave stick arrives.

One more question if I may. Now that HA is in a VM, what’s the update process when there is a new version of HA?

Hmm. Tried to edit yaml file through SCP and logging in with pi:raspberry wont allow it. scp: /home/hass/configuration.yaml: Permission denied.

yes, the home-assistant config’s, process, and etc are owned by “hass”. You should use sudo -u or similar…

Thanks, but how do you login with WinSCP to change the yaml file? Is it possible to enable Samba to make accessing and editing the yaml file easier?

Sorted. Modify the SCP/Shell page for your saved configuration and change it to sudo su - as shown here. You can also add Samba and create a new user by following the excellent instructions at BRUH Automation on YouTube here. My smb.conf file dedicated to this instance is here.

Ooh, and what port is Mosquitto running on, 1883?

Oh, I just got the same…

Lightbulb moment. I am logged in as pi, so…
sudo pip3 install fabric
Aha, it works

I’ve been able to successfully use the Raspberry PI All-in-one installer (the GitHub page appears to be updated before the web page on home-assistant.io is).

I’m not on a real fast connection and this was a painful process. I had to re-image & restart this process 4 times as I had some problem downloading the openwave software repeatedly. (perhaps an image file on a torrent site may be faster?)

I also had to switch from putty to WinSCP (the portable apps version works well).

Thanks for the help up to this point! I’m sure I’ll need more.

Calvin

Trying to update the Configuration.yaml using WinSCP.

I’m simply commenting out the introduction line with a # in front of “introduction:”

So I’m not clear how to restart home-assistant from within WinSCP so I simply pull the power plug on the Raspberry.

The introduction screen will not go away (cleared cache) and I can view the updated configuration.yaml to see the line is commented out.

Only log entry is…

16-05-17 11:17:18 homeassistant.components.recorder: Found unfinished sessions

I see no other configuration.yaml on the SD card at all.

What did I do wrong?

Calvin

Who are you logged in as?

pi / raspberry and I have the sudo su - done in WinSCP

Thanks,
Calvin

So I think your logged in as question is referring to the front page of Home-assistant? I was able to log out & log back in (doesn’t seem to matter what I use as password to log in (raspberry/ blank)) and the intro screen is gone so I’m off to edit something else and learn more.

Thanks,
Calvin

This is failing for me with when extracting libwebsockets

[localhost] out: libwebsockets-1.4-chrome43-firefox-36/test-server/leaf.jpg
[localhost] out:
[localhost] out: gzip: stdin: unexpected end of file
[localhost] out: tar: Unexpected EOF in archive
[localhost] out: tar: Unexpected EOF in archive
[localhost] out: tar: Error is not recoverable: exiting now
[localhost] out:


Fatal error: sudo() received nonzero return code 2 while executing!

Requested: tar xvf libwebsockets*
Executed: sudo -S -p 'sudo password:'  /bin/bash -l -c "cd /tmp >/dev/null && tar xvf libwebsockets*"

Aborting.
Disconnecting from localhost... done.

Unfortunately it seems that if the script fails you cannot simply run it again. It will fail if rerun for a number of reasons, existing users, directories, etc.

What’s the upgrade procedure for HA in a VirtualEnv as pip3 install --upgrade homeassistant does not work? Error log here.

Same boat, normal upgrade fails to work due to permissions/file locations I guess? My log is a bit different…

Thanks, Calvin

/home/hass$ pip3 install --upgrade homeassistant
Downloading/unpacking homeassistant
Running setup.py (path:/tmp/pip-build-lnruzr3k/homeassistant/setup.py) egg_info for package homeassistant

no previously-included directories found matching 'homeassistant/components/frontend/www_static/home-assistant-polymer'

Downloading/unpacking requests>=2,<3 from https://pypi.python.org/packages/99/b4/63d99ba8e189c47d906b43bae18af4396e336f2b1bfec86af31efe2d2cb8/requests-2.10.0-py2.py3-none-any.whl#md5=abf5a77de3e8a5973c738cca884502a0 (from homeassistant)
Downloading/unpacking pyyaml>=3.11,<4 (from homeassistant)
Running setup.py (path:/tmp/pip-build-lnruzr3k/pyyaml/setup.py) egg_info for package pyyaml

Downloading/unpacking pytz>=2016.4 (from homeassistant)
Downloading/unpacking pip>=7.0.0 (from homeassistant)
Downloading/unpacking vincenty==0.1.4 (from homeassistant)
Downloading vincenty-0.1.4.tar.gz
Running setup.py (path:/tmp/pip-build-lnruzr3k/vincenty/setup.py) egg_info for package vincenty

Downloading/unpacking jinja2>=2.8 (from homeassistant)
Downloading/unpacking voluptuous==0.8.9 (from homeassistant)
Downloading voluptuous-0.8.9.tar.gz
Running setup.py (path:/tmp/pip-build-lnruzr3k/voluptuous/setup.py) egg_info for package voluptuous
WARNING: Could not locate pandoc, using Markdown long_description.

Downloading/unpacking webcolors==1.5 (from homeassistant)
Downloading webcolors-1.5.tar.gz
Running setup.py (path:/tmp/pip-build-lnruzr3k/webcolors/setup.py) egg_info for package webcolors

Requirement already up-to-date: MarkupSafe in /usr/lib/python3/dist-packages (from jinja2>=2.8->homeassistant)
Downloading/unpacking setuptools>=0.6b1 from https://pypi.python.org/packages/57/68/a5b7002017dfbbf5f52bc23d4a9adedc97f7ceb5d92ae15591e858a56415/setuptools-21.2.0-py2.py3-none-any.whl#md5=7b46ed0067e872dce9893ff129f3cc96 (from voluptuous==0.8.9->homeassistant)
Installing collected packages: homeassistant, requests, pyyaml, pytz, pip, vincenty, jinja2, voluptuous, webcolors, setuptools
Running setup.py install for homeassistant

no previously-included directories found matching 'homeassistant/components/frontend/www_static/home-assistant-polymer'
Installing hass script to /usr/local/bin

Found existing installation: requests 2.4.3
Not uninstalling requests at /usr/lib/python3/dist-packages, owned by OS
Running setup.py install for pyyaml
checking if libyaml is compilable
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.4m -c build/temp.linux-armv7l-3.4/check_libyaml.c -o build/temp.linux-armv7l-3.4/check_libyaml.o
build/temp.linux-armv7l-3.4/check_libyaml.c:2:18: fatal error: yaml.h: No such file or directory
#include <yaml.h>
^
compilation terminated.

libyaml is not found or a compiler error: forcing --without-libyaml
(if libyaml is installed correctly, you may need to
 specify the option --include-dirs or uncomment and
 modify the parameter include_dirs in setup.cfg)

Found existing installation: pip 1.5.6
Not uninstalling pip at /usr/lib/python3/dist-packages, owned by OS
Running setup.py install for vincenty

Found existing installation: Jinja2 2.7.3
Not uninstalling Jinja2 at /usr/lib/python3/dist-packages, owned by OS
Running setup.py install for voluptuous
WARNING: Could not locate pandoc, using Markdown long_description.

Running setup.py install for webcolors

Found existing installation: setuptools 5.5.1
Not uninstalling setuptools at /usr/lib/python3/dist-packages, owned by OS
Successfully installed homeassistant requests pyyaml pytz pip vincenty jinja2 voluptuous webcolors setuptools
Cleaning up…

Anybody figure out how to update in a virtualenv? Following the directions on the site appear to upgrade has, but it’s still running 19.4.

I also like to know to to update in the virtualenv. Someone already found out? @jbags81 ?

After a lot of trying I found out… and it works:

to upgrade:

sudo su -s /bin/bash hass

then

source /srv/hass/hass_venv/bin/activate

then

pip3 install --upgrade homeassistant

I was able to get home assistant setup on my PI w/ this installer and I’m now trying to setup my zwave stick but I don’t know where to find the config that’s mentioned in the instructions. When I did this on a test VM the paths matched up but I don’t see anything matching the path in the /srv/hass/hass_venv/lib/python3.4/

Wiki Path: /usr/local/lib/python3.4/dist-packages/libopenzwave-0.3.0b8-py3.4-linux-x86_64.egg/config

Any pointers on where to look?

Thanks!

***EDIT

A little more digging and I found the answer in another thread. Z-Wave with Raspberry Pi All-In-One Installer