Home Assistant

Hass.IO

Of all things, not something I expected I’d do. But, as it turns out – automation is definitely nice. I’ve got Wake-on-LAN working, and my lights etc – so I can turn on the lights in my office and boot up my workstation, with one button, on my phone. Everything is ready to use by the time I’ve made a coffee and walked from the kettle to the computer in the office.

Setup was surprisingly easy. I followed the official instructions, but I added some extra steps along with them (because I liked the look and function better).
Rather than everything being in configuration.yaml, I now have sensors in their own folder, with a yaml file per sensor (radarr, sonarr etc each have their own). Switches, themes, device trackers, zones… all separate files.

To be honest – it’s for my convenience. Being able to add a sensor and test around with it without risking damaging my existing config file is a godsend. YAML is space-sensitive, so one thing in the wrong place screws you.

curl -sL "https://raw.githubusercontent.com/home-assistant/hassio-installer/master/hassio_install.sh" | bash -s

That’s the command to install it on Ubuntu with docker already running. You need it for this method. After running it, open the web ui and create a user etc. Don’t bother going further than being able to log in – we’re going to change a lot.
mkdir /usr/share/hassio/homeassistant/custom_components
mkdir /usr/share/hassio/homeassistant/www
mkdir /usr/share/hassio/homeassistant/device_trackers
mkdir /usr/share/hassio/homeassistant/sensors
mkdir /usr/share/hassio/homeassistant/switches
mkdir /usr/share/hassio/homeassistant/themes
mkdir /usr/share/hassio/homeassistant/zones

The above commands will create the folders for HACS, and separate sensor configs. They help immensely. Next, we’re going to replace the default configuration file.

mv /usr/share/hassio/homeassistant/configuration.yaml /usr/share/hassio/homeassistant/configuration_default.yaml

That renames the default. It’s only there as a backup, for if this next bit royally f***s itself.

# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:

# Uncomment this if you are using SSL/TLS, running in Docker container, behind a reverse proxy and exposed to the web etc.
#  http:
#    base_url: *YOUR HASS WEB ADDRESS*
#    use_x_forwarded_for: true

###########################################
# Simple Components
###########################################
map:
sun:

# Wake-on-LAN
# https://home-assistant.io/components/switch.wake_on_lan/
wake_on_lan:

###########################################
# Text to speech
###########################################
tts:
  - platform: google_translate
    service_name: google_say

###########################################
# Frontend
###########################################
frontend:
  themes: !include_dir_merge_named themes

###########################################
# Includes
###########################################
# Single Files
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

# All Files in Folder
device_tracker: !include_dir_merge_list device_trackers
group: !include_dir_merge_list groups
sensor: !include_dir_merge_list sensors
switch: !include_dir_merge_list switches
zone: !include_dir_merge_list zones

That needs to go into /usr/share/hassio/homeassistant/configuration.yaml
To achieve this, nano /usr/share/hassio/homeassistant/configuration.yaml, followed by CTRL+O and CTRL+X (Overwrite and eXit).

Open your Web UI and go to Configuration -> Server Controls -> Restart. HASS will restart and reload the new config. Now any valid config file you place in the relevant folder will be loaded when restarting HASS. I’ve got a few Wake-on-LAN switches in the switches folder, some sensors for sonarr and radarr in the sensors folder, and hacs in the custom_components folder.
More on that in posts to follow.

Permanent link to this article: https://www.berserkir.net/wordpress/home-assistant/

Radarr

Why Radarr?
Same as Sonarr, but for movies. Give it a movie to watch for, and it can automatically grab it once it’s available.

Guides to come soon – for now, refer to the radarr wiki.

Permanent link to this article: https://www.berserkir.net/wordpress/radarr/

Sonarr

Why Sonarr?
Sonarr is a tool that monitors for releases. Give it a show to monitor for, and it’ll pull in the air dates for each episode. When an episode airs, it looks for it on the sources you give it (rarbg etc – or usenet) and passes it to your downloader for processing. Once it’s downloaded, Sonarr can sort and file it in the relevant folder for Plex to index.

Guides to come soon – for now, refer to the sonarr wiki.

Permanent link to this article: https://www.berserkir.net/wordpress/sonarr/

Ombi

One of the tools I use to manage my media library is Ombi.

“What’s it for?”

Well, that’s both simple and complicated – depending on how you configure it.
If you share your media with someone, odds are at some point they’ll ask you to add something you don’t already have. Ombi is a tool for managing those requests for content/media.
It lets the user search for the item they want themselves, and request it – at which point you (the admin) can approve or deny the request (or it can automatically approve it, depending on how you configure it).
If you have it linked to a download manager like Sonarr or Radarr, then once the request is approved the requested item gets sent to the relevant software to be watched for and downloaded. Once it’s sorted (and Plex/Emby sees it), Ombi notifies the person who requested it that the item is available.
This takes out the job of finding what you’ve been asked for manually – as the automated search tool looks for it (in my case, Sonarr/Radarr).

“Why use it?”

Simple – convenience. I have several people I share with who used to ask me if I had certain things via message. I’d then have to go out and find it manually, sort it, file it, and tell them when it was there.
This way? I just hit Approve or Deny and the system takes care of the rest – right down to telling the user when it’s available.

“Is there any support for it?”

Yes and no. Ombi is open source. Free. As in beer.
There is no paid support (though donations to the developer are always welcome, and offers of payment are up to the support team to accept or not).
There is one developer, who goes by Tidusjar. He hangs out in most of the support spaces.
There is a wiki that gets updated fairly often, and generally anything that happens for multiple people will wind up with a fix posted in the wiki too. This should be your first port of call.
There is a Discord server with a fairly active community (please read the rules when you join – we’ll know if you didn’t).
There is a subreddit as well – any posts there will notify the support team in Discord.

How do I set it up?

There’s a very comprehensive guide over on github for this. The wiki is set up with a lot of FAQs, as well as how to guides. I contribute to it from time to time.

Permanent link to this article: https://www.berserkir.net/wordpress/ombi/

Reverse Proxy (with Apache)

I did a little write-up on how I achieved reverse proxy nirvana with IIS a while ago now. It made things a lot nicer for me. Like, a lot.

I have a few friends/colleagues/acquaintances who run Apache (I run IIS in my homelab environment, that’s the only reason I went with it), so I figured I’d look into how I can help them do the same thing (only a little different).

Continue reading

Permanent link to this article: https://www.berserkir.net/wordpress/reverse-proxy-with-apache/