add configs
This commit is contained in:
BIN
ESP32-C3-Zero-details-inter.jpg
Normal file
BIN
ESP32-C3-Zero-details-inter.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 134 KiB |
4
build.sh
Normal file
4
build.sh
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
python3 -m venv /home/lade/python_venv.
|
||||||
|
source venv/bin/activate
|
||||||
|
|
||||||
|
|
||||||
50
espdimmer.yaml
Normal file
50
espdimmer.yaml
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
esphome:
|
||||||
|
name: espdimmer
|
||||||
|
platform: ESP8266
|
||||||
|
board: d1_mini
|
||||||
|
|
||||||
|
# Enable logging
|
||||||
|
logger:
|
||||||
|
|
||||||
|
# Enable Home Assistant API
|
||||||
|
api:
|
||||||
|
password: !secret ota_key
|
||||||
|
|
||||||
|
ota:
|
||||||
|
platform: esphome
|
||||||
|
password: !secret ota_key
|
||||||
|
|
||||||
|
wifi:
|
||||||
|
ssid: "lauIOT"
|
||||||
|
password: "superiot1"
|
||||||
|
domain: .home.cabestan.be
|
||||||
|
|
||||||
|
# Enable fallback hotspot (captive portal) in case wifi connection fails
|
||||||
|
ap:
|
||||||
|
ssid: "EspFan Fallback Hotspot"
|
||||||
|
password: "jTlMOFiFOzog"
|
||||||
|
|
||||||
|
captive_portal:
|
||||||
|
|
||||||
|
web_server:
|
||||||
|
port: 80
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
output:
|
||||||
|
- platform: ac_dimmer
|
||||||
|
id: dimmer1
|
||||||
|
gate_pin: GPIO13
|
||||||
|
zero_cross_pin:
|
||||||
|
number: GPIO15
|
||||||
|
mode:
|
||||||
|
input: true
|
||||||
|
inverted: yes
|
||||||
|
|
||||||
|
|
||||||
|
light:
|
||||||
|
- platform: monochromatic
|
||||||
|
output: dimmer1
|
||||||
|
name: "Dimmed output"
|
||||||
|
|
||||||
|
|
||||||
131
espfantemp-OK.yaml
Normal file
131
espfantemp-OK.yaml
Normal file
@@ -0,0 +1,131 @@
|
|||||||
|
esphome:
|
||||||
|
name: espfan
|
||||||
|
platform: ESP8266
|
||||||
|
board: d1_mini
|
||||||
|
|
||||||
|
# Enable logging
|
||||||
|
logger:
|
||||||
|
|
||||||
|
# Enable Home Assistant API
|
||||||
|
api:
|
||||||
|
password: "feelhome123"
|
||||||
|
|
||||||
|
ota:
|
||||||
|
password: "feelhome123"
|
||||||
|
|
||||||
|
wifi:
|
||||||
|
ssid: "lauIOT"
|
||||||
|
password: "superiot1"
|
||||||
|
domain: .home.cabestan.be
|
||||||
|
|
||||||
|
# Enable fallback hotspot (captive portal) in case wifi connection fails
|
||||||
|
ap:
|
||||||
|
ssid: "EspFan Fallback Hotspot"
|
||||||
|
password: "jTlMOFiFOzog"
|
||||||
|
|
||||||
|
captive_portal:
|
||||||
|
|
||||||
|
web_server:
|
||||||
|
port: 80
|
||||||
|
|
||||||
|
|
||||||
|
time:
|
||||||
|
- platform: sntp
|
||||||
|
id: esptime
|
||||||
|
timezone: "Europe/Brussels"
|
||||||
|
on_time:
|
||||||
|
# Every 5 minutes
|
||||||
|
- seconds: /10
|
||||||
|
then:
|
||||||
|
- lambda: |-
|
||||||
|
ESP_LOGD("custom", "Test sensor is : %.1f [min: %.1f | max: %.1f] state: \n", id(tsensor).state, id(tmin).state, id(tmax).state );
|
||||||
|
|
||||||
|
if( id(tsensor).state < id(tmin).state ) {
|
||||||
|
auto call = id(my_fan).turn_off();
|
||||||
|
call.perform();
|
||||||
|
ESP_LOGD("custom", "Temp is low, so turn off");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
auto call = id(my_fan).turn_on();
|
||||||
|
call.perform();
|
||||||
|
|
||||||
|
id(my_fan).speed = ( id(tsensor).state - id(tmin).state ) / ( id(tmax).state - id(tmin).state ) *100 ;
|
||||||
|
|
||||||
|
ESP_LOGD("custom", "Threshold = %.1f % \n", ( id(tsensor).state - id(tmin).state ) / ( id(tmax).state - id(tmin).state ) *100 );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
fan:
|
||||||
|
- platform: speed
|
||||||
|
output: output_fan
|
||||||
|
name: "Fan"
|
||||||
|
restore_mode: ALWAYS_ON
|
||||||
|
id: my_fan
|
||||||
|
|
||||||
|
dallas:
|
||||||
|
- pin: GPIO4
|
||||||
|
update_interval: 5s
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
number:
|
||||||
|
- platform: template
|
||||||
|
name: "Sensibilité"
|
||||||
|
optimistic: true
|
||||||
|
min_value: 0
|
||||||
|
max_value: 100
|
||||||
|
initial_value: 80
|
||||||
|
step: 1
|
||||||
|
id: sensivity
|
||||||
|
|
||||||
|
- platform: template
|
||||||
|
name: "T Max"
|
||||||
|
optimistic: true
|
||||||
|
min_value: 20
|
||||||
|
max_value: 60
|
||||||
|
initial_value: 35
|
||||||
|
step: 1
|
||||||
|
id: tmax
|
||||||
|
|
||||||
|
- platform: template
|
||||||
|
name: "T Min"
|
||||||
|
optimistic: true
|
||||||
|
min_value: 0
|
||||||
|
max_value: 20
|
||||||
|
initial_value: 20
|
||||||
|
step: 1
|
||||||
|
id: tmin
|
||||||
|
|
||||||
|
|
||||||
|
sensor:
|
||||||
|
- platform: dallas
|
||||||
|
address: 0x5f0000041a8f8628
|
||||||
|
name: "Battery Charger Temp"
|
||||||
|
id: tsensor
|
||||||
|
|
||||||
|
|
||||||
|
# sensor:
|
||||||
|
# - platform: pulse_counter
|
||||||
|
# pin:
|
||||||
|
# number: D2
|
||||||
|
# name: Fan Speed
|
||||||
|
# id: fan_rpm
|
||||||
|
# unit_of_measurement: 'RPM'
|
||||||
|
# filters:
|
||||||
|
# - multiply: 1
|
||||||
|
# update_interval: 3s
|
||||||
|
# count_mode:
|
||||||
|
# rising_edge: INCREMENT
|
||||||
|
# falling_edge: DISABLE
|
||||||
|
|
||||||
|
# Example output entry
|
||||||
|
output:
|
||||||
|
- platform: esp8266_pwm
|
||||||
|
id: output_fan
|
||||||
|
pin: D1
|
||||||
|
max_power: 100%
|
||||||
|
frequency: 25000 Hz
|
||||||
129
espfantemp.yaml
Normal file
129
espfantemp.yaml
Normal file
@@ -0,0 +1,129 @@
|
|||||||
|
esphome:
|
||||||
|
name: espfan
|
||||||
|
platform: ESP8266
|
||||||
|
board: d1_mini
|
||||||
|
|
||||||
|
# Enable logging
|
||||||
|
logger:
|
||||||
|
|
||||||
|
# Enable Home Assistant API
|
||||||
|
api:
|
||||||
|
password: "feelhome123"
|
||||||
|
|
||||||
|
ota:
|
||||||
|
password: "feelhome123"
|
||||||
|
|
||||||
|
wifi:
|
||||||
|
ssid: "lauIOT"
|
||||||
|
password: "superiot1"
|
||||||
|
domain: .home.cabestan.be
|
||||||
|
|
||||||
|
# Enable fallback hotspot (captive portal) in case wifi connection fails
|
||||||
|
ap:
|
||||||
|
ssid: "EspFan Fallback Hotspot"
|
||||||
|
password: "jTlMOFiFOzog"
|
||||||
|
|
||||||
|
captive_portal:
|
||||||
|
|
||||||
|
web_server:
|
||||||
|
port: 80
|
||||||
|
|
||||||
|
|
||||||
|
time:
|
||||||
|
- platform: sntp
|
||||||
|
id: esptime
|
||||||
|
timezone: "Europe/Brussels"
|
||||||
|
on_time:
|
||||||
|
# Every 5 minutes
|
||||||
|
- seconds: /5
|
||||||
|
then:
|
||||||
|
- lambda: |-
|
||||||
|
ESP_LOGD("custom", "Test sensor is : %.1f [target: %.1f] \n", id(tsensor).state, id(ttarget).state );
|
||||||
|
|
||||||
|
if( id(tsensor).state < id(ttarget).state ) {
|
||||||
|
auto call = id(my_fan).turn_off();
|
||||||
|
call.perform();
|
||||||
|
ESP_LOGD("custom", "Temp is low, so turn off");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
auto call = id(my_fan).turn_on();
|
||||||
|
call.perform();
|
||||||
|
|
||||||
|
if( ( id(tsensor).state - id(ttarget).state ) * ( id(sensivity).state / 5 ) > 100 )
|
||||||
|
{ id(my_fan).speed = 100; }
|
||||||
|
else
|
||||||
|
{ id(my_fan).speed = ( id(tsensor).state - id(ttarget).state ) * ( id(sensivity).state / 5 ); }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
fan:
|
||||||
|
- platform: speed
|
||||||
|
output: output_fan
|
||||||
|
name: "Fan"
|
||||||
|
restore_mode: ALWAYS_ON
|
||||||
|
id: my_fan
|
||||||
|
|
||||||
|
|
||||||
|
dallas:
|
||||||
|
- pin: GPIO4
|
||||||
|
update_interval: 2s
|
||||||
|
|
||||||
|
|
||||||
|
number:
|
||||||
|
- platform: template
|
||||||
|
name: "Sensibilité"
|
||||||
|
optimistic: true
|
||||||
|
min_value: 0
|
||||||
|
max_value: 100
|
||||||
|
initial_value: 30
|
||||||
|
restore_value: true
|
||||||
|
step: 1
|
||||||
|
id: sensivity
|
||||||
|
|
||||||
|
- platform: template
|
||||||
|
name: "Target Temp"
|
||||||
|
optimistic: true
|
||||||
|
min_value: 10
|
||||||
|
max_value: 50
|
||||||
|
initial_value: 25
|
||||||
|
restore_value: true
|
||||||
|
step: 1
|
||||||
|
id: ttarget
|
||||||
|
|
||||||
|
sensor:
|
||||||
|
- platform: dallas
|
||||||
|
address: 0x5f0000041a8f8628
|
||||||
|
name: "Battery Charger Temp"
|
||||||
|
id: tsensor
|
||||||
|
filters:
|
||||||
|
- median:
|
||||||
|
window_size: 5
|
||||||
|
send_every: 2
|
||||||
|
send_first_at: 1
|
||||||
|
|
||||||
|
|
||||||
|
# sensor:
|
||||||
|
# - platform: pulse_counter
|
||||||
|
# pin:
|
||||||
|
# number: D2
|
||||||
|
# name: Fan Speed
|
||||||
|
# id: fan_rpm
|
||||||
|
# unit_of_measurement: 'RPM'
|
||||||
|
# filters:
|
||||||
|
# - multiply: 1
|
||||||
|
# update_interval: 3s
|
||||||
|
# count_mode:
|
||||||
|
# rising_edge: INCREMENT
|
||||||
|
# falling_edge: DISABLE
|
||||||
|
|
||||||
|
# Example output entry
|
||||||
|
output:
|
||||||
|
- platform: esp8266_pwm
|
||||||
|
id: output_fan
|
||||||
|
pin: D1
|
||||||
|
max_power: 100%
|
||||||
|
frequency: 25000 Hz
|
||||||
59
esptank.yaml
Normal file
59
esptank.yaml
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
esphome:
|
||||||
|
name: esptank32
|
||||||
|
|
||||||
|
esp32:
|
||||||
|
board: esp32-c3-devkitm-1
|
||||||
|
|
||||||
|
logger:
|
||||||
|
|
||||||
|
api:
|
||||||
|
password: !secret api_secret
|
||||||
|
|
||||||
|
ota:
|
||||||
|
platform: esphome
|
||||||
|
password: !secret ota_key
|
||||||
|
|
||||||
|
wifi:
|
||||||
|
ssid: !secret wireless_ssid
|
||||||
|
password: !secret wireless_key
|
||||||
|
domain: !secret wireless_domain
|
||||||
|
|
||||||
|
ap:
|
||||||
|
ssid: "ESPtank_Fallback"
|
||||||
|
password: !secret ap_secret
|
||||||
|
|
||||||
|
captive_portal:
|
||||||
|
|
||||||
|
web_server:
|
||||||
|
port: 80
|
||||||
|
|
||||||
|
time:
|
||||||
|
- platform: sntp
|
||||||
|
id: sntp_time
|
||||||
|
servers:
|
||||||
|
- 193.190.198.10
|
||||||
|
# timezone: "Europe/Brussels"
|
||||||
|
on_time_sync:
|
||||||
|
then:
|
||||||
|
- logger.log: "NTP : Synchronized sntp clock"
|
||||||
|
|
||||||
|
mqtt:
|
||||||
|
broker: domotic.home.cabestan.be
|
||||||
|
username: espsalon
|
||||||
|
password: !secret mqtt_espsalon
|
||||||
|
|
||||||
|
i2c:
|
||||||
|
sda: 6
|
||||||
|
scl: 7
|
||||||
|
scan: true
|
||||||
|
frequency: 300kHz
|
||||||
|
id: bus_a
|
||||||
|
|
||||||
|
ads1115:
|
||||||
|
- address: 0x48
|
||||||
|
|
||||||
|
sensor:
|
||||||
|
- platform: ads1115
|
||||||
|
multiplexer: 'A0_GND'
|
||||||
|
gain: 6.144
|
||||||
|
name: "ADS1115 Channel A0-GND"
|
||||||
15
salon32.yaml
15
salon32.yaml
@@ -9,6 +9,7 @@ api:
|
|||||||
password: !secret api_secret
|
password: !secret api_secret
|
||||||
|
|
||||||
ota:
|
ota:
|
||||||
|
platform: esphome
|
||||||
password: !secret ota_key
|
password: !secret ota_key
|
||||||
|
|
||||||
wifi:
|
wifi:
|
||||||
@@ -38,12 +39,13 @@ time:
|
|||||||
mqtt:
|
mqtt:
|
||||||
broker: domotic.home.cabestan.be
|
broker: domotic.home.cabestan.be
|
||||||
username: espsalon
|
username: espsalon
|
||||||
password: sala45224
|
password: !secret mqtt_espsalon
|
||||||
|
|
||||||
i2c:
|
i2c:
|
||||||
sda: 21
|
sda: 21
|
||||||
scl: 22
|
scl: 22
|
||||||
scan: true
|
scan: true
|
||||||
|
frequency: 300kHz
|
||||||
id: bus_a
|
id: bus_a
|
||||||
|
|
||||||
font:
|
font:
|
||||||
@@ -97,6 +99,13 @@ switch:
|
|||||||
name: "Esp Salon Led"
|
name: "Esp Salon Led"
|
||||||
pin: 2
|
pin: 2
|
||||||
|
|
||||||
|
|
||||||
|
binary_sensor:
|
||||||
|
- platform: gpio
|
||||||
|
pin: 14
|
||||||
|
name: "PIR Sensor"
|
||||||
|
device_class: motion
|
||||||
|
|
||||||
sensor:
|
sensor:
|
||||||
- platform: dht
|
- platform: dht
|
||||||
pin: 19
|
pin: 19
|
||||||
@@ -108,7 +117,7 @@ sensor:
|
|||||||
name: "Living Room Humidity"
|
name: "Living Room Humidity"
|
||||||
update_interval: 10s
|
update_interval: 10s
|
||||||
|
|
||||||
- platform: bmp280
|
- platform: bmp280_i2c
|
||||||
temperature:
|
temperature:
|
||||||
name: "Living Room Temperature S2"
|
name: "Living Room Temperature S2"
|
||||||
oversampling: 16x
|
oversampling: 16x
|
||||||
@@ -131,4 +140,4 @@ sensor:
|
|||||||
- multiply: 500.0
|
- multiply: 500.0
|
||||||
# - sliding_window_moving_average:
|
# - sliding_window_moving_average:
|
||||||
# window_size: 5
|
# window_size: 5
|
||||||
# send_every: 5
|
# send_every: 5
|
||||||
|
|||||||
Reference in New Issue
Block a user