I’ve been trying to make a Wire-Pod add-on for HA, I’ve got it running but I am not that familiar with HA add-ons / Docker.
I need to try and work out how to properly use the persistent storage within the Docker environment so that when HA is rebooted, the stored settings are not lost.
I think it might be the case that a bash script is written to copy over and copy back the relevant data files for Wire-Pod, before the chipper
script is started.
For anyone that wants to give it a go, familiarise yourself with HA local add-on, how to FTP in to HA or create files within the addons
folder.
Create a folder called wire-pod
inside the addons directory
Create a Dockerfile
inside /addons/wire-pod/
, with the following:
ARG BUILD_FROM=ubuntu:jammy
# hadolint ignore=DL3006
FROM ${BUILD_FROM}
# Edit your timezone here:
ENV TZ=Europe/London
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# Install software
RUN apt-get update \
&& apt-get install -y \
sudo \
nano \
git
# Setup Sudoers
RUN adduser --disabled-password --gecos '' wirepod
RUN adduser wirepod sudo
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
# Switch to created wirepod user
USER wirepod
# Create /wire-pod directory
RUN sudo mkdir /wire-pod
RUN sudo chown -R wirepod:wirepod /wire-pod
RUN cd /wire-pod
# Download wire-pod
RUN git clone https://github.com/kercre123/wire-pod/ wire-pod
# Build wire-pod
WORKDIR /wire-pod
RUN chmod a+x ./setup.sh
RUN chmod a+x ./chipper/start.sh
RUN sudo STT=vosk ./setup.sh
# Start chipper
WORKDIR /wire-pod/chipper
CMD sudo /wire-pod/chipper/start.sh
Create a config.yaml
inside /addons/wire-pod/
, with the following:
---
name: Wire-Pod
version: 1.0
slug: wire-pod
description: Docker Ubuntu base for WirePod
url: https://github.com/hassio-addons/addon-ubuntu-base
webui: http://[HOST]:[PORT:8080]
arch:
- aarch64
- amd64
- armv7
homeassistant_api: true
uart: true
ports:
443/tcp: 443
80/tcp: 80
8080/tcp: 8080
Create a build.yaml
inside /addons/wire-pod/
, with the following:
---
build_from:
aarch64: arm64v8/ubuntu:jammy
amd64: amd64/ubuntu:jammy
armv7: arm32v7/ubuntu:jammy
Give it a few minutes and then install within the ‘Add-on Store’ under local add-on