Skip to content

Commit 80023f1

Browse files
committed
2023-05-16 Home Assistant adaptation to expected kernel change - master branch - PR 1 of 2
Background: - SensorsIot#690 – Kernel update may remove /dev/ttyAMA0 - [Home Assistant documentation](https://www.home-assistant.io/installation/raspberrypi#docker-compose) Changes: 1. Removes Bluetooth-specific volumes and devices from template. 2. Removes Pi-hardware-specific image options (still available but no longer mentioned in the Home Assistant documentation; and not relevant where IOTstack may be deployed on non-Pi hardware). 3. Adds documentation to Home Assistant wiki page (master branch) to explain how to re-add volumes and devices if Bluetooth support is required on a Raspberry Pi: - This means Home Assistant will launch successfully on non-Pi hardware. - Documentation references `/dev/serial1` rather than `/dev/ttyAMA0` as the external device but maintains the latter as the internal device. 3. Removes documentation from the Home Assistant wiki page (master branch) where Pi-hardware-specific image options were discussed. Signed-off-by: Phill Kelley <34226495+Paraphraser@users.noreply.github.com>
1 parent 96f4297 commit 80023f1

File tree

2 files changed

+24
-17
lines changed

2 files changed

+24
-17
lines changed

.templates/home_assistant/service.yml

-7
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,9 @@
11
home_assistant:
22
container_name: home_assistant
33
image: ghcr.io/home-assistant/home-assistant:stable
4-
#image: ghcr.io/home-assistant/raspberrypi3-homeassistant:stable
5-
#image: ghcr.io/home-assistant/raspberrypi4-homeassistant:stable
64
restart: unless-stopped
75
network_mode: host
86
volumes:
97
- /etc/localtime:/etc/localtime:ro
108
- ./volumes/home_assistant:/config
11-
- /var/run/dbus/system_bus_socket:/var/run/dbus/system_bus_socket
12-
devices:
13-
- "/dev/ttyAMA0:/dev/ttyAMA0"
14-
- "/dev/vcio:/dev/vcio"
15-
- "/dev/gpiomem:/dev/gpiomem"
169
privileged: true

docs/Containers/Home-Assistant.md

+24-10
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,6 @@ Home Assistant (Container) can be found in the `Build Stack` menu. Selecting it
4444
~/IOTstack/docker-compose.yml
4545
```
4646

47-
When you choose "Home Assistant", the service definition added to your `docker-compose.yml` includes the following:
48-
49-
```yaml
50-
image: ghcr.io/home-assistant/home-assistant:stable
51-
#image: ghcr.io/home-assistant/raspberrypi3-homeassistant:stable
52-
#image: ghcr.io/home-assistant/raspberrypi4-homeassistant:stable
53-
```
54-
55-
The active image is *generic* in the sense that it should work on any platform. You may wish to edit your `docker-compose.yml` to deactivate the generic image in favour of an image tailored to your hardware.
56-
5747
The normal IOTstack commands apply to Home Assistant Container such as:
5848

5949
```console
@@ -98,6 +88,30 @@ If `AutoEnable` is either missing or not set to `true`, then:
9888

9989
See also: [Scribles: Auto Power On Bluetooth Adapter on Boot-up](https://scribles.net/auto-power-on-bluetooth-adapter-on-boot-up/).
10090

91+
### Possible service definition changes { #serviceDefinition }
92+
93+
Although the [Home Assistant documentation](https://www.home-assistant.io/installation/raspberrypi#docker-compose) does not mention this, it is *possible* that you may also need to make the following changes to the Home Assistant service definition in your `docker-compose.yml`:
94+
95+
* Add the following mapping to the `volumes:` clause:
96+
97+
```yaml
98+
- /var/run/dbus/system_bus_socket:/var/run/dbus/system_bus_socket
99+
```
100+
101+
* Add the following `devices:` clause:
102+
103+
```yaml
104+
devices:
105+
- "/dev/serial1:/dev/ttyAMA0"
106+
- "/dev/vcio:/dev/vcio"
107+
- "/dev/gpiomem:/dev/gpiomem"
108+
```
109+
110+
Notes:
111+
112+
* These changes are *specific* to the Raspberry Pi. If you need Bluetooth support on non-Pi hardware, you will need to figure out the details for your chosen platform.
113+
* Historically, `/dev/ttyAMA0` meant "the serial interface" on Raspberry Pis. Subsequently, it came to mean "the Bluetooth interface" where Bluetooth support was present. Now, `/dev/serial1` is used to mean "the Raspberry Pi's Bluetooth interface". The example above maps that to the internal device `/dev/ttyAMA0` because that is **probably** what the container expects. There are no guarantees and you may need to experiment with internal device names.
114+
101115
## HTTPS with a valid SSL certificate { #httpsWithSSLcert }
102116

103117
Some HA integrations (e.g google assistant) require your HA API to be

0 commit comments

Comments
 (0)