diff --git a/Charts/index_2.html b/Charts/index_2.html new file mode 100644 index 0000000..687204e --- /dev/null +++ b/Charts/index_2.html @@ -0,0 +1,181 @@ + + + + + + Geräte-Diagramme + + + + +

Geräte-Diagramme

+
+ + + +
+
+ + + + diff --git a/README.md b/README.md index 3215cef..602cfbf 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,13 @@ + +* [ATC_MiThermometer_Gateway](#atc_mithermometer_gateway) + * [Getting started](#getting-started) + * [Run Gateway](#run-gateway) + * [Shell Scripts](#shell-scripts) + * [Docker](#docker) + * [MicroPython for MicroController](#micropython-for-microcontroller) +* [Resources](#resources) + + # ATC_MiThermometer_Gateway Python gateway for the [custom firmware](https://github.com/atc1441/ATC_MiThermometer) for the [Xiaomi Thermometer LYWSD03MMC](https://www.mi.com/de/product/mi-temperature-and-humidity-monitor-2/). @@ -49,18 +59,43 @@ cd python/src sudo python3 main.py ``` -### Docker +## Shell Scripts -Build docker container (Currently broken) +**build_docker.sh** + +| Arg | Meaning | Default | +|---------------|----------------------------|---------------------------------------| +| -t \| --tag | Set a tag for build | develop | +| -i \| --image | Set a image name for build | dasmoorhuhn/atc-mithermometer-gateway | +| -h \| --help | Get this help in the CLI | | + +**run_docker.sh** + +| Arg | Meaning | Default | +|-------------------|----------------------------------------------|---------------| +| -d | Run in Backgrund | | +| -t \| --tag | Set a docker tag | develop | +| -b \| --build | Build the image before running the container | | +| -l \| --loop | Start the gateway in looping mode | | +| -a \| --api | Start with the API | false | +| -tz \| --timezone | Set the timezone | Europe/Berlin | +| -to \| --timeout | Set the timeout for the bluetooth scan | 20 | +| -h \| --help | Get this dialog in CLI | | + +## Docker + +Build docker container () ```bash -docker-compose build +sh build_docker.sh +# Or +sh build_docker.sh -i your-image-name -t your-tag ``` Run docker container. Killing the hosts bluetooth service is needed to access it from the docker container. ```bash sudo sh run_docker.sh ``` -### MicroPython for MicroController +## MicroPython for MicroController Coming when I develop it... diff --git a/build_docker.sh b/build_docker.sh index f06bd74..4e88e28 100644 --- a/build_docker.sh +++ b/build_docker.sh @@ -1,27 +1,26 @@ -ARCH=linux/arm/v6 -#ARCH=linux/amd64 TAG=develop +IMAGE=dasmoorhuhn/atc-mithermometer-gateway HELP="USAGE: sh build_docker.sh \n -[ -a | --architecture ] Select a architecture. Default is auto\n -[ -t | --tag ] Set a docker tag. Default is develop \n +[ -t | --tag ] Select a tag for building. Default is develop \n +[ -i | --image ] Select image tag for building. Default is dasmoorhuhn/atc-mithermometer-gateway \n [ -h | --help ] Get this dialog" docker_build(){ - docker build --build-arg TARGETPLATFORM=$ARCH --platform $ARCH --tag dasmoorhuhn/atc-mithermometer-gateway:$TAG . + docker build --tag $IMAGE:$TAG . } while [ "$1" != "" ]; do case $1 in - -a | --architecture ) - shift - ARCH=$1 - shift - ;; -t | --tag ) shift TAG=$1 shift ;; + -i | --image ) + shift + IMAGE=$1 + shift + ;; -h | --help ) echo $HELP exit