# FAN LED Control ## Board ESP8266 D1 Used Pins: ## Software Interface: USB-UART ## Source Inspired by the following Project: https://github.com/stefanthoss/esp8266-fan-control ## MQTT Control ### Linux based Controller * Docker * Python3 * paho ### Installation Open Terminal in **mqttclient**. Docker must be installed ```docker build .``` #### Execution Set the following parameter: * USB Device * MQTT * Server Name / IP Address * Base Topic ```docker run -t -i --device=/dev/ttyUSB0 -e SERIAL_DEVICE="/dev/ttyUSB0" -e MQTT_SERVER="192.168.x.y" -e MQTT_TOPIC="testtopic/" sha256:``` Additional logging can be activated with the variable **PY_LOGGING** possible values are: * DEBUG * INFO * WARNING * ERROR * CRITICAL #### Execution via Docker Compose ``` # template docker-compose.yml services: python_app: attach: false build: context: . dockerfile: Dockerfile environment: - SERIAL_DEVICE=/dev/ttyUSB0 - MQTT_SERVER=192.168.x.y - MQTT_TOPIC=testtopic/ devices: - "/dev/ttyUSB0:/dev/ttyUSB0" ``` build image: **docker-compose up --build** start with **docker-compose up --detach**