Bonjour,
J’ai installé un module ESP 32 SIM800H avec ESPHome pour envoyer et recevoir des SMS, ça fonctionne.
Je précise que je débute avec Home Assistant.
Il y a une diode que j’aimerais bien allumer avec un switch, il s’agit d’une LED bleue qui, sauf erreur est sur le pin 13. Avec ma configuration actuelle, elle est allumée en permanence mais j’aimerais l’allumer et l’éteindre sur réception d’un SMS par exemple. Dans le fichier de configuration, j’ai donc ceci,
switch:
- platform: gpio
id: "key_pin"
pin: 4
restore_mode: ALWAYS_OFF
- platform: gpio
id: "reset_pin"
pin: 5
restore_mode: ALWAYS_ON
- platform: gpio
id: "power_pin"
pin: 23
restore_mode: ALWAYS_ON
**- platform: gpio**
** id: "Blue_Led"**
** pin: 13**
** restore_mode: ALWAYS_ON**
Avec cette configuration, la diode bleue reste donc allumée en permanence mais je ne la vois pas en temps qu’entité. Dans ma compréhension, c’est le fichier de configuration qui définit les entités qui vont ensuite se retrouver dans HA ?
Voici un extrait du log, dans lequel on voit une ligne concernant cette diode,
[20:28:27][I][app:102]: ESPHome version 2023.10.6 compiled on Mar 25 2024, 09:13:37
[20:28:27][C][wifi:546]: WiFi:
[20:28:27][C][wifi:382]: Local MAC: 08:D1:F9:9C:4D:C8
[20:28:27][C][wifi:383]: SSID: [redacted]
[20:28:27][C][wifi:384]: IP Address: 192.168.0.17
[20:28:27][C][wifi:386]: BSSID: [redacted]
[20:28:27][C][wifi:387]: Hostname: 'esp32-800'
[20:28:27][C][wifi:389]: Signal strength: -50 dB ▂▄▆█
[20:28:27][C][wifi:393]: Channel: 10
[20:28:27][C][wifi:394]: Subnet: 255.255.255.0
[20:28:27][C][wifi:395]: Gateway: 192.168.0.1
[20:28:27][C][wifi:396]: DNS1: 89.2.0.1
[20:28:27][C][wifi:397]: DNS2: 89.2.0.2
[20:28:27][C][logger:416]: Logger:
[20:28:27][C][logger:417]: Level: DEBUG
[20:28:27][C][logger:418]: Log Baud Rate: 115200
[20:28:27][C][logger:420]: Hardware UART: UART0
[20:28:27][C][uart.arduino_esp32:124]: UART Bus 1:
[20:28:27][C][uart.arduino_esp32:125]: TX Pin: GPIO27
[20:28:27][C][uart.arduino_esp32:126]: RX Pin: GPIO26
[20:28:27][C][uart.arduino_esp32:128]: RX Buffer Size: 256
[20:28:27][C][uart.arduino_esp32:130]: Baud Rate: 9600 baud
[20:28:27][C][uart.arduino_esp32:131]: Data Bits: 8
[20:28:27][C][uart.arduino_esp32:132]: Parity: NONE
[20:28:27][C][uart.arduino_esp32:133]: Stop bits: 1
[20:28:27][C][switch.gpio:068]: GPIO Switch 'key_pin'
[20:28:27][C][switch.gpio:091]: Restore Mode: always OFF
[20:28:27][C][switch.gpio:031]: Pin: GPIO4
[20:28:27][C][switch.gpio:068]: GPIO Switch 'reset_pin'
[20:28:27][C][switch.gpio:091]: Restore Mode: always ON
[20:28:27][C][switch.gpio:031]: Pin: GPIO5
[20:28:27][C][switch.gpio:068]: GPIO Switch 'power_pin'
[20:28:27][C][switch.gpio:091]: Restore Mode: always ON
[20:28:27][C][switch.gpio:031]: Pin: GPIO23
[20:28:27][C][switch.gpio:068]: GPIO Switch 'Blue_Led'
[20:28:27][C][switch.gpio:091]: Restore Mode: always ON
**[20:28:27][C][switch.gpio:031]: Pin: GPIO13**
[20:28:27][C][template.text_sensor:020]: Template Sensor 'Sms Expediteur'
[20:28:27][C][template.text_sensor:020]: Template Sensor 'Sms Message'
[20:28:27][C][restart:068]: Restart Switch 'Redémarrage'
[20:28:27][C][restart:070]: Icon: 'mdi:restart'
[20:28:27][C][restart:091]: Restore Mode: always OFF
[20:28:27][C][restart.button:017]: Restart Button 'ESP-SIM800 Redémarrage'
[20:28:28][C][sim800l:465]: SIM800L:
[20:28:28][C][sim800l:467]: Registered 'ESP sim800 status'
[20:28:28][C][sim800l:467]: Device Class: 'connectivity'
[20:28:28][C][sim800l:470]: Rssi 'ESP sim800 signal'
[20:28:28][C][sim800l:470]: Device Class: 'signal_strength'
[20:28:28][C][sim800l:470]: State Class: 'measurement'
[20:28:28][C][sim800l:470]: Unit of Measurement: 'dBm'
[20:28:28][C][sim800l:470]: Accuracy Decimals: 0
[20:28:28][C][captive_portal:088]: Captive Portal:
[20:28:28][C][web_server:161]: Web Server:
[20:28:28][C][web_server:162]: Address: esp32-800.local:80
[20:28:28][C][mdns:115]: mDNS:
[20:28:28][C][mdns:116]: Hostname: esp32-800
[20:28:28][C][ota:097]: Over-The-Air Updates:
[20:28:28][C][ota:098]: Address: esp32-800.local:3232
[20:28:28][C][ota:101]: Using Password.
[20:28:28][C][api:139]: API Server:
[20:28:28][C][api:140]: Address: esp32-800.local:6053
[20:28:28][C][api:142]: Using noise encryption: YES
En espérant que quelqu’un aura… une lumière !
D’avance merci pour votre aide,
Denis