Where is the Home Assistant Supervisor /data directory located?

Again, that was not the question.

I believe that the /data directory is the /config one.
Btw, i havent updated esphome yet because of that change.

I updated my esphome to latest version on a test build and on the logs:

[14:42:02] INFO: Waiting for ESPHome dashboard to come up...
[14:42:02] INFO: Migrating old .esphome directory...
[14:42:02] INFO: Starting ESPHome dashboard...
2023-09-29 14:42:02,878 INFO Starting dashboard web server on unix socket /var/run/esphome.sock and configuration dir /config/esphome...

Checked the directory with ssh and the folder is empty…

Good point, I should have mentioned that it’s not necessary. But it is convenient to have it right there in HA. If I can’t easily keep them in sync, I’ll just un-install the add-on. That would be disappointing, but I’ll survive.

Ok, i found some config files in :~/homeassistant/addons/data/15ef4d2f_esphome

The yaml code hasnt moved from ~/homeassistant/homeassistant/esphome , is still there.

Thanks, good to know the YAML files are still there. But, to keep the two (ESPHome on my laptop, and the ESPHome add-on) in sync I’ve been copying the .json files to config / esphome / .esphome. That seems to be where the add-on looks to see the version and such.

Again, this isn’t the end of the world. I can live without the add-on. It’s just convenient to have it right there in HA. I only use ESPHome on my laptop when it’s time to compile something.

I left the addon many months back due to lack of compiling muscle on rpi4. your laptop can do much better using it’s high x86 processor. Just use the WSL2 ubuntu/debian/kali or even windows (dashboard is now supported).

for backup just use a private GitHub repository. Discord

I know this wasn’t the original question.

The files in the .esphome directory are meant as temporary build artifacts before ESPHome uploads them. They are not meant to be edited or used directly by users.

Since some people are looking for the files, can you share how accessing these files helps you?

Hi Paulus, thank you for helping out in person!
I feel honoured and really appreciate it.

There might be other reasons for other users to access these files, but since I was the initiator of this thread I will answer first.
Like I wrote in another post I currently don’t need access to these files, but about two years ago I needed to modify some of the BH1750 code to test some changes before issuing a PR on Github.
I might be wrong, but seem to remember that at that time I had to access the files in the .esphome folder for this, so that’s why I was asking for this.
This was all completely new for me at that time, so it might be that I could have done this differently and that I didn’t need accessing those files at all.

I copy over the JSON files to keep my ESPHome add-on in sync with the version of ESPHome I have on my laptop. This way I don’t need to compile in HA, which is a bit of a challenge to my poor little RPi. With the add-on, I can see more detail about my devices right in HA, without having to fire up ESPHome on the laptop.

ESPHome’s /data maps to ~/homeassistant/addons/data/15ef4d2f_esphome

HA Supervised:
ESPHome’s /data maps to /usr/share/hassio/addons/data/15ef4d2f_esphome

Looking at changelog commits:
per esphome#5374 temp files created during compile are in /data/build
per esphome#5441 json files are in /data/storage

I’m not sure about HAOS (should be the same?), but on my supervised install the Samba addon exposes the base addons folder. This means all files are still accessible albeit in a different location.

EDIT: apparently I forgot about switching from the addon to Samba through my base OS (Debian) which is how I’m able to access the addon folder contents. It looks like most addons use a base image which allows access to the backup, config, media, share, and ssl folders but not the base addons folder. Instead it links to a subfolder called local inside the base addons folder.

EDIT2: according to the developer docs the subfolder is intended to be used as persistent storage. If every addon linked to the same base addons folder they would overwrite one another’s files.

1 Like

I just confirmed that my HAOS (2023.9.2) does expose the addons directory via the SAMBA add-on.

This is good news. Thanks!!

Sometimes there may be caching issues during compiling the binaries - the best solution is to be able to access that directory to manually clean it.

Also, people running Home Assistant in a VM, and doing VM backups, might also be interested in the ability to access and clean the directory, as when backing up the entire VM, those files are still better if deleted first.

1 Like

In my HAOS setup, the addons folder is empty (and was always empty). Both looking through Samba or SSH cli.

how to access (and clear) it on haos?

I have some custom lighting effects libraries installed, and sometimes on an ESPHome update, it gives errors. When that happens, I have to manually erase the files from the cache and re-compile, then it compiles OK.
I’m having that issue now, and can’t find the cache files to erase.

A (temporary) fix would be to change the directory in which ESPHome compiles. Per the ESPHome docs, you can change this on a per project basis using build_path.

  name: ${node_name}
  # relative to the YAML file
  # if your YAML file is in /config/esphome
  # then the build files would be in /config/esphome/build/<node_name>
  build_path: ./build/${node_name}

Does not really get rid of all the mess that way

I just want dashboard to reflect the names in the config, but dashboard uses the .esphome thing, also if something gets deleted, or renamed, dashboard does not correctly detect that it is now offline etc.


Is not a solution as it does not show .esphome, i guess permission issue

So an answer:

I did use adamoutler/HassOSConfigurator: A set of Add-Ons to configure HassOS For various platforms and development purposes. (github.com)
there is kinda walkthrough how to set it up

I usd puttygen and putty, set up private auth and default username to be root