Best practice with Hass.io on Synology and custom dev

Hey,
I’ve installed a working Home Assistant (Hass.io) on a Synology. Thanks @fredrike !

I’am also working on a local Home Assistant Core installation, because I’m testing a Lutron integration which is requiring to modify also a dependency (pylutron.py).
Is there a way to updated the docker installation to my modified version when I’m ready, or it doesn’t make sense?
Thanks
R

This is not really related to Synology…

You have two options, either build it as a custom_component or (I guess this is what you are after) fire up a terminal (ssh into your NAS) and run this:

sudo docker cp SUPER_SPECIAL_FILE `sudo docker ps | awk '/qemux86-64-homeassistant/{print $1; exit}'`:/usr/local/lib/python3.7/site-packages/pylutron/

Where SUPER_SPECIAL_FILE is your modified file (perhaps __init__.py). The sudo docker ps magic is to figure out the id of the homeassistant container.

You need to run the cp command every time you upgrade the container.

OK, so the way to do it is to copy the files in the homeassistant container.
Would it make sense to replace the homeassistant container with one that I’m building from my own local repository, or this can be a problem for the Synology deployment?

I really don’t know. Try, but I can’t guarantee anything.

@fredrike I’m following your first suggestion and I’m trying to install the custom_component.
I need to install the custom requirement doing something like
pip install -e ./pylutron and the run hass --skip-pip.
I know how to do it in a “standard” environment, but I really don’t know how to do it in docker? Can you help me?

I’ve pointed the requirement to my github repo, so I think all I need now is to let the docker image start the process with the option --skip-pip. Is that possible?

I"m trying to do something similar, although with a different library and from what I can get from the developers docs, the “proper way” and I use that loosely, is to put the library into pypi and set the custom_component manifest to grab it from there.

Watching this as it would be nice to not involve pypi during the development cycle.

@kenm: your way makes sense! I’ve to learn how to publish to pypi then :wink:
Obviously to have the ability to use a brach with --skip-pip would be faster