These instructions are for development of the Supervisor, the Supervisor frontend panel and the
hassio integration, by interacting with a development or remote supervisor, this assumes that you are using a development machine to do the development, these instructions will also use devcontainer and other tools that rely on Docker, so if you don't have that setup yet, do that before you continue.
The instructions here is for development of the Supervisor itself.
- Fork the Supervisor repo (https://github.com/home-assistant/supervisor) and clone it to your development machine.
- Open the repo with Visual Studio Code devcontainer.
- Create a branch in your fork.
- Do your changes.
- Test your changes with the instructions below.
- Commit and push your changes, and create a PR against the
mainbranch at https://github.com/home-assistant/supervisor
Start the task "Run Supervisor" in Visual Studio Code, this will start a instance of the Supervisor inside the devcontainer you can use to test your changes.
When the initializing is complete you can access the Home Assistant frontend on
If you need to rebuild the base of the Supervisor run the task "Build Supervisor" and then restart the "Run Supervisor" task again when that completes.
For this you first need to create an account at Docker Hub.
- Access the remote system with SSH or with direct console access.
- Check the architecture on the machine with
ha infoor just
infoif it's Home Assistant OS.
- On your development machine use our builder to build and publish your Supervisor image.
All examples will have values you need to adjust.
aarch64with the architecture you found in step 2.
awesome-userto match your Docker Hub username.
secret-passwordto match your Docker Hub password or publish token.
- On your remote system change the channel to
ha supervisor --channel devor just
supervisor --channel devif it's Home Assistant OS.
- Pull down your Supervisor image with
docker pull awesome-user/aarch64-hassio-supervisor:latest
- Tag your Supervisor image as
- Restart the
systemctl restart hassos-supervisor
- Check for issues with
journalctl -fu hassos-supervisor
The instructions here is for development of the
hassio integration, we're going to assume that you have a Home Assistant Core development environment set up, and that you have Supervisor API Access set up.
To configure Home Assistant Core to connect to a remote supervisor, set the following environment variables when starting Home Assistant:
HASSIO: Set to the IP of the machine running Home Assistant and port 80 (the API proxy add-on)
HASSIO_TOKEN: Set this to the token that you found Supervisor API Access
Your local Home Assistant installation will now connect to a remote Home Assistant instance.
The instructions here is for development of the Supervisor panel, we're going to assume that you have a Home Assistant frontend development environment set up with the devcontainer, and that you have Supervisor API Access set up.
- Run the "Develop Supervisor panel" task
- Run the task "Run HA Core for Supervisor in devcontainer"
- When asked for the IP, use the IP of the host that is running Supervisor API Access
- When asked for the token, use the token you found Supervisor API Access
hassio integration configuration in your
configuration.yaml file to point at the frontend repository:
To build a local version of the Supervisor panel, go to the frontend repository and run:
script/develop is running, the Supervisor panel will be rebuilt whenever you make changes to the source files.
To develop for the
hassio integration and the Supervisor panel, we're going to need API access to the supervisor. This API is protected by a token that we can extract using a special add-on. This can be done on a running system or with the devcontainer.
- Add our developer Add-on repository: https://github.com/home-assistant/hassio-addons-development
- Install the Add-on "Remote API proxy"
- Click Start
- The token will be printed in the logs
The add-on needs to keep running to allow Home Assistant Core to connect.
The Remote API proxy token has slightly less privileges than Home Assistant Core has in production. To get the actual token with full privileges, you need to SSH into the host system and run:
Note that either token can change after a reboot or update of OS/container.