Finding discovered items in configuration.yaml

Using Hassio which booted easily and found all of my many existing devices in my home: great!

There is quite a bit of help here and on the web, but it appears that only a subset works for hass.io. At this point i’ve just started: it’s booted, I can connect to hassio.local:8123, I’ve setup samba and ssh. So far, so good.

Now I want to configure my home page. There are many tutorials that show people organizing groups in the configuration.yaml file. However with Hassio, there ARE no components in my configuration.yaml file! They just show up automatically. Can anyone point to a tutorial on how this works and how I can then group them? The existing tutorials seem to assume everything is in the c…yaml file.

Thanks

There should be a file that is being populated called known_devices.yaml, look in there.

Also, for groups, you only need to find the name of the the entity, which can be found by clicking the STATES button down the bottom of the left panel (looks like this < >)

And if you go into ‘Configuration’ and the ‘Customization’ you can hide deices from there with an override.

Thanks for the help. I’ve looked into the four samba folders I can see, addons, backup, config and share, and there is no known_devices.yaml file that I can see. I’ve looked for hidden directories as well and can’t find anything. Could it be somewhere else?

FWIW, my .HA_VERSION contains 0.59.2

Im working on the same issue today. I dont see any of my sensors anywhere and I would like to manipulate them. IM also on hassio. Are there hidden folders?

IM sorry to piggyback onto your thread. If its not ok just let me know. I just feel like we have the same issue.

Not at all! Glad to hear I’m not the only one. I support the goal of HassIO but it does seem to create a small divide in the community wrt documentation.

I’m volunteering to update the HassIO startup doc with this information once we figure it out as it seems like a likely first step that most HassIO users will have.

In the Developer’s Tools at the botton of the menu on the left, click the <> button and you will see your devices

Thank you. But just to confirm, are the devices stored in known_devices.yaml? If so, where would I find that file? Or is that just asking for trouble? Should I just go through your dev tools route and ignore that file?

HassIO seems to want me to do everything through the web UI but not all of the pieces quite feel in place yet.

Scott

I only see my iPhone in known devices. And yes, the web UI has short-comings. I make automations initially through the UI, but then flesh them out via a text editor directly on the automations.yaml. The <> button is handy to get the item names to use.

Still would like to know where known_devices.yaml lives and if it is an untouchable file our if I should add to it directly

My broader question is: For HassIO, how should I add a device? I assumed it was by adding it to known_devices

Depends on the device. You can find examples in others configuration.yaml at this link: https://home-assistant.io/cookbook/ . Some devices or services require the addition of lines in the yaml, some don’t. My known devices yaml is in the config folder at the same level as automations and configurations yamls. I access it via a Samba share with a Mac. It looks to me that the known_devices.yaml only contains devices for tracker.

Ok thanks. I’m running a RPi and known devices yaml is no where to be found. You’d think that was the more likely hardware to be used by beginners.

So what’s “tracker”? Are there 2 ways to add devices? (Tracker vs manual entry?)I’m totally a noob here and I feel no closer to understanding how things work.

I’m a bit surprised there is nothing to help HassIO beginners navigate this next step in modifying their system. Like I said, I’m offering to write something up but I have to figure it out first.

Before HassIO it was clear: add everything to the config file. HassIO adds an automatic layer that needs a bit more explanation for us beginners to get started.

Getting started can be quite a steep learning curve to understand the various files and structure of the HA system. I’ve been using hass.io for a few months, and I only recently started looking at the known_devices.yaml file. Its not something that will help you in the near term. Maybe later when you advance to location tracking and zones and therefore to the known_devices.yaml file (which is showing devices on my home network, not my home automation stuff). So, if I were you, forget that file for a while.

With “discovery” there is nothing added to any yaml files for you (that I’m aware of). Discovery simply means HA will automatically load the necessary components to support the things it automatically discovers in your environment, without you having to first put something in your configuration.yaml file. If you need to manually adjust settings for something that is auto discovered, you manually add the necessary code to your configuration.yaml file.

