Compare commits

..

2 commits

Author SHA1 Message Date
010f5f1646 Moved logos into sep. folder. 2020-11-08 13:32:00 +01:00
fa283bcd09 Removed old and obsolete files. 2020-11-08 11:30:07 +01:00
11 changed files with 129 additions and 15514 deletions

View file

@ -1,151 +1,150 @@
substitutions: substitutions:
node_name: !env_var co2ampel node_name: !env_var co2ampel
esphome: esphome:
name: 'co2ampel_${node_name}' name: co2ampel_${node_name}
platform: ESP32 platform: ESP32
board: esp32doit-devkit-v1 board: esp32doit-devkit-v1
on_boot: on_boot:
- display.page.show: boot - display.page.show: boot
on_loop:
- display.page.show: co2
ota: ota:
safe_mode: true safe_mode: True
password: !secret ota_passwd password: !secret ota_passwd
logger:
level: DEBUG
wifi: wifi:
ssid: !secret wifi_ssid ssid: !secret wifi_ssid
password: !secret wifi_passwd password: !secret wifi_passwd
ap: ap:
ssid: co2ampel ssid: "co2ampel"
password: '' password: ""
captive_portal:
captive_portal: null
mqtt: mqtt:
broker: co2.cyber23.de broker: co2.cyber23.de
topic_prefix: 'co2ampel/${node_name}' topic_prefix: co2ampel/${node_name}
birth_message: birth_message:
topic: 'co2ampel/${node_name}/status' topic: co2ampel/${node_name}/status
payload: online payload: online
will_message: will_message:
topic: 'co2ampel/${node_name}/status' topic: co2ampel/${node_name}/status
payload: offline payload: offline
uart: uart:
rx_pin: GPIO16 rx_pin: GPIO16
tx_pin: GPIO17 tx_pin: GPIO17
baud_rate: 9600 baud_rate: 9600
id: uart_mhz19 id: uart_mhz19
light: light:
- platform: fastled_clockless - platform: neopixelbus
chipset: WS2812B pin: GPIO4
pin: GPIO4 num_leds: 12
num_leds: 12 name: "ws2812 ring"
max_refresh_rate: 500ms id: "ws2812"
rgb_order: GRB restore_mode: ALWAYS_OFF
name: ws2812 ring
id: ws2812
restore_mode: ALWAYS_OFF
output: output:
- platform: ledc - platform: ledc
pin: GPIO12 pin: GPIO12
id: buzzer id: buzzer
sensor: sensor:
- platform: mhz19 - platform: mhz19
update_interval: 10s update_interval: 10s
automatic_baseline_calibration: true automatic_baseline_calibration: true
uart_id: uart_mhz19 uart_id: uart_mhz19
temperature: temperature:
name: '${node_name} Temperature' name: ${node_name} Temperature
id: mhz19_temp id: mhz19_temp
co2: co2:
name: '${node_name} PPM' name: ${node_name} PPM
id: mhz19_co2 id: mhz19_co2
on_value: on_value:
then: then:
if: if:
condition: condition:
sensor.in_range: sensor.in_range:
id: mhz19_co2 id: mhz19_co2
above: 0 above: 0
below: 800 below: 800
then: then:
- light.turn_on: - light.turn_off:
id: ws2812 id: ws2812
brightness: 80% - display.page.show: co2
red: 0% else:
green: 100% if:
blue: 0% condition:
- display.page.show: co2 sensor.in_range:
else: id: mhz19_co2
if: above: 800
condition: below: 1000
sensor.in_range: then:
id: mhz19_co2 - light.turn_on:
above: 800 id: ws2812
below: 1000 brightness: 80%
then: red: 50%
- light.turn_on: green: 50%
id: ws2812 blue: 0%
brightness: 80% - display.page.show: co2
red: 50% else:
green: 40% if:
blue: 0% condition:
- display.page.show: co2 sensor.in_range:
else: id: mhz19_co2
if: above: 1000
condition: then:
sensor.in_range: - light.turn_on:
id: mhz19_co2 id: ws2812
above: 1000 brightness: 100%
then: red: 100%
- light.turn_on: green: 0%
id: ws2812 blue: 0%
brightness: 100% # - output.turn_on: buzzer
red: 100% # - output.ledc.set_frequency:
green: 0% # id: buzzer
blue: 0% # frequency: "5000Hz"
- delay: 500ms # - output.set_level:
- light.toggle: ws2812 # id: buzzer
- delay: 500ms # level: "20%"
- light.toggle: ws2812 # - delay: 10ms
- delay: 500ms # - output.turn_off: buzzer
- light.toggle: ws2812 - delay: 500ms
- delay: 500ms - light.toggle: ws2812
- light.toggle: ws2812 - delay: 500ms
- lambda: >- - light.toggle: ws2812
static int num_executions = 0; - delay: 500ms
ESP_LOGD("main", "I am at execution number %d", num_executions); - light.toggle: ws2812
num_executions += 1; - delay: 500ms
- display.page.show: co2 - light.toggle: ws2812
- lambda: |-
static int num_executions = 0;
ESP_LOGD("main", "I am at execution number %d", num_executions);
num_executions += 1;
- display.page.show: co2
i2c: i2c:
sda: GPIO21 sda: GPIO21
scl: GPIO22 scl: GPIO22
font: font:
- file: font.ttf - file: "font.ttf"
id: cust_font id: cust_font
size: 65 size: 70
display: display:
- platform: ssd1306_i2c - platform: ssd1306_i2c
model: SSD1306 128x64 model: "SSD1306 128x64"
address: 60 address: 0x3C
brightness: 100% brightness: 100%
update_interval: 10s update_interval: 10s
pages: pages:
- id: boot - id: boot
lambda: |- lambda: |-
it.printf(64, 0, id(cust_font), COLOR_ON, TextAlign::TOP_CENTER,":-)"); it.printf(64, 0, id(cust_font), COLOR_ON, TextAlign::TOP_CENTER, ":-)");
- id: co2 - id: co2
lambda: |- lambda: |-
int ergb; int ergb;
ergb = id(mhz19_co2).state; ergb = id(mhz19_co2).state/100;
it.printf(64, 0, id(cust_font), COLOR_ON, TextAlign::TOP_CENTER, "%.0i", ergb); it.printf(64, 0, id(cust_font), COLOR_ON, TextAlign::TOP_CENTER, "%.0i", ergb);
# it.printf(64, 16, id(cust_font), COLOR_ON,TextAlign::TOP_CENTER, "%.0fPPM", id(mhz19_co2).state); # it.printf(64, 16, id(cust_font), COLOR_ON, TextAlign::TOP_CENTER, "%.0fPPM", id(mhz19_co2).state);
# it.printf(64, 40, id(cust_font),TextAlign::TOP_CENTER,"%.0f°C", id(mhz19_temp).state); # it.printf(64, 40, id(cust_font),TextAlign::TOP_CENTER, "%.0f°C", id(mhz19_temp).state);

