Salut, peut-être discuté ailleurs (ou hors sujet) et dans ce cas là m'excuser mais.... Je viens d'activer mon esp8285 qui peut scanner/transmettres des codes IR.
Il faut savoir comment 'progammer' un ESP mais c'est pas super difficile non plus.
Matériel
- FT232 d'Aliexpress (< 10EUR) pour la programmation
- ESP8285 d'Aliexpress (<5 EUR)
- prise usb ou sorte pour l'alimentation 5V
Logiciel:
- ESPHOME
Example de code:
# Board: Generic ESP8285 Module (Espressif)
# Definition: definitions/boards/esp8285/manifest.yaml
esphome:
name: esp-infrared
friendly_name: ESP_INFRARED
esp8266:
board: esp8285
logger:
level: DEBUG
baud_rate: 115200
api:
ota:
- platform: esphome
wifi:
ssid: !secret wifi_ssid2
password: !secret wifi_password2
manual_ip:
static_ip: 192.168.1.160
gateway: 192.168.1.1
subnet: 255.255.255.0
remote_receiver:
pin:
number: GPIO14
inverted: true
dump:
- raw
remote_transmitter:
pin:
number: GPIO4
inverted: false
carrier_duty_percent: 50
id: airton_tx
button:
- platform: template
name: "Airco OFF"
on_press:
- remote_transmitter.transmit_raw:
code: [6657, -3325, 429, -1268, 402, -1268, 404, -402, 428, -411, 425, -1266, 402, -410, 424, -1268, 400, -1268, 401, -1269, 401, -407, 428, -405, 429, -406, 428, -1267, 403, -380, 451, -407, 429, -407, 426, -409, 425, -408, 428, -1268, 401, -407,
428, -405, 428, -406, 429, -405, 429, -406, 428, -405, 430, -1267, 401, -1268, 401, -406, 428, -407, 428, -407, 427, -407, 453, -381, 429, -405, 428, -406, 426, -408, 426, -408, 429, -405, 428, -407, 427, -408, 427, -406, 428, -407, 426, -408, 428,
-1267, 401, -407, 426, -406, 431, -405, 428, -1268, 400, -1269, 400, -1268, 404, -404, 431, -406, 426, -407, 430, -404, 426, -1269, 401, -1268, 400, -1269, 401]
repeat:
times: 5
wait_time: 16ms
carrier_frequency: 38kHz
- platform: template
name: "Airco Cool 22°C"
on_press:
- remote_transmitter.transmit_raw:
code: [6655, -3332, 424, -1247, 424, -1245, 425, -408, 425, -409, 427, -1246, 424, -407, 427, -1265, 404, -1270, 400, -1274, 396, -408, 426, -410, 425, -408, 426, -1270, 400, -408, 426, -408, 427, -408, 426, -1270, 400, -408, 426, -409, 426,
-1270, 400, -408, 426, -409, 426, -408, 426, -409, 426, -408, 427, -1269, 400, -1269, 401, -407, 427, -408, 427, -408, 427, -407, 427, -408, 427, -407, 426, -409, 426, -409, 426, -408, 426, -408, 426, -409, 426, -408, 426, -409, 426, -408, 426, -409,
426, -1268, 401, -408, 427, -408, 426, -408, 427, -1268, 401, -1269, 402, -407, 427, -408, 426, -1269, 400, -409, 426, -408, 427, -1268, 401, -1269, 400, -1271, 398]
repeat:
times: 5
wait_time: 16ms
carrier_frequency: 38kHz
- platform: template
name: "Airco Cool 23°C"
on_press:
- remote_transmitter.transmit_raw:
code: [6659, -3329, 428, -1267, 403, -1267, 402, -406, 429, -406, 430, -1268, 400, -406, 430, -1266, 402, -1245, 425, -1268, 402, -406, 428, -406, 429, -406, 428, -1268, 402, -406, 428, -407, 428, -406, 428, -1269, 402, -405, 429, -406, 428,
-1268, 402, -406, 428, -407, 428, -406, 428, -407, 428, -1268, 402, -1268, 401, -1268, 402, -406, 429, -406, 428, -407, 427, -407, 428, -406, 429, -406, 429, -406, 429, -405, 428, -407, 428, -406, 428, -407, 428, -407, 427, -407, 428, -406, 428, -407,
428, -1267, 403, -407, 427, -406, 431, -406, 427, -1266, 402, -1269, 402, -1267, 402, -1268, 402, -406, 428, -1268, 428, -380, 428, -1269, 401, -1272, 397, -1268, 402]
repeat:
times: 5
wait_time: 16ms
carrier_frequency: 38kHz
- platform: template
name: "Airco Cool 24°C"
on_press:
- remote_transmitter.transmit_raw:
code: [6650, -3351, 401, -1245, 424, -1243, 425, -411, 423, -411, 423, -1243, 425, -411, 422, -1245, 424, -1244, 427, -1242, 424, -411, 423, -411, 423, -410, 424, -1247, 422, -409, 424, -410, 423, -412, 424, -1243, 424, -410, 424, -410, 424,
-1236, 433, -409, 424, -410, 424, -410, 427, -408, 422, -411, 422, -412, 423, -411, 423, -1268, 400, -411, 425, -409, 423, -410, 422, -412, 423, -411, 423, -411, 426, -407, 424, -410, 425, -409, 423, -411, 424, -410, 423, -411, 422, -412, 423, -410,
424, -1266, 401, -411, 423, -411, 424, -410, 423, -1267, 400, -1267, 402, -411, 423, -1266, 402, -412, 422, -1267, 401, -411, 422, -1268, 401, -1267, 401, -1267, 402]
repeat:
times: 5
wait_time: 16ms
carrier_frequency: 38kHz
- platform: template
name: "Airco Cool 25°C"
on_press:
- remote_transmitter.transmit_raw:
code: [6652, -3328, 427, -1267, 401, -1267, 401, -406, 428, -406, 428, -1267, 401, -406, 429, -1267, 400, -1269, 400, -1268, 401, -406, 428, -406, 429, -406, 428, -1266, 402, -405, 429, -407, 426, -406, 428, -1267, 401, -407, 427, -407, 428,
-1266, 402, -408, 425, -405, 430, -407, 427, -409, 425, -1266, 401, -407, 428, -405, 429, -1266, 402, -408, 426, -408, 423, -411, 426, -406, 427, -407, 428, -408, 425, -406, 452, -382, 428, -405, 428, -408, 427, -408, 424, -408, 426, -409, 427, -404,
430, -1265, 401, -407, 428, -405, 429, -406, 426, -1269, 398, -1270, 400, -1268, 401, -407, 429, -407, 426, -1266, 401, -407, 427, -1267, 401, -1268, 377, -1291, 406]
repeat:
times: 5
wait_time: 16ms
carrier_frequency: 38kHz
```