For example, initially my Harmony Hub was discovered. It shows up in the default frontend as “remote” with an on/off toggle. There was nothing in configuration.yaml. On my web frontend, when I click the <> button as others have said, it is listed there under “Current entities”, as “remote.harmony_hub” along with its current state and attributes. Note, your devices, whether discovered or manually configured by you, are “entities” in this list. Remember this <> page, you will visit it often.

As I’ve progressed in configuring my setup my Harmony Hub now shows up in my frontend as “Harmony Hub”, with a drop-down list of all my Harmony Activities, in a group I call Living Room. I used a lot of borrowed code from the forums to get here. I have entries in configuration.yaml, customize.yaml, customze_glob.yaml, automations.yaml, and groups.yaml to get to where it is today. I created all of those files except for configuration.yaml.

Reorganizing your web frontend requires manually typing the names of the entities you want in to the appropriate sections of your configuration.yaml file (or groups.yaml if you decide to split your configuration). It’s a process of a manual coding.

I recommend going to the Docs page and working your way down the links on the right side one at a time starting with the Configuration section. You may not actually do anything, or be ready to do anything with each section you read, but hopefully you’ll begin to see how things interrelate as you process through things. I found terminology to not always be clear, so reading through the docs helps you to see how the terms are being used and suss out information that’s not always obvious.

And keep searching and posting in the forums. It helps with sanity when you’re tired of banging your head on the wall :wink:

Have fun!

btw, you’ll spend most if not all your time in the config folder working on yaml files in there. I’ve done almost nothing in the other folders so far.

[edit]

There is quite a bit of help here and on the web, but it appears that only a subset works for hass.io.

To clarify, almost all of the documentation and forums apply to hass.io, IF it is talking about how to configure your home automation devices in HA, or modify the frontend. hass.io is just one way of installing HA, so if the documents you’re reading are about the underlying OS of your setup, or making changes at a low level, that’s where you need to question whether it applies to your hass.io implementation. hass.io is designed to manage the underlying OS environment, and therefore does have restrictions at that level. However, if your focus is on getting your automation devices to work within HA, then all that documentation applies. There is a special “hass.io” section in the forum, but don’t think that’s the only section that applies to you. If anything, the “Installation” section is the one you may want to avoid, as you’ve chosen hass.io as your installation.

2 Likes

Thank you. This was exactly the type of help/advice I needed to hear. This should allow me to proceed.

However, I’d like to contribute to this community and help improve it’s approachability for new users. As a UX designer, here are list of things I bumped into that might be helpful to discuss (in different threads)

  1. Hass.io vs HA
    I’ve found lots of great video tutorials online. It’s made pretty obvious that you’ll need to do most of your initial work by editing configuration.yaml directly. However, it quickly branches on HOW you need to do that, e.g. SSH vs Samba flows. Much of the SSH work uses commands that don’t appear to work for Hass.io (e.g. hass --script check_config) So just getting started with the most basic editing task is a series of questions/hurdles to get started. I’ve got it now but I’d like to see a slightly more step by step guide along the lines of:
  • make sure hassio.local:8123 works
  • Install SSH (strongly suggest just a password (obviously less secure but much easier for beginners))
  • Edit configuration.yaml with nano (e.g. change a title)
  • Use the hassio command to validate
  • Use the hassio command to relaunch
  • Refresh hassio.local:8123 to validate change

That core flow ticks many of the boxes I had to struggle with in getting started. You could easily argue for the SAMBA flow instead. The only issue there is that while my Mac found the SAMBA shares right off the bat, my Win10 machine STILL can’t find it. SSH seems more bullet proof. Offering both flows is also a good alternative.

  1. Entities
    Again every tutorial I’ve seen makes it crystal clear you need to add a device to configuration.yaml first. However, the auto-magical discovery process of Hass.io (which seems like a very good thing) is a bit confusing as things now show up on the home page WITHOUT being in configuration.yaml. This means if I want something to NOT show up I need to add an entity into configuration.yaml which just feels odd to me. It was why finding known_devices.yaml seemed like an important ask as I assumed that was where I should edit things. This is likely a much deeper issue and calls into question what it means to find/add devices. I don’t wish to call out the decisions made in this thread, just pointing out, as a UX designer, it was very confusing and in contrast with existing HA examples. Happy to pull this discussion in another thread as it’s likely a much bigger topic)

