HA not following soft links for docker volume

Using docker, a config default is being created because I have a shared config that is mapped into images via volumes, either my own - or a pull of homeassistant/raspberryPi3-homeassistant . Just one example:

version: '3'
services:
  homeassistant:
    container_name: homeassistant
    image: homeassistant/raspberrypi3-homeassistant:stable
    volumes:
      - /home/ha/HOMEASSISTANT/HASS/CONFIG:/config
    environment:
      - TZ=Europe/London
    restart: always
    network_mode: host
    devices:
      - /dev/serial/by-id/usb-0658_0200-if00:/dev/ttyACM0
    privileged: true

Just testing various images, and using a a config link:
/home/ha/HOMEASSISTANT/HASS/CONFIG

On my raspbian (linux) box this a symlink to different directories depending on what I’m testing. HA isn’t following symlinks and thinks the config is missing. If I create the CONFIG dir above as a “normal” dir, then all is well.

??

Folder Permissions

Symlink don’t work for mounting docker volumes, nothing to do with HA. See here for some more information.

1 Like

Thank you for your reply. I visited that link, but far from making it clear, it creates more confusion for me. But aside, this does not help me anyway.

To expand insight into my problem…

My /etc/hassio.json is:

{
    "supervisor": "homeassistant/armv7-hassio-supervisor",
    "machine": "raspberrypi3",
    "data": "/home/ha/HOMEASSISTANT/HASSIO/DATA_SHARE"
}

What I am seeking to do is symlink the config dir, which is (using the data in the above config):-
/home/ha/HOMEASSISTANT/HASSIO/DATA_SHARE/homeassistant
…which is where configuration.yaml and other yam config files are held.

So, my config dir in /home/ha/HOMEASSISTANT/HASSIO/DATA_SHARE looks like this
lrwxrwxrwx 1 ha ha 5 Dec 2 21:21 homeassistant -> /home/ha/test1

And i would like to change the link to point to different test dirs, depending on what I am testing.
lrwxrwxrwx 1 ha ha 5 Dec 2 21:21 homeassistant -> /home/ha/test2
lrwxrwxrwx 1 ha ha 5 Dec 2 21:21 homeassistant -> /home/ha/test3

This allows (or rather it would do if working) my HA core to run and at each startup pickup a config depending on where the link points to. But it doesn’t work. The homeassistant link is not being followed. The homeassistant dir must be a true directory - not a symlink - otherwise core will create a default config.

Now, as am running hassio, the file structure is different with different volumes used, compared to homeassistant core.
In hassio the usual /usr/share/homeassistant can be remapped using the data key/value pair, as indeed I have done in myhassio.json - as above.
Homeassistant core does things differently. It looks for /config which can be mapped as a volume name passed into the docker command (-v) or as a volumes entry in a docker-compose.yaml file. So all that I need to do here is simply pass a different host directory with the -v flag, I do not even need to use symlinks, as in one of:-

docker run -it -v $(readlink -f /home/ha/test1/):/config/ ...
docker run -it -v $(readlink -f /home/ha/test2/):/config/ ...
docker run -it -v $(readlink -f /home/ha/test3/):/config/ ...

I have only just moved from a simple homeassistant core installation, to the more complex hassio docker (yes “unsupported” I know). I am unsure how to achieve what I want using hassio docker and I am unsure how the container containing the core is started and how and where - I guess if I knew I could change it perhaps to pass a -v argument in ?

Hope this explains. It’s almost like I want to be able to pass a config key/pair using /etc/hassio.json - but I cannot find any docs on what config options can go into /etc/hassio.json.

There’s no such thing as hass.io docker, that’s not only unsupported, that’s not even an install method. The different install methods can be found here.
Also the term Hass.io has been deprecated for around 6 months now. What you are using now is Home Assistant Supervised and it’s not meant that you run your own docker stack, by doing this you are asking for trouble and make your life harder than it needs to be. If you want to configure your own docker containers use HA Core.

What’s the goal of all this? What different configs are you testing?

For me it feels like you are overcomplicating things.

2 Likes

I wouldnt get hard over on the vernacular mate, “HA” (my abbvr) is full of idiosyncrasies - components . integrations (same thing, well not quite thesedays), “addons” applications (!) custom components - I could go on. Even home assistant has its roots in another completely different named software, and the docs are full of “errors” (if one can use that term to describe inconsistencies). It’s relatively trivial to find inconsistencies. But I take your point and you are correct in the context you write your assertion. I am well aware of the install methods - and I could list another 10 at least for different host architectures and platforms - oops platforms that’s another misused term.:wink: so I think - when you refer to “install methods” - you refer to the very latest home assistant native dev documented methods - but be cognisant there are others , and many a project out there seeking to / have already forked and twist this even further.

