Where is homeassistant hiding?

I did as you suggested and the ip on my router is the same as before but it refuses to connect in the browser. Tried with Putty but it says "unable to open, host does not exist.

OK, between your message “if this is your limit…” and now, what exactly have you done?

IE - what commands if any did you type in to putty? Did the connection on putty close itself, or did you close it? If it closed, what was the message? If you closed it, did you use “exit” or just close the window? Etc.

  1. I cleared Chrome’s cache
  2. I entered 191.168,1,191
    response
    This site can’t be reached
    192.168.1.191 refused to connect
  3. I closed Chrome and restarted it
  4. Tried 1 and 2 again wuth sae result
    5 I closed the Putty command window. Dis not use ‘EXIT’ as I was unaware of the need.
    6, Reopened Putty and retried 192.168.1.191
    Response
    unable to open connection to 192.168.1.191
    Host does not exist

Just now I tried Putty again, but added :8123 to the ip and was able to login to root@orangepizero.
I tried to change to Homeassistant with
sudo su -s /bin/bash homeassistant
but it says no such file or directory

If you are able to log in to ssh through port 8123, something is very very wrong.

1 Like

So I tried:
source /srv/homeassistant/bin/activate
and got into homeassistant user.
Started Hass and it is running again.
However when I try the web interface
192.168.1.191:8123

This site can’t be reached

192.168.1.191 refused to connect.

ERR_CONNECTION_REFUSED

I have no idea why.
router still shows 192.168.1.191
and putty connected with 192.168.1.191:8123

Any other way to configure Hass?

This.

Sounds like you’ve somehow changed your ssh port to 8123, so homeassistant now can’t have it.

You can try editing your configuration.yaml to include a port number to override, for example:

http:
  api_password: YOUR_PASSWORD
  server_port: 8199

Then restart homeassistant and try to connect from the Web browser on - http://192.168.1.191:8199

I need some more info to do that. How do I access configuration.yaml and what should I use to edit it. Should I remove the SD card from the OPI and mount it on my PC or restart Putty and edit via the command line? I have MC installed.

Thanks for your patience.

You can do whichever you are comfortable with.

If you can SSH into the device and modify the files, do that.

If you cannot SSH in, then you will need to pull the SDCard.

Either way, your setup is broken. I would start by getting SSH OFF of port 8123 and back on port 22.

From ssh

sudo su -s /bin/bash homeassistant 
cd ~/.homeassistant
nano configuration.yaml 

Change the lines
Ctrl+x
Y to save

@flamingm0e is right that we need to get ssh back on port 22, but I figure if we can get you to a Web interface first then we can fix the other stuff after. If we can’t it’ll be time to nuke the sd card and start again.

(aka, seeing if we can get homeassistant running on a different port gives us a clue how broken things are :wink: )

I was able to ssh into port 22 and edit configuration.yaml as below:
homeassistant:

Name of the location where Home Assistant is running

name: Chamboard

Location required to calculate the time the sun rises and sets

latitude: 29.4
longitude: -95.4

Impacts weather/sunrise data (altitude above sea level in meters)

elevation: 65

metric for Metric, imperial for Imperial

unit_system: metric

Pick yours from here: http://en.wikipedia.org/wiki/List_of_tz_database_time$

time_zone: UTC-5

Customization file

customize: !include customize.yaml

Show links to resources in log and frontend

introduction:

I tried this:
hass --script check_config
but it did not recognize hass

Command ‘hass’ not found, did you mean:

command ‘pass’ from deb pass
command ‘sass’ from deb ruby-sass
command ‘ass’ from deb irpas

Try: apt install

I also tried:
sudo systemctl restart hass.services
[sudo] password for homeassistant:
Sorry, try again.
[sudo] password for homeassistant:
I am not aware of a password for homeassistant

So that is the current state.

Anything else I should have added to configuration.yaml?

Just start over.

I hear that, but not without identifying what I should have done differently. Here is the list of commands which I used. Please modify if required.