My suggestion would be for the editing tutorial discussed above to follow up with and “editing entities” section which covers this very point, doing something as simple as hiding or making a simple icon change to a ‘found’ device.

Scott

1 Like

It should be noted that the automatic device discovery isn’t unique to Hass.io. It’s also available in general HASS through the discovery component.

1 Like

Glad my ramblings were helpful.

A few thoughts:
I too would like to be able to improve documentation, but haven’t yet learned how to or gotten up the courage. I think it is possible to be granted access, though I don’t know the edit/review process, to make sure technical details are correct.

This world of development is fast moving and evolving. There are many ways to achieve things, and new options develop frequently (or seem to). After your second bullet point under #1 above:

  • I don’t load Samba unless I specifically want to edit files from an editor (I use Atom) from my Mac. Instead I’ve started using a web-based add-on.
  • Since installing hass.io I have rarely accessed SSH, unless I’ve managed to blow up HA so it won’t even launch, which is startlingly easy to do. When I make changes I check my config from the Configuration | General page in the frontend.
  • To restart I go to the Hass.io page and click the three dots button at the top right (Restart Home Assistant).
  • On that Configuration | General page I mentioned, you can reload several components to immediately see the effect without having to do a full restart (e.g. when I’m playing with my groups.yaml which affects my frontend I Reload Groups and the Overview page reloads with my new setup).

When I was starting I downloaded the Atom editor to my Mac, and prefered it to Nano for editing files via Samba because of the UI and syntax highlighting when editing yaml files. But now I get a similar interface directly in the web IDE I linked to above.

  • I don’t think discovery is unique or special to hass.io. It’s a core feature of HA (correct me if I’m wrong).
  • You need to add a device to configuration.yaml, if it is not auto-magically discovered, or if you want to further configure it. For better or worse, the default assumption in HA is, “if I find it, I’ll show it to you on the frontend.”
  • I’ve hidden a lot of stuff via the customize.yaml and customze_glob.yaml files. For example, one of my zwave light switches puts out about 6-8 “sensors” which are useless to me day to day.
  • When you do start to configure your frontend manually, NOTHING will show up until you put it in the right group. So if you get some new device, it may be an entity on your entities page, but will not be on your frontend, until you manually add it to your groups.

I’m trying to give my perspectives and answers as a fellow user (my “lessons learned”) since I shared many of the same challenges, and continue to struggle as I push forward (struggle is maybe too negative. It’s a challenge that I take on.). Hopefully, others will read and learn from us. For my part, I think there needs to be a better selection guide for new users to help them decide on which installation method to use. I didn’t discover hass.io until a month or two after I started, and was thrilled when I found it and finally understood what it was.

But to your larger question, since you and I are not accomplished developers (I presume), how do we use our other capabilities to fix documentation issues and help those who follow? I think we need to reach out to the makers and find out how we can get involved in that as a project to aid the community.

[addendum]
btw, I think there are other options for editing frontend, automations, etc. from within the Configuration page, but I’ve found them not as useful so far. Point being, there seem to be many ways to avoid Samba and SSH, but they’re not as effective or easy as I think they were hoped to be.

1 Like

That WebIDE looks nearly perfect. I’m currently away from my RPi but this is one of the first things I’ll try when I get back. I’d go further, this seems like something that should be added into the default HassIO installations given how critical it is to edit the configuration.yaml file. I whole heartedly agree that SSH/Samba are not optimal.

WRT editing the documentation. I think we both share a desire to ‘give back’ and improve the docs. I’ll start another thread about how best to do that and hope the mods weigh in.

Given your groups comment (I’m not quite there yet :slight_smile: it seems reasonable to consider a ‘starter group configuration’ for noobs. What I mean is that throwing every found device onto the home page is cool for your very first launch but likely a pain for any subsequent use. I’m thinking of a ‘found device group’ that is created so they all go into a more controlled bucket. This

  1. Still shows first run users you’ve found something
  2. Introduces groups with an initial example
  3. Allows any subsequent new devices to not ‘mess up’ your home page

Again, I’ll start another thread on this.

1 Like