Understanding the HA, tha HA-Config files and Secret.yaml in special

Hey Guys, I’m the new Kid in town, I just started to play around with HA.
I have used other home automatino before, like OpenHAB and iobroker but I never liked that Java stuff because it is always a ressource killer. Not that I don’t have enough CPU Power and RAM available but it still is all kind of slow responding.

I really like that about HA. A friend of mine pointed me here and also is starting from scratch at the moment.

I took the slightly harder aproach and not just setup a RaspberryPi, I have Home-Assistant running inside an LXC container hosted by Proxymox and run HA on plain Debian Stretch.

The documentation is a bit of an issue to me. There are often code snipits but sometimes it seems they are not very complete, so it’s hard to learn. I would say about myself I’m not a Linux professional but also not a total noob. So I think I can read and follow documentation and guides.

Never the less, the installation was kind of straight forward. I think I still miss some debian packages, but also figured out to install some, already.
It took me a while to understand that I don’t have the components “shop” available (becasue I did not install haasio) but it seems all components are just there and I can just use them. So it would be really nice to have a getting started guide for intermediate users like me, even though the PI-way probably is the easier one but I have Proxmox Running anyway, so it doesn’t really make sense for me, similar to the usage of Docker.

Please don’t get me wrong, this is my first post here and I do a lot of complaing, but I see this as good way to contribute to such a project. Especially because I have no experience with HA so far and I’m probably not the only person haveing such (minor) problems getting started.

What I really like is the possibility to do all configuration in config files becasue you can just share them. So I wanted to start making use of the secret.yaml. But I don’t understand how to set it up, even the documentation gives a small example.
So I want to combine this: https://www.home-assistant.io/docs/configuration/secrets/
With this: https://www.home-assistant.io/components/homematic/

The homematic section of my config.yaml looks like this.
I want to move the IPs and the Usernames and Password to the secret.yaml

# Homematic
homematic:
  interfaces:
    rf:
      host: 192.168.xxx.xxx
      resolvenames: json
      username: Admin
      password: Sup3r-P4ssw0rd
    groups:
      host: 192.168.xxx.xxx
      port: 9292
      resolvenames: json
      username: Admin
      password: Sup3r-P4ssw0rd
      path: /groups
  hosts:
    ccu2:
      host: 192.168.xxx.xxx
      username: Admin
      password: Sup3r-P4ssw0rd

So I would probably change the config.yaml to

# Homematic
homematic:
  interfaces:
    rf:
      host: !secret homematic_host
      resolvenames: json
      username: !secret homematic_username
      password: !secret homematic_password
    groups:
      host: !secret homematic_host
      port: 9292
      resolvenames: json
      username: !secret homematic_username
      password: !secret homematic_password
      path: /groups
  hosts:
    ccu2:
      host: !secret homematic_host
      username: !secret homematic_username
      password: !secret homematic_password

But how do I need to setup the secret.yaml accodingly? Just like so:?

homematic_host: 192.168.xxx.xxx
homematic_username: Admin
homematic_password: Sup3r-P4ssw0rd

EDIT: And do I need to include the secrets like the other files?

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml

The format is correct, but the file is called secrets.yaml

No, that file is included automatically.

Excellent! Thank you @gpbenton ! That ist working now.
The Typo of Secret vs secrets.yaml, was only here in the forum. So I got the right file but thanks for the heads up.

1 Like

Just to make it clear, the “hassio store” provides add-ons, not components. Components are a core part of Home Assistant

Thanks for the info. I did not find any clear definition or a comparision matrix, that shows the differences of the different applications and application names or are these just packages?
Also I don’t yet understand the reason, why there are differences at all.

It seems, so far I don’t need any of these addons.

They are related to either Hardware, that I can’t use in LXC installation anyway or it is other linux Software that I would run inside a different container.

I Installed Samba, myself like this:


Seems there is still some issue on Win10, that could be related SMB protocol version but that is totally off-topic now.
So I don’t need any addon fot this as well. That seemst be good for me.

Add-ons are nothing more than preconfigured Docker containers that will connect to and run alongside hassio.

It is all stuff that is reproducible with some basic understanding of Linux and/or docker

exactly

I just wanted it to be clear that the ‘store’ are Add-ons for hassio, and not components.

1 Like