root@orangepizero:~# sudo apt-get install python3-pip python3-dev python3-venv

root@orangepizero:~# pip install awscli

root@orangepizero:~# apt install python-pip

root@orangepizero:~# sudo apt-get install build-essential libssl-dev libffi-dev python3-dev

root@orangepizero:~# pip3 install wheel

root@orangepizero:~# sudo pip3 install --upgrade virtualenv

root@orangepizero:~# sudo mkdir /srv/homeassistant

root@orangepizero:~# sudo chown homeassistant:homeassistant /srv/homeassis

root@orangepizero:~# sudo su -s /bin/bash homeassistant

root@orangepizero:~# sudo useradd -rm homeassistant

root@orangepizero:~# sudo usermod -aG dialout homeassistant

root@orangepizero:~# cd /srv

root@orangepizero:/srv# sudo chown homeassistant:homeassistant homeassistant

root@orangepizero:/srv# sudo su -s /bin/bash homeassistant

source /srv/homeassistant/bin/activate

pip3 install --upgrade wheel homeassistant

homeassistant@orangepizero:/srv$ cd /srv/homeassistant

homeassistant@orangepizero:/srv/homeassistant$ python3.6 -m venv .

homeassistant@orangepizero:/srv/homeassistant$ source bin/activate

(homeassistant) homeassistant@orangepizero:/srv/homeassistant$ pip3 install homeassistant

Also is there a way to put these commands into a script file so they are executed serially as completed one by one.

Thanks.

I’m curious why you ran commands out of order.

You can’t chown or su to a user account that doesn’t exist yet.

You also ran several commands multiple times.

Don’t script this. Do it the right way and read the errors that you get.

I’m going to suggest something you probably don’t want to hear.

Either buy a Pi3, and use Hassbian (or Hass.io), or do a manual Hass.io install on your OrangePi. Run this as root:

curl -sL https://raw.githubusercontent.com/home-assistant/hassio-build/master/install/hassio_install | bash -s -- -m qemuarm

Honestly, it sounds like you’re far out of your depth here, and it’s going to be much easier to start fresh with a simpler install option.

1 Like

This.

If you look back through this thread you’ve posted lots of commands that you’ve typed in that don’t follow the documentation, and don’t follow the help you’ve been given in this thread.

Installing homeassistant is genuinely as easy as copying and pasting a few commands.

I think this is the best option for you until you become more confident with following one set of instructions from start to finish :+1:

1 Like

Yes, I agree that I am out of my depth. I read that installing Homeassistant was very easy. I followed instructions from two different websites starting with a blank SD card and step-by-step copying the commands in the order given and each time I encountered multiple errors. I googled each error and found that there were components required that were not listed in the instructions such as awscli and wheel and another which I don’t recall now. Try to correct those probably led to scrambling the list of commands I sent you guys.
I finally decided to ask for help from this forum and have been grateful for the patience and advice given. I have several Orange Pi Zeros and set a goal for learning how to use them by installing Homeassistant since it was said to be easy. I am not saying I am capable of doing this myself. I have done no programming since Fortran in college in the 70s. I am 71 years old and learn slower than most of you. However, I am eager to learn and to share that knowledge with others.
Thanks for all your support.

There is your first problem. Use the documentation found on home assistant’s website only.

Here’s the thing.

You are using ‘unsupported’ hardware, and are using the more advanced method of installation. For someone with no Linux experience, there is nothing easy about the method in which you chose. It IS easy to install using hassio, or even hassbian. Anything else is going to require some understanding of Linux and/or Docker, etc.

1 Like

You’ve chosen a hard way of getting going, as @flamingm0e has said.

The simplest method is to buy a Pi3 or a NUC and install Hass.io. The second simplest is to buy a Pi3 and install Hassbian. Either of those is very easy. If you’d even followed the HA docs you could have been up and running in four commands if you decided to skip the venv.

