Bonjour,
oui, ayant testé dans un premier temps ESP32 avec affichage des leds pour le tempo d’EDF, puis ce module ci-dessus, je me lance dans cette troisième expérience.
Voici le schéma de montage
L’ayant réalisé après câblage, je pense, j’espère qu’il n’y a pas d’erreur.
Pour la source yaml, elle fait référence à diverse modules déjà réalisés et du NODE RED
esphome:
name: station
friendly_name: esp-station
esp32:
board: esp32dev
framework:
type: arduino
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "017R0PPEDme++m21gFk9m8aVOxcyyxQdaNGySwDSvhg="
ota:
- platform: esphome
password: "99f37fa4175cb23d600667e9769858c2"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Station Fallback Hotspot"
password: "f4PcY0n4EcsA"
captive_portal:
web_server:
port: 80
psram:
mode: octal
speed: 80MHz
spi:
clk_pin: GPIO18 # (Pin on display - SCK/T_CLK)
mosi_pin: GPIO23 # (Pin on display - SDI(MOSI)/T_DIN)
miso_pin: GPIO19 # (Pin on display - SDO(MISO)/T_DO)
display:
- platform: ili9xxx
model: ILI9341
rotation: 180
cs_pin: GPIO21
reset_pin: GPIO22
dc_pin: GPIO3
dimensions: 320x240
update_interval: 1s
color_order: rgb
id: my_display
pages:
- id: page1
lambda: |-
it.printf(260, 0, id(meteo), "%s", id(mdi_meteo).state.c_str());
it.printf(10, 0, id(meteo), "%s", "");
if (id(puissance_instantanee).state < 60) {
it.printf(160, 26, id(police_02), my_white, TextAlign::CENTER, "%5.0f % Wh", id(puissance_instantanee).state);
}
if (id(puissance_instantanee).state >= 60) {
it.printf(160, 26, id(police_02), my_blue, TextAlign::CENTER, "%5.0f % Wh", id(puissance_instantanee).state);
}
if (id(puissance_instantanee).state >= 120) {
it.printf(160, 26, id(police_02), my_green, TextAlign::CENTER, "%5.0f % Wh", id(puissance_instantanee).state);
}
if (id(puissance_instantanee).state >= 180) {
it.printf(160, 26, id(police_02), my_yellow, TextAlign::CENTER, "%5.0f % Wh", id(puissance_instantanee).state);
}
if (id(puissance_instantanee).state >= 240) {
it.printf(160, 26, id(police_02), my_red, TextAlign::CENTER, "%5.0f % Wh", id(puissance_instantanee).state);
}
it.print(10, 60, id(mdi), my_red, "");
it.printf(45, 68, id(police_01), "%.1f °", id(temperature).state);
it.print(110, 64, id(mdi), my_blue, "");
it.printf(145, 68, id(police_01), "%.0f %%", id(hygrometrie).state);
it.print(210, 64, id(mdi), my_orange, "");
it.printf(245, 68, id(police_01), "%.0f km", id(vent).state);
it.print(10, 94, id(mdi), my_sun, "");
it.printf(45, 98, id(police_01), "%s", id(lever).state.c_str());
it.print(110, 94, id(mdi), my_sun, "");
it.printf(145, 98, id(police_01), "%s", id(coucher).state.c_str());
it.print(210, 94, id(mdi), my_white, "");
it.printf(245, 98, id(police_01), "%s mm", id(precipitation).state.c_str());
it.print(10, 124, id(mdi), my_white, "");
it.printf(50, 128, id(police_tableau), my_white, "%s UV", id(valeur_uv).state.c_str());
it.print(110, 132, id(police_tableau), my_produc, "Puissance");
it.print(210, 132, id(police_tableau), my_produc, "Economie");
it.print(10, 156, id(police_tableau), my_produc, "Jour");
it.print(10, 180, id(police_tableau), my_produc, "Semaine");
it.print(10, 204, id(police_tableau), my_produc, "Mois");
it.printf(200, 156, id(police_tableau), TextAlign::RIGHT, "%1.3f % kWh", id(watt_jour).state);
it.printf(200, 204, id(police_tableau), TextAlign::RIGHT, "%1.3f % kWh", id(watt_mois).state);
it.printf(300, 156, id(police_tableau), TextAlign::RIGHT, "%5.2f % €", id(benefice_jour).state);
it.printf(300, 180, id(police_tableau), TextAlign::RIGHT, "%5.2f % €", id(benefice_semaine).state);
it.printf(300, 204, id(police_tableau), TextAlign::RIGHT, "%5.2f % €", id(benefice_mois).state);
it.rectangle(5, 156, 100, 24);
it.rectangle(5, 180, 100, 24);
it.rectangle(5, 204, 100, 24);
it.rectangle(105, 132, 100, 24);
it.rectangle(105, 156, 100, 24);
it.rectangle(105, 180, 100, 24);
it.rectangle(105, 204, 100, 24);
it.rectangle(205, 132, 100, 24);
it.rectangle(205, 156, 100, 24);
it.rectangle(205, 180, 100, 24);
it.rectangle(205, 204, 100, 24);
if (id(heure_grille).state != "") {
it.filled_circle(80, 56, 5, my_blue);
it.print(90, 50, id(police_03), my_white, id(heure_grille).state.c_str());
} else {
it.filled_circle(80, 56, 5, my_black);
it.circle(80, 56, 5, my_blue);
}
if (id(heure_garage).state != "") {
it.filled_circle(170, 56, 5, my_yellow);
it.print(180, 50, id(police_03), my_white, id(heure_garage).state.c_str());
} else {
it.filled_circle(170, 56, 5, my_black);
it.circle(170, 56, 5, my_yellow);
}
text_sensor:
- platform: homeassistant
id: valeur_uv
entity_id: sensor.barlin_uv
- platform: homeassistant
id: heure_garage
entity_id: input_text.commande_garage
- platform: homeassistant
id: heure_grille
entity_id: input_text.commande_grille
- platform: homeassistant
id: mdi_meteo
entity_id: input_text.mdi_meteo
- platform: homeassistant
id: lever
entity_id: input_text.soleil_lever
- platform: homeassistant
id: coucher
entity_id: input_text.soleil_coucher
- platform: homeassistant
id: precipitation
entity_id: sensor.barlin_daily_precipitation
light:
# Télécommande
- platform: binary
name: "Alimentation 500Mhz"
output: alim_500
restore_mode: ALWAYS_ON
- platform: binary
name: "Eclairage Ecran"
output: light_output1
restore_mode: ALWAYS_ON
- platform: binary
name: "TEL GRILLE"
output: light_output32
- platform: binary
name: "TEL GARAGE"
output: light_output33
# Station Solaire
- platform: binary
name: "Level0"
output: light_output25
- platform: binary
name: "Level1"
output: light_output26
- platform: binary
name: "Level2"
output: light_output27
- platform: binary
name: "Level3"
output: light_output14
- platform: binary
name: "Level4"
output: light_output12
- platform: binary
name: "Level5"
output: light_output13
- platform: binary
name: "Level6"
output: light_output15
- platform: binary
name: "Level7"
output: light_output2
- platform: binary
name: "Level8"
output: light_output0
- platform: binary
name: "Level9"
output: light_output4
output:
- id: alim_500
platform: gpio
pin: GPIO5
- id: light_output1
platform: gpio
pin: GPIO1
- id: light_output32
platform: gpio
pin: GPIO32
- id: light_output33
platform: gpio
pin: GPIO33
- id: light_output25
platform: gpio
pin: GPIO25
- id: light_output26
platform: gpio
pin: GPIO26
- id: light_output27
platform: gpio
pin: GPIO27
- id: light_output14
platform: gpio
pin: GPIO14
- id: light_output12
platform: gpio
pin: GPIO12
- id: light_output13
platform: gpio
pin: GPIO13
- id: light_output15
platform: gpio
pin: GPIO15
- id: light_output2
platform: gpio
pin: GPIO2
- id: light_output0
platform: gpio
pin: GPIO0
- id: light_output4
platform: gpio
pin: GPIO4
binary_sensor:
- platform: gpio
name: "telecommande_A"
pin:
number: GPIO36
inverted: True
- platform: gpio
name: "telecommande_B"
pin:
number: GPIO39
inverted: True
sensor:
- platform: homeassistant
id: temperature
entity_id: input_number.temperature
- platform: homeassistant
id: hygrometrie
entity_id: input_number.hygrometrie
- platform: homeassistant
id: vent
entity_id: input_number.vent
- platform: homeassistant
id: watt_jour
entity_id: sensor.total_day
- platform: homeassistant
id: watt_mois
entity_id: sensor.total_month
- platform: homeassistant
id: benefice_jour
entity_id: input_number.production_benefices_jour
- platform: homeassistant
id: benefice_semaine
entity_id: input_number.production_semaine
- platform: homeassistant
id: benefice_mois
entity_id: input_number.production_mois
- platform: homeassistant
id: puissance_instantanee
entity_id: sensor.panneaux_vers_reseau
font:
- file: "gfonts://Zilla Slab"
id: police_tableau
size: 18
glyphs: "€<>♡ÆØÅæøå!'%(){}+,-_.:;*=°?~#0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdeéfghijklmnopqrstuvwxyzôç"
- file: "gfonts://Zilla Slab"
id: police_03
size: 12
glyphs: "€<>♡ÆØÅæøå!'%(){}+,-_.:;*=°?~#0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdeéfghijklmnopqrstuvwxyzôç"
- file: "gfonts://Poppins"
id: police_01
size: 18
glyphs: "€<>♡ÆØÅæøå!'%(){}+,-_.:;*=°?~#0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdeéfghijklmnopqrstuvwxyzôç"
- file: "gfonts://Poppins"
id: police_02
size: 40
glyphs: "€<>♡ÆØÅæøå!'%(){}+,-_.:;*=°?~#0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdeéfghijklmnopqrstuvwxyzôç"
- file: "fonts/materialdesignicons-webfont.ttf"
id: meteo
size: 64
glyphs: [
# Alert
"", # mdi-alert-outline
# Weather
"", # mdi-weather-sunny
"", # mdi-weather-night
"", # mdi-weather-cloudy
"", # mdi-weather-pouring
"", # mdi-weather-snowy-rainy
"s", # mdi-weather-snowy-heavy
"", # mdi-weather-windy-variant
"", # mdi-weather-fog
"", # mdi-weather-partly-cloudy
"n", # mdi-weather-night-partly-cloudy
"", # solar-power
"" # mdi:weather-rainy
]
- file: "fonts/materialdesignicons-webfont.ttf"
id: mdi
size: 32
glyphs: [
'', # mdi-thermometer
'', # mdi-water-percent
"", # wind-power-outline
"", # weather-sunset-up
"", # weather-sunset-down
"", # weather-partly-snowy-rainy
"", # solar-power-variant
"", # sun-wireless-outline
# Alert
"", # mdi-alert-outline
"€<>♡ÆØÅæøå!'%(){}+,-_.:;*=°?~#0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdeéfghijklmnopqrstuvwxyzôç"
]
color:
- id: my_red
hex: FF0000
- id: my_green
hex: 00ff91
- id: my_blue
hex: 00b3ff
- id: my_yellow
hex: cbed0c
- id: my_white
hex: FFFFFF
- id: my_black
hex: "000000"
- id: my_orange
hex: FFAE00
- id: my_sun
hex: F0FF00
- id: my_produc
hex: FF6100
Le Node-RED de la gestion affichage/leds
La gestion des télécommandes
La gestion du timer, impulsion de 2s sur des switchs qui envoient la commande sur les cartes des moteurs garage & grille (solution la moins chères pour moi)
Ce qui me permet aussi, de piloter mes ouvertures sur HA dans mon Android Auto, mais aussi par la voix sur Alexa et Google.
Une usine à GAZ
Voilou