Right, back to the issue, asking “why” is not the answer ! aside I have sorted it now - found a workaround that works well - having looked at the source code :slight_smile:

EDIT:

What you are using now is Home Assistant Supervised and it’s not meant that you run your own docker stack, by doing this you are asking for trouble and make your life harder than it needs to be.

Nope, not difficult at all, no trouble, works just as I like it - I know nothing much of HA Supervised having only just come across it lately, but I’ve been using linux since RedHat “Halloween” 1994 , employed as a software dev albeit realtime avionics not open systems such as this, and create my own docker files. As always the answer can be found more often than not by looking at the source code - but there’s a heck of a lot of code in HA and I was looking for a quick answer hence OP - time is something I didnt have today/this week.

There are idiosyncrasies and then there’s plain old misuse, like “hassio docker” and this one you, quite rightfully, removed:

Screenshot from 2020-12-02 18-17-15

Given your stated experience, you can appreciate the effort to use correct terminology. It confuses newcomers when they encounter invented word-salad and that’s why Burningstone, myself, and others clarify the terms when they get too ‘creative’.

What is/was it?

If you know of errors in the documentation, the community would appreciate it if you could take a moment to correct them (any user can update the docs). If that’s a burden, please identify them so that others can fix them.

2 Likes

I have no experience in any of this @123 , I am merely a pleb who is struggling - as a newcomer - trying to get my head around the Concept, Requirements, Architecture, System Context, Design, Data Dictionary, Entity Relationship, Design, Code models and patters, classes, functions and modules. I refer to software design methods there. I am a SW dev but in realtime so a different career but still we do sometimes tinker in python, linux, sockets and APIs , or rather their equiv.

As I do, I come across so much that is confusing - not beyond comprehension - but just confusing and poorly documented for a n00b dev. It does not help when one posts simple questions about getting started with the IDE of choice and strategy of workflow - posted to dev forum - when no one replies.

So it would seem to me that it’s a case of not RTFM (there isn’t one!) but as we say FYYOYO which I cannot repeat here but think of it as F.Y - You’re On Your Own! This is a shame. If only people were willing to impart their experience more freely then it would help peops like me get upto speed and start contributing in a more expedient timeframe. Like many FOSS I guess - the “inner circle” are not getting paid so their time is better spent coding and fixing than answering questions to help others do the same.

So when I come across devs and coders with insight who want to help me, I’ll be happy to help them by updating docs - C’est la vie , Quid-pro-quo … blah blah

What previous names, well guys at work were discussing history of home automation ,and they were referring to very old code bases , can’t recall exactly but something like “Smarter Home” or “HomeSmart” can’t recall the exact name but one of them appeared to know quite a bit on the topic of paid-for and FOSS automation systems.

Please list them, just using a different host architecture isn’t a different install method.

This may well be the case, but this is the official Home Assistant Forum, not a forum for forks of Home Assistant, so you will get help for the official Home Assistant install methods, but not for some forks or other hacks/workarounds/twists whatever.

I know, I was just curious why you do this.

Totally believe you, but you are misusing the Supervised install in a way it is not inteded to be used, therefore you can’t expect support from devs or anyone. They can’t support all different architectures, that’s why it was decided to have these 4 install methods.

To be honest, most core devs are not that active in the forum, discord would be a better place to discuss it with the devs, it’s unfortunate, but it is like this.

Nope, the “inner circle” is employed by Nabu Casa and is paid for their work through the Nabu Casa cloud subscription.

That’s pretty selfish in my opinion, but to each his own. I helped 100’s of people here in the forum and also fixed a few “errors” in the documentation and the only “salary” I get from this is likes and appreciation, I and many others do this all for free without expecting anything in return. For me that’s part of the spirit of Open Source.

1 Like

I’ll ask one more time, please report the parts you believe to be poorly documented (which you originally described as errors/inconsistencies that are trivial to find) so that they may be corrected. It will help the community, especially new users.

This no longer sounds as certain as when you first reported “its roots in a completely different named software”. Whenever you have the time, please ask your colleague which codebase did Paulus Schoutsen use to create what is now known as Home Assistant.

If you don’t like the answer, don’t ask the question.

You supplied conjecture, not answers.

You are certainly free to continue stating your opinions about this project. However, without substantiating your complaints, it simply comes across as ranting.

Based on what I’ve seen here over the past two years, it’s an unproductive approach; it alienates the people who are best-suited to assist you.

Good luck.

1 Like

You seem to be the only one “alienated”
As much as I would like to indulge you in this tit-ta-tae , I have to concede to growing feelings of blahs and fatigue with unproductive exchanges. Thank you for your , er , contributions - and for keeping a cool head. Feel free to have the last word - One senses that it has a greater appeal and significance to you. I’m unsubscribing from this thread.