Instead you chose to buy other hardware, and then ignore the documentation and use conflicting guides - apparently with little Linux experience.

At this point I’d highly recommend you start fresh. If you’re going to go down the Orange Pi route, use the official HA docs. If you want something easier, buy a Pi3 and use either Hass.io or Hassbian.

One of my main goals is to use the Orange Pi as that is what I have. The HA docs link you provided is one of three HA links which I followed, each having its own issue. It was recommended to use venv for security purposes. I don’t want a hacker to mess my hard effort to automate my home.

The hardware was purchased before I even knew about Home Assistant.

I do not deny little Linus experience. I have books on the subject. but they are very good at making me drowsy therefor learning little.

I will likely take Tinkerer 's suggestion of the simple OPI install just to get Homeassistant up and running for my use. But I still want to understand and successfully install the easy (hard) way.

So I will continue this journey, apparently on my own. I am very thankful for the contributions of those who tried to help me.

Presuming you have a fresh install of a debian-based distro, these are the full steps for a secure (on device, remote access is something else entirely!!) venv installed homeassistant:

First we create a new use that will be ‘privileged’ :
[user] is the name you want to use, prompt is root@host

adduser [user] 

Follow the prompts

apt-get install sudo

usermod -aG sudo [user]

Log out of root, login as your user (either reboot or exit)

Now prevent root logins via ssh…

sudo nano /etc/ssh/sshd_config

Scroll to the line “PermitRootLogin” - change the option to “No” and uncomment the line - ctrl+x to exit the editor, Y to save the changes.

Install Python 3.6.4, samba and git:

sudo apt-get install build-essential tk-dev libncurses5-dev libncursesw5-dev libreadline6-dev libdb5.3-dev libgdbm-dev libsqlite3-dev libssl-dev libbz2-dev libexpat1-dev liblzma-dev zlib1g-dev samba git

wget https://www.python.org/ftp/python/3.6.4/Python-3.6.4.tgz
tar xzvf Python-3.6.4.tgz
cd Python-3.6.4/
./configure
make
sudo make install

If you’re going to be using a Zwave adapter, you also need to do the following:

sudo apt-get install libudev-dev

If using bluetooth for device tracking, also need to do the following:

sudo apt-get install bluetooth blueman bluez python-gobject python-gobject-2

reboot the device:

sudo reboot

Login via ssh using [user] then these commands set up a virtual environment on an unprivileged user so that we can run homeassistant safely, and then install homeassistant itself…

sudo useradd -rm homeassistant
sudo usermod -aG dialout homeassistant
cd /srv
sudo mkdir homeassistant
sudo chown homeassistant:homeassistant homeassistant
sudo su -s /bin/bash homeassistant
cd /srv/homeassistant
python3.6 -m venv .
source bin/activate
pip3 install homeassistant
hass

The last command runs homeassistant for the first time which sets up the instance. This takes a few minutes. Periodically try to connect to the web interface from the browser on your laptop by typing in the ip address of your device with :8123 after, for example 192.168.0.200:8123

Once that’s done, press ctrl+c in your terminal to stop the program, and we’ll set up auto-starting homeassistant when the device boots, and then restart homeassistant in the background, type:

exit

This returns you to your [user] account, then type…

sudo nano -w /etc/systemd/system/[email protected]

Copy the following in to the file:

[Unit]
Description=Home Assistant
After=network-online.target

[Service]
Type=simple
User=%i
ExecStart=/srv/homeassistant/bin/hass -c "/home/homeassistant/.homeassistant"

[Install]
WantedBy=multi-user.target

Ctrl+x, Y to save, now type:

sudo systemctl enable [email protected]
sudo systemctl start [email protected]

The homeassistant service is now running in the background. After a few moments the web interface should come back online.

You’re now a Linux expert.

Next step is Samba shares to edit your configuration files, and git for version control. We installed them both at the start so they’re ready when you are.

Hopefully I haven’t missed anything :slight_smile: