Skip to content

Commit 92face8

Browse files
authored
Merge pull request #1 from SensorsIot/master
Merge
2 parents c4b1360 + 00f2dd9 commit 92face8

File tree

16 files changed

+42
-43
lines changed

16 files changed

+42
-43
lines changed

.templates/domoticz/service.yml

-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ domoticz:
77
- "1443:1443"
88
volumes:
99
- ./volumes/domoticz/data:/config
10-
env_file:
11-
- ./services/domoticz/domoticz.env
1210
restart: unless-stopped
1311
network_mode: bridge
1412
environment:

.templates/grafana/build.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def main():
3131
except:
3232
hideHelpText = False
3333

34-
documentationHint = 'https://sensorsiot.github.io/IOTstack/Containers/Adminer'
34+
documentationHint = 'https://sensorsiot.github.io/IOTstack/Containers/Grafana'
3535

3636
# This lets the menu know whether to put " >> Options " or not
3737
# This function is REQUIRED.

.templates/heimdall/heimdall.env

-3
This file was deleted.

.templates/heimdall/service.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
heimdall:
22
image: ghcr.io/linuxserver/heimdall
33
container_name: heimdall
4-
env_file:
5-
- ./services/heimdall/heimdall.env
4+
environment:
5+
- PUID=1000
6+
- PGID=1000
7+
- TZ=Europe/Paris
68
volumes:
79
- ./volumes/heimdall/config:/config
810
ports:

.templates/homer/homer.env

-2
This file was deleted.

.templates/homer/service.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
homer:
22
image: b4bz/homer:latest
33
container_name: homer
4-
env_file:
5-
- ./services/homer/homer.env
4+
environment:
5+
- UID=1000
6+
- GID=1000
67
volumes:
78
- ./volumes/homer/assets:/www/assets
89
ports:

.templates/influxdb/service.yml

-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ influxdb:
44
restart: unless-stopped
55
ports:
66
- "8086:8086"
7-
- "8083:8083"
8-
- "2003:2003"
97
environment:
108
- INFLUXDB_HTTP_FLUX_ENABLED=false
119
- INFLUXDB_REPORTING_DISABLED=false

.templates/mosquitto/mosquitto.conf

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
1+
# required by https://mosquitto.org/documentation/migrating-to-2-0/
2+
listener 1883
3+
14
persistence true
25
persistence_location /mosquitto/data/
36
#log_dest file /mosquitto/log/mosquitto.log
47
# To avoid flash wearing
58
log_dest stdout
69

7-
#Uncomment to enable passwords
10+
# To enable passwords:
11+
# 1. Uncomment "password_file"; and
12+
# 2. Change "allow_anonymous" to "false"
813
#password_file /mosquitto/pwfile/pwfile
9-
#allow_anonymous false
14+
allow_anonymous true
1015

1116
#Uncomment to enable filters
1217
#acl_file /mosquitto/config/filter.acl

.templates/nextcloud/service.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ nextcloud_db:
2323
image: linuxserver/mariadb
2424
container_name: nextcloud_db
2525
volumes:
26-
- ./volumes/nextcloud/db:/var/lib/mysql
26+
- ./volumes/nextcloud/db:/config
2727
environment:
2828
- MYSQL_ROOT_PASSWORD=%randomPassword%
2929
- MYSQL_PASSWORD=%randomMySqlPassword%

.templates/rtl_433/Dockerfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ ENV MQTT_PORT 1883
55
ENV MQTT_USER ""
66
ENV MQTT_PASSWORD ""
77
ENV MQTT_TOPIC RTL_433
8+
ENV RTL_PARAMS "-C si"
89

910
RUN apt-get update && apt-get install -y git libtool libusb-1.0.0-dev librtlsdr-dev rtl-sdr cmake automake && \
1011
git clone https://github.com/merbanan/rtl_433.git /tmp/rtl_433 && \
@@ -15,4 +16,4 @@ RUN apt-get update && apt-get install -y git libtool libusb-1.0.0-dev librtlsdr
1516
make && \
1617
make install
1718

18-
CMD ["sh", "-c", "rtl_433 -F mqtt://${MQTT_ADDRESS}:${MQTT_PORT},events=${MQTT_TOPIC},user=${MQTT_USER},pass=${MQTT_PASSWORD}"]
19+
CMD ["sh", "-c", "rtl_433 ${RTL_PARAMS} -F mqtt://${MQTT_ADDRESS}:${MQTT_PORT},events=${MQTT_TOPIC},user=${MQTT_USER},pass=${MQTT_PASSWORD}"]

.templates/rtl_433/service.yml

+2
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,6 @@ rtl_433:
1010
- MQTT_TOPIC=RTL_433
1111
devices:
1212
- /dev/bus/usb
13+
networks:
14+
- iotstack_nw
1315
restart: unless-stopped

.templates/wireguard/build.sh

+6-4
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ WG_CONF_DEST_PATH=./services/wireguard/config
55

66
if [[ ! -f $WG_CONF_TEMPLATE_PATH ]]; then
77
echo "[Wireguard] Warning: $WG_CONF_TEMPLATE_PATH does not exist."
8-
else
9-
[ -d $WG_CONF_DEST_PATH ] || mkdir -p $WG_CONF_DEST_PATH
10-
cp -r $WG_CONF_TEMPLATE_PATH $WG_CONF_DEST_PATH
11-
fi
8+
else
9+
if [[ ! -d $WG_CONF_DEST_PATH ]]; then
10+
mkdir -p $WG_CONF_DEST_PATH
11+
cp -r $WG_CONF_TEMPLATE_PATH $WG_CONF_DEST_PATH
12+
fi;
13+
fi

.templates/zigbee2mqtt/service.yml

+1
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@ zigbee2mqtt:
55
- ./volumes/zigbee2mqtt/data:/app/data
66
devices:
77
- /dev/ttyAMA0:/dev/ttyACM0
8+
#- /dev/ttyUSB0:/dev/ttyACM0 # Electrolama zig-a-zig-ah! (zzh!) maybe other as well
89
restart: unless-stopped
910
network_mode: host

docs/Containers/Zigbee2MQTT.md

+6-13
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,27 @@
1-
# Zigbe2MQTT
1+
# Zigbee2MQTT
22
* [Web Guide](https://www.zigbee2mqtt.io/information/docker.html)
33

44
## First startup
55

66
After starting the stack check to see if there is an error due to missing device. This is because the devices are mapped differently on the Pi. If your device is not showing in the container then you can also follow the followings steps.
77

8-
If you get a startup failure open the docker-compose.yml file and under zigbee2mqtt change this:
8+
If you get a startup failure open the docker-compose.yml file and under zigbee2mqtt change device to map to container (uncomment one of alternatives):
99

1010
```yml
1111
devices:
1212
- /dev/ttyAMA0:/dev/ttyACM0
1313
#- /dev/ttyACM0:/dev/ttyACM0
14-
```
15-
16-
to
17-
18-
```yml
19-
devices:
20-
#- /dev/ttyAMA0:/dev/ttyACM0
21-
- /dev/ttyACM0:/dev/ttyACM0
14+
#- /dev/ttyUSB0:/dev/ttyACM0 # Electrolama zig-a-zig-ah! (zzh!) maybe other as well
2215
```
2316

2417
and run docker-compose up -d again
2518

26-
If the container starts then run `docker logs zigbe2mqtt` so see the log output and if your device is recognised. You may need to reset the device for docker to see it.
19+
If the container starts then run `docker logs zigbee2mqtt` so see the log output and if your device is recognised. You may need to reset the device for docker to see it.
2720

2821
To edit the configuration file `sudo nano volumes/zigbee2mqtt/data/configuration.yaml` you many need to restart the container for changes to take affect `docker-compose restart zigbee2mqtt`
2922

30-
Unfortunately I don't own a zigbee device and cannot offer support on the setup you will need to follow the website instructions for further instructions https://www.zigbee2mqtt.io/
23+
Please follow instructions on https://www.zigbee2mqtt.io/
3124

3225
## terminal access
3326

34-
to access the terminal run `docker exec -it zigbee2mqtt /bin/sh` or select `/bin/sh
27+
To access the terminal run `docker exec -it zigbee2mqtt /bin/sh`

scripts/menu_main.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#!/usr/bin/env python3
2-
1+
#!/usr/bin/python3
32
from blessed import Terminal
43
import sys
54
import subprocess
@@ -299,6 +298,7 @@ def checkDockerVersion():
299298
currentDockerVersion = currentDockerVersion.decode("utf-8").rstrip().replace('"', '')
300299
except Exception as err:
301300
print("Error attempting to run docker command:", err)
301+
currentDockerVersion = ""
302302

303303
return checkVersion(requiredDockerVersion, currentDockerVersion)
304304

scripts/python_deps_check.py

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,35 @@
1+
#!/usr/bin/python3
12
import sys
2-
import yaml
3-
import blessed
4-
import ruamel.yaml
53

64
if sys.argv[1] == "--pyyaml-version":
75
try:
6+
import yaml
87
print("pyyaml", yaml.__version__)
98
sys.exit(0)
109
except SystemExit:
1110
sys.exit(0)
12-
except:
11+
except Exception:
1312
print("could not get pyyaml version")
1413
sys.exit(3)
1514

1615
if sys.argv[1] == "--pyaml-version":
1716
try:
17+
import ruamel.yaml
1818
print("ruamel.yaml", ruamel.yaml.__version__)
1919
sys.exit(0)
2020
except SystemExit:
2121
sys.exit(0)
22-
except:
22+
except Exception:
2323
print("could not get ruamel.yaml version")
2424
sys.exit(3)
2525

2626
if sys.argv[1] == "--blessed-version":
2727
try:
28+
import blessed
2829
print("blessed", blessed.__version__)
2930
sys.exit(0)
3031
except SystemExit:
3132
sys.exit(0)
32-
except:
33+
except Exception:
3334
print("could not get blessed version")
3435
sys.exit(3)

0 commit comments

Comments
 (0)