Temperature based FAN Control Optional LED Control
Go to file
2024-12-22 20:31:59 +01:00
.vscode Add VSCode extensions 2024-11-28 21:34:50 +01:00
include All commands are working 2024-12-07 12:08:08 +01:00
lib Initial Commit 2024-11-28 21:28:37 +01:00
mqttclient Integrated Logging to /var/log/app.log 2024-12-22 20:31:59 +01:00
src Controller to MQTT pipeline is working 2024-12-07 15:26:22 +01:00
test Initial Commit 2024-11-28 21:28:37 +01:00
.gitignore Initial Commit 2024-11-28 21:28:37 +01:00
platformio.ini Moved to other pin 2024-12-04 21:38:41 +01:00
ReadMe.md Describe docker compose example 2024-12-17 20:58:17 +01:00

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:

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