From 40954e5637b7d2b4cc16d5dd97320a6b23603c59 Mon Sep 17 00:00:00 2001 From: subDesTagesMitExtraKaese Date: Mon, 15 Jul 2024 00:52:34 +0200 Subject: [PATCH] init --- .gitignore | 7 +++++ README.md | 35 ++++++++++++++++++++++++ config.yaml | 78 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 120 insertions(+) create mode 100644 .gitignore create mode 100644 README.md create mode 100644 config.yaml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..fbff169 --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +# Gitignore settings for ESPHome +# This is an example and may include too much for your use-case. +# You can modify this file to suit your needs. +/.esphome/ +/secrets.yaml + +/venv/ \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..31cef24 --- /dev/null +++ b/README.md @@ -0,0 +1,35 @@ +# IR Blaster + +http://ir-blaster.n39.eu + +## Installation und Flashen + +1. venv erstellen + ```bash + python -m venv venv + source ./venv/bin/activate + ``` +2. esphome installieren + ```bash + pip installv esphome + ``` +3. config hochladen + ```bash + esphome run config.yaml + ``` + +## Codes bearbeiten + +1. Debug-Konsole öffnen (http://ir-blaster.n39.eu oder USB Serial) + +2. Taste auf Fernbedienung drücken + +3. Codes mit IR Actions aus https://esphome.io/components/remote_transmitter.html in `config.yaml` definieren + +4. Esphome flashen + +### Steuerung Monitor + * OK (0x2FD847B) + * Lauter (0x2FD58A7) + * Leiser (0x2FD7887) + * On/Off (0x2FD48B7) \ No newline at end of file diff --git a/config.yaml b/config.yaml new file mode 100644 index 0000000..b3a742c --- /dev/null +++ b/config.yaml @@ -0,0 +1,78 @@ +esphome: + name: ir-blaster + platform: ESP8266 + board: d1_mini + +wifi: + networks: + - ssid: "NETZ39" + password: !secret WifiPassword + +# Enable logging +logger: + level: INFO + +# Enable Web server +web_server: + port: 80 + +# Enable Home Assistant API +#api: +# reboot_timeout: 0s +# encryption: +# key: "" + +mqtt: + broker: mqtt.n39.eu + port: 1883 + +ota: + - platform: esphome + password: !secret OtaPassword + +time: + - platform: sntp + id: sntp_time + servers: + - ptbtime1.ptb.de + - ptbtime2.ptb.de + - ptbtime3.ptb.de + +button: + - platform: template + name: Casio Power Button + on_press: + - remote_transmitter.transmit_nec: + address: 0xF484 + command: 0xF40B + command_repeats: 3 + - platform: template + name: "Monitor An/Aus" + on_press: + - remote_transmitter.transmit_lg: + data: 0x02FD48B7 # power on/off + nbits: 32 + - platform: template + name: "Ventilator An/Aus" + on_press: + - remote_transmitter.transmit_pronto: + data: "0000 006D 0018 0000 002E 0013 002E 0013 000E 0034 002D 0013 002E 0013 000E 0034 000D 0034 000D 0034 000D 0034 000D 0034 000D 0034 002E 0117 002E 0013 002E 0013 000E 0034 002E 0013 002E 0013 000E 0034 000D 0034 000D 0034 000D 0034 000D 0034 000D 0034 002E 0181 06C3" + +remote_receiver: + pin: + number: GPIO2 + inverted: True + dump: all + +remote_transmitter: + pin: GPIO04 + # Infrared remotes use a 50% carrier signal + carrier_duty_percent: 50% + +sensor: +# Extra sensor to keep track of plug uptime + - platform: uptime + name: Uptime Sensor + - platform: wifi_signal + name: "WiFi Signal Sensor" + update_interval: 60s \ No newline at end of file