General thoughts on (getting started with) HA (hassbian)

It shouldn’t be this hard.
It just. Shouldn’t. Be. This HARD.

The crazy part is that I’m pretty tech savvy. I’m no stranger to Linux, networking, scripting/coding, TCP/IP, etc. etc. If it’s this freaking hard for me, I can’t imagine how a neophyte would have even a prayer of ever getting HA to work.

Every step of the way, something blocks me. Sometimes it’s on step 3 or 4, sometimes it’s the very first step. And as I google and dig my way toward a solution, once again, I find myself blocked.

As an example, I tried to follow the How To Get Started with Home Assistant Using HASSbian 1.1 from BRUH Automation (which sounds SO promising) and came to the part where I’m supposed to run sudo ./hassbian-scripts/install_samba.sh only - for starters, my home directory isn’t /home/homeassistant – it’s /home/pi - so there is no hassbian-scripts directory. No big deal, a little find -iname and I see where the problem lies. cd to the proper directory and… no joy. Because installation of samba, etc. is now done via hassbian-config. Thank goodness I managed to find that out by googling the error message.

So I (very painfully) get the basic stuff configured. Samba is installed, Mosquitto is installed (not sure about the broker and/or whether or not it’s working…) so now it’s time to try to get some of my home automation components working (so I can then leverage that to get some automations happening,)

I have an Insteon hub, an Insteon thermostat, 3 fanlinc controllers (for 3 ceiling fans), and 1 Insteon outlet. I have a Kwikset Z-wave smart deadbolt, a SmartThings hub, a TP-Link smart plug (Kasa app), 4 eTekCity smart plugs (VeSyncv app), six Sonoff switches (one of which I managed to tuck behind a light switch that controls 6 can lights in my kitchen), four Twakie smart outlets (which replace a normal in-wall AC outlet – not yet installed), 3 Bosch Zigbee motion detectors (which are intended to control some LED strip lights for getting safely to the bathroom or fridge and back to bed in the middle of the night), and - my most used devices - four 4-outlet smart power strips from Jinvoo that are controlled via the Tuya SmartLife app.

