Skip to content

Commit

Permalink
Merge pull request #13 from ikifar2012/dev
Browse files Browse the repository at this point in the history
2022.2.0
  • Loading branch information
ikifar2012 authored Feb 22, 2022
2 parents 6124e0b + 73cdc55 commit 5c51530
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
uses: home-assistant/builder@master
with:
args: |
--all \
--amd64 \
--target tdm \
--docker-user ${{ secrets.DOCKERHUB_USERNAME }} \
--docker-password ${{ secrets.DOCKERHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ jobs:
with:
args: |
--test \
--all \
--amd64 \
--target tdm \
--docker-hub ikifar
7 changes: 7 additions & 0 deletions tdm/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# 2022.2.0

- Added MQTT auto configuration
- Added `i3status`
- Switch to `${HOME}` variable
- Solves issue VNC config window always showing #12

# 2021.12.0

- Switch to i3 window manager
Expand Down
4 changes: 2 additions & 2 deletions tdm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ FROM $BUILD_FROM
SHELL ["/bin/bash", "-o", "pipefail", "-c"]

# Install dependencies
ARG BUILD_ARCH
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
curl \
Expand All @@ -29,12 +28,13 @@ RUN apt-get update \
tigervnc-standalone-server \
wget \
i3 \
i3status \
xfonts-base \
xfonts-scalable \
firefox-esr

RUN apt-get install libqt5x11extras5 python3 python3-pip git -y --no-install-recommends
RUN apt-get install libqt5gui5 zlib1g-dev gcc g++ make -y && rm -rf /var/lib/apt/lists/*
RUN apt-get install libqt5gui5 zlib1g-dev gcc g++ make -y && rm -rf /var/lib/apt/lists/*
RUN python3 -m pip install --upgrade pip
RUN python3 -m pip install wheel
RUN python3 -m pip install pyqt5==5.14.2
Expand Down
7 changes: 4 additions & 3 deletions tdm/config.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
name: Tasmota Device Manager
version: '2021.12.0'
version: '2022.2.0'
slug: tdm
description: GUI application to discover and monitor devices flashed with Tasmota
arch:
- amd64
url: https:/ikifar2012/tasmota-device-manager-addon
startup: services
startup: application
boot: auto
services:
- mqtt:want
init: false
ingress: true
panel_icon: mdi:application-cog
Expand All @@ -18,7 +20,6 @@ ports:
5900/tcp:
ports_description:
5900/tcp: TDM via VNC (Not required for Ingress. Not secure!)
host_network: true
options:
debug: false
schema:
Expand Down
25 changes: 23 additions & 2 deletions tdm/rootfs/etc/services.d/tdm/run
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,31 @@
TMP_FOLDER=$(mktemp -d)
VNC_PORT="$(bashio::addon.port 5900)"
ARCH="$(bashio::info.arch)"
mkdir -p /share/tdm
DEBUG=$(bashio::config "debug")
export HOME='/share/tdm'
mkdir -p ${HOME}/.vnc
(
echo "vncconfig --nowin &"
echo "exec i3"
) > ${HOME}/.vnc/xstartup
chmod 755 ${HOME}/.vnc/xstartup
# ln -s /usr/lib/x86_64-linux-gnu/libxcb-util.so.0.0.0 /usr/lib/x86_64-linux-gnu/libxcb-util.so.1
export HOME=/share/tdm

# Get MQTT config
if bashio::services.available "mqtt"; then
MQTT_HOST=$(bashio::services "mqtt" "host")
MQTT_PASSWORD=$(bashio::services "mqtt" "password")
MQTT_PORT=$(bashio::services "mqtt" "port")
MQTT_USER=$(bashio::services "mqtt" "username")
(
echo "[General]"
echo "connect_on_startup=true"
echo "hostname=${MQTT_HOST}"
echo "password=${MQTT_PASSWORD}"
echo "port=${MQTT_PORT}"
echo "username=${MQTT_USER}"
) > ${HOME}/TDM/tdm.cfg
fi
# Run it only on localhost if not expose
if bashio::var.has_value "${VNC_PORT}"; then
bashio::log.warning "Your direct VNC access is not protected!"
Expand Down

0 comments on commit 5c51530

Please sign in to comment.