FanLedCtrl/ReadMe.md

60 lines
1.0 KiB
Markdown
Raw Normal View History

2024-11-28 21:28:37 +01:00
# FAN LED Control
## Board
ESP8266 D1
Used Pins:
## Software
2024-11-28 21:31:04 +01:00
Interface: USB-UART
## Source
Inspired by the following Project:
2024-12-07 14:25:04 +01:00
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
2024-12-07 14:36:47 +01:00
```docker run -t -i --device=/dev/ttyUSB0 -e SERIAL_DEVICE="/dev/ttyUSB0" -e MQTT_SERVER="192.168.x.y" -e MQTT_TOPIC="testtopic/" sha256:```
2024-12-17 20:58:17 +01:00
#### 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**