# Docker-HomeAssistant

For this example we are going to replicate the previous demo but this time using dockers.

For more documentation:

<https://www.home-assistant.io/docs/installation/docker/>

Prerequisites:

1. Docker installed ([How to](https://reyes-fred.gitbooks.io/docker/content/dependecies.html))

Demo

1. First we need to open a terminal
2. Then create a folder where you want to storage the application for example.

```
$ ls
$ mkdir xdkhome
$ cd xdkhome
```

Then we need to execute:

```
$ docker run -d \
--name="hass" \
--restart on-failure \
-v /Users/reyes/xdkhome/hass_config:/config \
-e "TZ=America/Chicago"
-p 8123:8123 \
homeassistant/home-assistant
```

Then lets verify that the folder of configuration was create:

```
$ cd hass_config/
```

Lets copy now our configuration.yaml and replace for the yaml of the folder.

```
$ cp XDK110-Bosch/XDKLive/MQTT/HomeAssistant/Server/configuration.yaml ~/reyes/xdkhome/hass_config/
```

Finally open a browser and open 127.0.0.1:8123 and restart home assistant to see the new interface

## Auto-Execute

```
$ cd XDKLive/MQTT/DockerHome
$ sh run.sh
```

Lets copy now our configuration.yaml and replace for the yaml of the folder.

```
$ cp XDK110-Bosch/XDKLive/MQTT/HomeAssistant/Server/configuration.yaml ~/reyes/xdkhome/hass_config/
```

Finally open a browser and open 127.0.0.1:8123 and restart home assistant to see the new interface


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://alfredo-reyes-montero.gitbook.io/iot-bosch/devices/bosch-xdk-110/applications/language-xdk-live/mqtt/docker-homeassistant.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