Googling Tuya and home-assistant leads me to a couple of significant threads on this forum. One of them leads me to a python script which has ABYSMAL installation instructions. (I’m supposed to copy a file to “/custom_components” which doesn’t exist. Turns out it’s NOT “/custom_components” but rather “/home/homeassistant/.homeassistant/custom_components” which also does not exist. Also turns out I need a local keyt and a device ID. The developer of the python script suggests I use WireShark to find out what they are - but the first step in that procedure leads down a deep, dark rabbit hole. Others (on this forum) have suggested an Android app called eFamilyCloud as an easy way of getting the local key and device ID - but you have to download and install an older version of the app. Well, I did that, and I can’t find the local key ANYWHERE.

This is all quite maddening. There needs to be step-by-step instructions for all this stuff, and it needs to be kept up to date in a wiki. It’s just waaaaaaay too hard for the average Joe.

2 Likes

Check this out to get a feel for what a monumental uphill battle this has been…
pi@home-assistant: $ hass --script check_config
-bash: hass: command not found
pi@home-assistant: $ cd /home/homeassistant/.homeassistant
pi@home-assistant:/home/homeassistant/.homeassistant $ hass --script check_config
-bash: hass: command not found
pi@home-assistant:/home/homeassistant/.homeassistant $ sudo find / -iname ‘hass’
sudo: unable to resolve host home-assistant
/srv/homeassistant/bin/hass
pi@home-assistant:/home/homeassistant/.homeassistant $ /srv/homeassistant/bin/hass --script check_config
INFO:homeassistant.util.package:Attempting install of colorlog==3.1.4
ERROR:homeassistant.util.package:Unable to install package colorlog==3.1.4: Exception:
Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.5/site-packages/pip/basecommand.py”, line 215, in main
status = self.run(options, args)
File “/srv/homeassistant/lib/python3.5/site-packages/pip/commands/install.py”, line 360, in run
prefix=options.prefix_path,
File “/srv/homeassistant/lib/python3.5/site-packages/pip/req/req_set.py”, line 784, in install
**kwargs
File “/srv/homeassistant/lib/python3.5/site-packages/pip/req/req_install.py”, line 851, in install
self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
File “/srv/homeassistant/lib/python3.5/site-packages/pip/req/req_install.py”, line 1064, in move_wheel_files
isolated=self.isolated,
File “/srv/homeassistant/lib/python3.5/site-packages/pip/wheel.py”, line 345, in move_wheel_files
clobber(source, lib_dir, True)
File “/srv/homeassistant/lib/python3.5/site-packages/pip/wheel.py”, line 316, in clobber
ensure_dir(destdir)
File “/srv/homeassistant/lib/python3.5/site-packages/pip/utils/init.py”, line 83, in ensure_dir
os.makedirs(path)
File “/usr/lib/python3.5/os.py”, line 241, in makedirs
mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: ‘/srv/homeassistant/lib/python3.5/site-packages/colorlog-3.1.4.dist-info’
Aborting script, could not install dependency colorlog==3.1.4

The bit of information you are missing is described in the technical details section of the hassbian installation page. hass (even when checking the config), needs to be run from within its virtual environment. To run the script check, use the instructions in `common tasks for hassbian.

I feel ya’.

My biggest complaint with HA is the lack of clear and concise documentation. I understand that HA was originally started by techies and written for techies so the authors assume a level of understanding that isn’t there for most people (myself included). Which leads to many frustrating days of just trying to work out what seems like should be the basics.

I’ve gotten to the point that every major upgrade or modification that I do I will write up my own step by step procedure in the off chance that I break something in my set up and have to start over from scratch again. That has saved me many MANY times.

The biggest thing that I can recommend is to MAKE BACKUPS! On every major milestone that I get working using a Raspberry Pi I pop the SD card out and make a backup image. I learned that the hard way too! It saves a lot of duplication of work.

If you need anything answered I’ll do my best to help. I’ve been in this around a year already but I still feel kind of like a noob so i might not be able to answer tho.

Thanks so much, finity. For the advice, the offer of help AND the validation! As I mentioned, I pretty much AM a techie so this is just that much more aggravating. I’m not used to feeling so lost with stuff like this! The thing that’s really making me pull my hair out is that I keep finding what I think are good tutorials that will help me get up and running - but then it turns out that things have changed and the info is outdated and one or more steps just don’t work. The backup advice is solid. So easy to forget the simple stuff like that.

In my case I have shared the frustration the OP describes. While I found the documentation excellent and thorough, it was missing some of the key components that I needed to better understand what I was doing right and what I was doing wrong.

It seems to me that HA is weak in documentation surrounding its overall architecture, including what key folders are where. When you add openZwave into the mix as well as MQTT things get confusing quickly because there is no clear description of where HA is looking for various components. Thankfully all the crucial configuration is in the /.homeassistant folder.

An example of the “hair pulling” I have had recently was that the simple example of how to build sensors did not explain that you only mention the “platform: sensors” one time in all the yaml files. Yes it uses the plural of sensor, but that is not obvious and it does not produce any errors in the config tester. It just causes one or two sensors and automations to fail without explanation.

This is, in no way a complaint about HA or its documentation. It is a much broader problem that exists in software and engineering overall. The people who do the design and implementation do not have the time (or money or desire or whatever) to collaborate with a technically savvy person to write detailed documentation. They cannot do it themselves any more than they could be expected to find all the bugs in their own code or proofread their own writing.

Overall I have found the “slog up the learning curve” to be worth my time and frustration because HA is a fantastic suite of programs with great support and near infinite flexibility. So DonnyBahama, I recommend you continue to fight off the frustration and I hope you get to a point where you can begin to realize the benefits of your efforts soon. Please understand that there are others here on the forum who can understand your issues and will support your efforts.

Don’t give up yet… it took me awhile to get mine going… and no matter how many times you think you read the docs go read them again… many of my issues getting going (one after the other similar to yours) were because of simple typing errors or missing a step… but let me tell you once you get it up and running and start customizing your layout and making automations you will know it was all worth it! All of my smarthome stuff is now done through HA and it’s the only app my whole family uses… once you get over this initial hump it becomes easier… don’t give up!

Thanks for your responses, txNgineer and Bartem! I have no intention of giving up and no doubt that the end will make all the headaches worthwhile.

I want to add that I don’t mean to be a whiner/complainer. I genuinely would like to participate in (or even spearhead) an effort to document things so that even a non-technical neophyte could go from nothing to awesome with little or no bewilderment or despair. But I’m sitting here with a relatively fresh install of HA (with a few little customizations that I was able to work out) and I’m thinking, “Customize my layout? How the heck do I even GET a layout?!”

Obviously, this is partly my fault… I bought the components I wanted without considering whether HA supported them. (I did google them and saw that at least some people on this forum had had some degree of success, so I assumed I would, too.)

Also, I don’t mean to denigrate the developers. Their skills far exceed my own and I appreciate that they have spent their time bringing this to life.

But MAN is this frustrating!

Your biggest mistake was using a video created nearly 18 months ago. You should know better :grin: The documentation on the HA site is kept fairly well up-to-date so don’t rely on YouTube or blog posts that are over 2 months old as this stuff changes real fast.

I’ve been meaning to post something here about what I’ve learnt over the last 18 months or so but I’ve been quite ill of late so my media channels have been a bit baron. Here are a few tips though.

  • If you want to easily be able to add add-ons easily, start with Hass.io over Hassbian.
  • When you get serious, move away from SD cards on Pi as soon as you can. I’m now running on Intel NUC with 60GB SSD and haven’t looked back.
  • Make sure your very first automation is one that creates at least a full weekly backup and store this somewhere else.
  • For editing yaml files, you cannot beat Atom with the excellent Linter add-on. Check out this video https://www.youtube.com/watch?v=gpbM_-BvsdU. With Linter installed, 99% of your formatting errors will get detected.

Follow these peeps on YouTube to get you racing in no time:

  1. BurnsHA: https://www.youtube.com/channel/UCSKQutOXuNLvFetrKuwudpg
  2. Csongor Varga: https://www.youtube.com/channel/UCdRpPAsQbIaVpn_vS2_omPw
  3. DrZzs: https://www.youtube.com/channel/UC7G4tLa4Kt6A9e3hJ-HO8ng
  4. The Hook Up: https://www.youtube.com/channel/UC2gyzKcHbYfqoXA5xbyGXtQ
2 Likes

You can contribute by editing the documentation to be more clear.

The instructions are 18 months old :face_with_raised_eyebrow:, but I don’t think github procedures have changed in that time.

Lots of people start with the youtube videos which is fine to a point but really you should start with the docs - makes the whole process much less painful. The videos are great to illustrate what can be done but stuff changes a lot.

1 Like

I did start with the docs but found them confusing.

You’re right. I should know better! :grin:
Thanks for the advice and the links. I have watched some of DrZzs vids. I’ll definitely check out the others.

I really wish this forum allowed you to edit older posts. I have a number of guides / posts that need to be updated but I can’t as they are locked.

Let’s start with this then…

What have you successfully completed and where are you stuck?

Thanks, finity. It’s very kind of you to proactively reach out to help.

At this point, all I’ve managed to accomplish is to set my actual latitiude and longitude, change the name from “Home” to “TikiShack”, setup Samba and install Mosquitto. (I haven’t done anything with an MQTT broker - I don’t understand the instructions.

I tried to add our Google OnHub router, hoping to get started with presence detection, but all I got was:

I think I need to better understand what configuration.yaml entries are supposed to look like. It makes sense to me that I would get all those “unavailable” icons considering that this is all I have in my config:

sensor:
  - platform: google_wifi

Clearly, I need some of this stuff:

Configuration variables:
host (Optional): The address to retrieve status from the router. Defaults to testwifi.here (other options include onhub.here and your router’s IP such as 192.168.86.1).
name (Optional): Name to give the Google Wifi sensor. Defaults to google_wifi.
monitored_conditions array (Optional): Defines the data to monitor as sensors. Defaults to all of the listed options below.
current_version: Current firmware version of the router.
new_version: Latest available firmware version. If router is up-to-date, this value defaults to Latest.
uptime: Days since router has been turned on.
last_restart: Date of last restart. Format is YYYY-MM-DD HH:mm:SS.
local_ip: Local public IP address.
status: Reports whether the router is or is not connected to the internet.

but I honestly don’t know how that’s supposed to look within config.yaml. I wish the example configurations would show all that stuff, with proper indentations, etc. so a noob could just copy, paste and edit. To me, that’s the number one thing that could be done to make HA more friendly to noobs.

The main things we use around the house (I’d feel greatly encouraged if I could get these things working) are:

  1. Four Jinvoo smart power strips (Tuya / Smart Life app) with 4 individually controllable outlets and 4 USB sockets (controllable as a bank). This represents our most controlled items (mostly lamps). Unfortunately, the Tuya integration in HA seems to be somewhat of a quagmire.
  2. A Sonoff basic switch that controls six can lights in our kitchen. Here, again, it’s a little complicated because I crammed the Sonoff into a 4-gang wall box without first flashing Tasmota on it. I thought I was going to be able to flash it wirelessly using SonOTA but when I went to do that, I found that Itead has rendered SonOTA useless in newer versions of the firmware. I’ve ordered the FTDI adapter which should be here in a couple days. I’ll flash some of my other Sonoff Basics to get comfortable with it before trying to extricate the one in the wall box (which I know from experience is going to be a chore but I am looking forward to soldering on some jumper wires and making the prexisting on/off switch functional again).
  3. A Broadlink RM Pro which turns our TV and Yamaha A/V receiver on/off, selects inputs, etc.
  4. A Kwikset deadbolt. I believe it’s a 910 but all it says is “Signature Series Deadbolt with Home Connect”. It currently works via Alexa and a SmartThings hub. I even have it lock automatically (after a short delay) using an “Alexa, I’m leaving” routine that also reminds my wife not to forget her iPhone and other essentials. Ultimately. I’d like to get rid of the SmartThings hub and get an Aeotec Z-wave stick but in the interim, if I could get HA working with the ST hub and get presence detection working to unlock the door when we get home, the WAF would take a big leap forward.

Right now, everything is controlled almost exclusively via Alexa and IFTTT.

I think, maybe, my best shot at getting something actually working in HA is my Yamaha AVR but since everything I want/need to do with that is perfectly suited to voice commands, I would then have to figure out how to trigger HA from Alexa.

One thing that might help you is there is a section on the main homeassistant.io website called the “cookbook”. Its a place where a bunch of users have uploaded their various configuration files.

Take a look at that and it should give you an idea on syntax. Not to mention each component usually has a full example configuration on the doc page.

As far as Mqtt I can jot down some instructions a little later today if you’re still stuck.

1 Like

I’ll check that out. Hopefully it’s searchable so I can find someone else’s Yamaha or Google Wifi configuration.

I would appreciate the MQTT instructions, though there’s probably not much I can do with MQTT until I get some actual entities added to my system!

The documentation is all there, but you need to know what to look for. That is the missing Rosetta Stone. I had problems with Home Assistant on Raspian- nothing specific, Just that installing anything through the git, including Home Assistant add-ons, is hit or miss. I downloaded the hass.io image and started over there. So far, Samba Share is a total bust. Tons of errors. But I don’t really need Samba since sftp on Filezilla works just fine for gaining access to the yaml files.

The first thing I saw saw different is that hass.io is running a different Linux distro than Raspian. Meaning that the file structure is different and following tutorials might present a challenge. (For example, in hass.io there is no /homeassistant folder).