First commit
This commit is contained in:
commit
607613e904
8 changed files with 295 additions and 0 deletions
6
.gitignore
vendored
Normal file
6
.gitignore
vendored
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
# 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
|
1
README.md
Normal file
1
README.md
Normal file
|
@ -0,0 +1 @@
|
||||||
|
# My ESPHome Configs
|
37
bma.yaml
Normal file
37
bma.yaml
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
esphome:
|
||||||
|
name: bma280
|
||||||
|
friendly_name: ESPHome BMA280
|
||||||
|
platform: ESP8266
|
||||||
|
board: d1_mini
|
||||||
|
|
||||||
|
|
||||||
|
packages:
|
||||||
|
common: !include includes/common.yaml
|
||||||
|
wifi_sensors: !include includes/wifi.yaml
|
||||||
|
|
||||||
|
i2c:
|
||||||
|
- id: bus_a
|
||||||
|
sda: D3
|
||||||
|
scl: D4
|
||||||
|
scan: true
|
||||||
|
|
||||||
|
button:
|
||||||
|
- platform: restart
|
||||||
|
name: "Restart BME280"
|
||||||
|
|
||||||
|
sensor:
|
||||||
|
- platform: bme280_i2c
|
||||||
|
address: 0x76
|
||||||
|
temperature:
|
||||||
|
name: "Ambient temperature"
|
||||||
|
oversampling: 16x
|
||||||
|
pressure:
|
||||||
|
name: "Atmospheric pressure"
|
||||||
|
humidity:
|
||||||
|
name: "BME280 Humidity"
|
||||||
|
update_interval: 300s
|
||||||
|
i2c_id: bus_a
|
||||||
|
- platform: wifi_signal
|
||||||
|
name: "Wi-Fi Signal"
|
||||||
|
update_interval: 60s
|
||||||
|
icon: mdi:wifi
|
23
includes/common.yaml
Normal file
23
includes/common.yaml
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
# Enable logging
|
||||||
|
logger:
|
||||||
|
|
||||||
|
# Enable Home Assistant API
|
||||||
|
api:
|
||||||
|
encryption:
|
||||||
|
key: !secret encryption_key
|
||||||
|
|
||||||
|
ota:
|
||||||
|
- platform: esphome
|
||||||
|
password: !secret ota_password # сюди свій пасс вписати
|
||||||
|
|
||||||
|
captive_portal:
|
||||||
|
|
||||||
|
web_server:
|
||||||
|
port: 80
|
||||||
|
version: 3
|
||||||
|
|
||||||
|
sensor:
|
||||||
|
- platform: uptime
|
||||||
|
name: "${friendly_name} Uptime"
|
||||||
|
- platform: wifi_signal
|
||||||
|
name: "${friendly_name} Wifi Signal"
|
10
includes/wifi.yaml
Normal file
10
includes/wifi.yaml
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
wifi:
|
||||||
|
# output_power: 8.5dB #важлива хрінь, не прибирати
|
||||||
|
ssid: !secret wifi_ssid
|
||||||
|
password: !secret wifi_password
|
||||||
|
|
||||||
|
|
||||||
|
# Enable fallback hotspot (captive portal) in case wifi connection fails
|
||||||
|
ap:
|
||||||
|
ssid: "${friendly_name}"
|
||||||
|
password: "0000000009"
|
172
kettle.yaml
Normal file
172
kettle.yaml
Normal file
|
@ -0,0 +1,172 @@
|
||||||
|
substitutions:
|
||||||
|
name: proficook-pc-wks-1167g
|
||||||
|
friendly_name: ProfiCook PC-WKS 1167G
|
||||||
|
device_name: wks-1167g
|
||||||
|
|
||||||
|
esphome:
|
||||||
|
name: proficook-pc-wks-1167g
|
||||||
|
friendly_name: ProfiCook PC-WKS 1167G
|
||||||
|
|
||||||
|
esp32:
|
||||||
|
board: esp32-c3-devkitm-1
|
||||||
|
framework:
|
||||||
|
type: arduino # idf не працює, йде в bootloop
|
||||||
|
|
||||||
|
packages:
|
||||||
|
common: !include includes/common.yaml
|
||||||
|
wifi_sensors: !include includes/wifi.yaml
|
||||||
|
|
||||||
|
uart:
|
||||||
|
rx_pin: GPIO20
|
||||||
|
tx_pin: GPIO21
|
||||||
|
baud_rate: 9600
|
||||||
|
|
||||||
|
# Register the Tuya MCU connection
|
||||||
|
tuya:
|
||||||
|
id: tuya_tuya_id
|
||||||
|
|
||||||
|
climate:
|
||||||
|
- platform: tuya
|
||||||
|
name: "Kettle Climate"
|
||||||
|
target_temperature_datapoint: 102
|
||||||
|
current_temperature_datapoint: 105
|
||||||
|
switch_datapoint: 101
|
||||||
|
active_state:
|
||||||
|
datapoint: 106
|
||||||
|
visual:
|
||||||
|
min_temperature: 35
|
||||||
|
max_temperature: 100
|
||||||
|
temperature_step: 5
|
||||||
|
|
||||||
|
text_sensor:
|
||||||
|
- platform: template
|
||||||
|
name: Kettle State
|
||||||
|
icon: mdi:kettle
|
||||||
|
id: text_state
|
||||||
|
- platform: template
|
||||||
|
name: Kettle Error
|
||||||
|
icon: mdi:alert-circle-outline
|
||||||
|
id: text_error
|
||||||
|
|
||||||
|
select:
|
||||||
|
- platform: template
|
||||||
|
name: "Kettle mode"
|
||||||
|
id: kettle_control
|
||||||
|
options:
|
||||||
|
- 45°
|
||||||
|
- 60°
|
||||||
|
- 85°
|
||||||
|
- 100°
|
||||||
|
- 100° and off
|
||||||
|
- Custom
|
||||||
|
- "Off"
|
||||||
|
optimistic: true
|
||||||
|
set_action:
|
||||||
|
- lambda: |-
|
||||||
|
if (strcmp(x.c_str(), "45°") == 0) {
|
||||||
|
id(tuya_tuya_id).set_enum_datapoint_value(101, 0);
|
||||||
|
} else if (strcmp(x.c_str(), "60°") == 0) {
|
||||||
|
id(tuya_tuya_id).set_enum_datapoint_value(101, 1);
|
||||||
|
} else if (strcmp(x.c_str(), "85°") == 0) {
|
||||||
|
id(tuya_tuya_id).set_enum_datapoint_value(101, 2);
|
||||||
|
} else if (strcmp(x.c_str(), "100°") == 0) {
|
||||||
|
id(tuya_tuya_id).set_enum_datapoint_value(101, 3);
|
||||||
|
} else if (strcmp(x.c_str(), "100° and off") == 0) {
|
||||||
|
id(tuya_tuya_id).set_enum_datapoint_value(101, 4);
|
||||||
|
} else if (strcmp(x.c_str(), "Custom") == 0) {
|
||||||
|
id(tuya_tuya_id).set_enum_datapoint_value(101, 5);
|
||||||
|
} else {
|
||||||
|
id(tuya_tuya_id).set_enum_datapoint_value(101, 6);
|
||||||
|
}
|
||||||
|
|
||||||
|
number:
|
||||||
|
- platform: "tuya"
|
||||||
|
id: custom_temp
|
||||||
|
name: "Kettle Custom Temperature"
|
||||||
|
number_datapoint: 102
|
||||||
|
icon: mdi:oil-temperature
|
||||||
|
min_value: 35
|
||||||
|
max_value: 100
|
||||||
|
step: 1
|
||||||
|
|
||||||
|
sensor:
|
||||||
|
update_interval: 60s
|
||||||
|
- platform: template
|
||||||
|
name: Kettle Temperature
|
||||||
|
id: kettle_temp
|
||||||
|
unit_of_measurement: "°C"
|
||||||
|
accuracy_decimals: 0
|
||||||
|
|
||||||
|
- platform: tuya
|
||||||
|
id: tuya_105
|
||||||
|
sensor_datapoint: 105
|
||||||
|
on_value:
|
||||||
|
then:
|
||||||
|
- if:
|
||||||
|
condition:
|
||||||
|
lambda: |-
|
||||||
|
return static_cast<int>(id(tuya_106).state) == 1;
|
||||||
|
then:
|
||||||
|
- sensor.template.publish:
|
||||||
|
id: kettle_temp
|
||||||
|
state: !lambda |-
|
||||||
|
return 0;
|
||||||
|
else:
|
||||||
|
- sensor.template.publish:
|
||||||
|
id: kettle_temp
|
||||||
|
state: !lambda |-
|
||||||
|
return id(tuya_105).state;
|
||||||
|
|
||||||
|
- platform: tuya
|
||||||
|
id: kettle_remaining
|
||||||
|
name: Kettle Remaining Time
|
||||||
|
icon: mdi:clock-time-five-outline
|
||||||
|
sensor_datapoint: 107
|
||||||
|
unit_of_measurement: "min"
|
||||||
|
accuracy_decimals: 0
|
||||||
|
|
||||||
|
- platform: tuya
|
||||||
|
id: tuya_101
|
||||||
|
sensor_datapoint: 101
|
||||||
|
on_value:
|
||||||
|
then:
|
||||||
|
- select.set_index:
|
||||||
|
id: kettle_control
|
||||||
|
index: !lambda |-
|
||||||
|
return id(tuya_101).state;
|
||||||
|
|
||||||
|
- platform: tuya
|
||||||
|
id: tuya_106
|
||||||
|
sensor_datapoint: 106
|
||||||
|
on_value:
|
||||||
|
then:
|
||||||
|
- text_sensor.template.publish:
|
||||||
|
id: text_state
|
||||||
|
state: !lambda |-
|
||||||
|
switch(static_cast<int>(id(tuya_106).state)) {
|
||||||
|
case 1: return {"Lifted"};
|
||||||
|
case 2: return {"Standby"};
|
||||||
|
case 3: return {"Heating"};
|
||||||
|
case 4: return {"Cooling"};
|
||||||
|
case 5: return {"Maintaining Temp"};
|
||||||
|
default: return {""};
|
||||||
|
}
|
||||||
|
- platform: tuya
|
||||||
|
id: tuya_104
|
||||||
|
sensor_datapoint: 104
|
||||||
|
on_value:
|
||||||
|
then:
|
||||||
|
- if:
|
||||||
|
condition:
|
||||||
|
lambda: |-
|
||||||
|
return id(kettle_temp).raw_state == 0;
|
||||||
|
else:
|
||||||
|
- text_sensor.template.publish:
|
||||||
|
id: text_error
|
||||||
|
state: !lambda |-
|
||||||
|
switch(static_cast<int>(id(tuya_104).state)) {
|
||||||
|
case 0: return {"OK"};
|
||||||
|
case 1: return {"Empty"};
|
||||||
|
case 4: return {"Overheated"};
|
||||||
|
default: return {"other error"};
|
||||||
|
}
|
41
lyws.yaml
Normal file
41
lyws.yaml
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
esphome:
|
||||||
|
name: esp32_kitchen
|
||||||
|
platform: esp32
|
||||||
|
board: nodemcu-32s
|
||||||
|
|
||||||
|
substitutions:
|
||||||
|
name: lyws
|
||||||
|
friendly_name: LYWS
|
||||||
|
device_name: lyws
|
||||||
|
|
||||||
|
packages:
|
||||||
|
common: !include includes/common.yaml
|
||||||
|
wifi_sensors: !include includes/wifi.yaml
|
||||||
|
|
||||||
|
esp32_ble_tracker:
|
||||||
|
|
||||||
|
sensor:
|
||||||
|
- platform: atc_mithermometer
|
||||||
|
mac_address: A4:C1:38:81:EE:B0
|
||||||
|
temperature:
|
||||||
|
name: "Kitchen Temperature"
|
||||||
|
humidity:
|
||||||
|
name: "Kitchen Humidity"
|
||||||
|
battery_level:
|
||||||
|
name: "Kitchen Battery-Level"
|
||||||
|
battery_voltage:
|
||||||
|
name: "Kitchen Battery-Voltage"
|
||||||
|
signal_strength:
|
||||||
|
name: "Kitchen Signal"
|
||||||
|
- platform: atc_mithermometer
|
||||||
|
mac_address: A4:C1:38:BA:64:BE
|
||||||
|
temperature:
|
||||||
|
name: "Outdoors Temperature"
|
||||||
|
humidity:
|
||||||
|
name: "Outdoors Humidity"
|
||||||
|
battery_level:
|
||||||
|
name: "Outdoors Battery-Level"
|
||||||
|
battery_voltage:
|
||||||
|
name: "Outdoors Battery-Voltage"
|
||||||
|
signal_strength:
|
||||||
|
name: "Outdoors Signal"
|
5
secrets.yaml.example
Normal file
5
secrets.yaml.example
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
# Your Wi-Fi SSID and password
|
||||||
|
wifi_ssid: ""
|
||||||
|
wifi_password: ""
|
||||||
|
encryption_key: ""
|
||||||
|
ota_password: ""
|
Loading…
Reference in a new issue