From 7a4241063ac99a990f40cd5e3b9a2bdf10d803ba Mon Sep 17 00:00:00 2001 From: foosinn Date: Sat, 15 Jan 2022 02:25:47 +0100 Subject: [PATCH] lol --- .envrc | 1 + .gitignore | 5 +++ poempl.yaml | 91 +++++++++++++++++++++++++++++++++++++++++++++++++++++ shell.nix | 8 +++++ 4 files changed, 105 insertions(+) create mode 100644 .envrc create mode 100644 .gitignore create mode 100644 poempl.yaml create mode 100644 shell.nix diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..051d09d --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +eval "$(lorri direnv)" diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d8b4157 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +# 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 diff --git a/poempl.yaml b/poempl.yaml new file mode 100644 index 0000000..048437a --- /dev/null +++ b/poempl.yaml @@ -0,0 +1,91 @@ +esphome: + name: poempl + platform: ESP8266 + board: nodemcuv2 + +# Enable logging +logger: + +ota: + password: "VkkVfr9C0C6lGxmc" + +wifi: + ssid: "backspace IoT" + password: "InternetOfShit!" + + # Enable fallback hotspot (captive portal) in case wifi connection fails + ap: + ssid: "Poempl Fallback Hotspot" + password: "FP6GohMzor5x" + +captive_portal: + +i2c: + sda: D2 + scl: D1 + scan: true + id: bus_a + +mqtt: + broker: mqtt.core.bckspc.de + discovery: false + +light: + - platform: fastled_clockless + chipset: WS2812B + id: bar + pin: D4 + num_leds: 9 + rgb_order: GRB + name: Bar + effects: + - strobe + - platform: partition + name: bar00 + segments: + - id: bar + from: 0 + to: 0 + effects: + - strobe + - platform: partition + name: bar01 + segments: + - id: bar + from: 1 + to: 1 + effects: + - strobe + +sensor: + - platform: bme280 + temperature: + name: "BME280 Temperature" + id: bme280_temperature + pressure: + name: "BME280 Pressure" + id: bme280_pressure + on_value_range: + - below: 1000 + then: + - light.turn_on: + id: bar + red: 20% + green: 0 + blue: 0 + brightness: 20% + - above: 1000 + then: + - light.turn_on: + id: bar + red: 0 + green: 20% + blue: 0 + brightness: 20% + + + humidity: + name: "BME280 Relative Humidity" + id: bme280_humidity + address: 0x76 + update_interval: 0.5s diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..53acf04 --- /dev/null +++ b/shell.nix @@ -0,0 +1,8 @@ +{ pkgs ? import {} }: + +pkgs.mkShell { + buildInputs = [ + pkgs.bashInteractive + pkgs.esphome + ]; +}