View file

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

View file

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 41 KiB

View file

@ -1,8 +0,0 @@
| | Backplates | Frontplates | Topplates | Bottomplates | Circles | Side L | Side R | Deckel |
|-----------|------------|-------------|-----------|--------------|---------|--------|--------|--------|
| Pattern 1 | 18 | 17 | 2 | 2 | | | | |
| Pattern 2 | | | | | 135 | | | |
| Pattern 3 | | | | | | 40 | 40 | |
| Pattern 4 | | | 40 | 40 | | | | |
| Pattern 5 | | | 20 | 20 | | 20 | 20 | |
| Pattern 6 | | | | | | | | 135 |

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 593 KiB

File diff suppressed because it is too large Load diff

Before

Width:  |  Height:  |  Size: 212 KiB

File diff suppressed because it is too large Load diff

Before

Width:  |  Height:  |  Size: 59 KiB

File diff suppressed because it is too large Load diff

Before

Width:  |  Height:  |  Size: 83 KiB

File diff suppressed because it is too large Load diff

Before

Width:  |  Height:  |  Size: 81 KiB

File diff suppressed because it is too large Load diff

Before

Width:  |  Height:  |  Size: 87 KiB

File diff suppressed because it is too large Load diff

Before

Width:  |  Height:  |  Size: 160 KiB