Native ESPHome gree climate component over the API, no MQTT/Broadlink/Tuya. HA on piha runs as a plain Docker container (not HAOS), so ESPHome is a manual docker compose run --rm invocation, not a managed service — device is deliberately not registered in hosts/piha/services.yaml. |
||
|---|---|---|
| .. | ||
| deploy.sh | ||
| docker-compose.yml | ||
| gree-ir-blaster.yaml | ||
| README.md | ||
| secrets.yaml.example | ||
Gree IR Blaster
ESPHome firmware for a Wemos D1 Mini (ESP8266) driving a Gree air conditioner over IR, exposed to Home Assistant via the native ESPHome API (no MQTT, no Broadlink, no Tuya).
Hardware
- Wemos D1 Mini (ESP8266)
- Grove IR Emitter
- Grove IR Receiver
Wiring
| Grove module | Pin | Wemos D1 Mini |
|---|---|---|
| IR Emitter | SIG | D5 |
| IR Emitter | VCC | 5V |
| IR Emitter | GND | GND |
| IR Receiver | SIG | D6 |
| IR Receiver | VCC | 3V3 — not 5V, ESP8266 GPIO is not 5V-tolerant |
| IR Receiver | GND | GND |
Home Assistant / deployment model
HA on piha runs as the home-assistant:stable Docker container, not HAOS, so
ESPHome is not installed as an add-on. It runs as a one-off container via
docker compose run --rm — there is no ESPHome daemon on piha. Compile/flash
is a manual, operator-triggered action; this device is intentionally not
registered in hosts/piha/services.yaml.
Once flashed, the device advertises itself via mDNS and shows up as a discoverable ESPHome device in Home Assistant (Settings → Devices & Services → Add Integration → ESPHome).
First flash (USB)
- Copy
secrets.yaml.exampletosecrets.yamland fill inwifi_ssid,wifi_password,fallback_password. - Wire the board as above and plug it into piha via USB.
- Run:
This flashes over./deploy.sh --usb/dev/ttyUSB0.
Subsequent flashes (OTA)
Once the device is on WiFi, redeploy without --usb:
./deploy.sh
This runs docker compose run --rm esphome run gree-ir-blaster.yaml, which
flashes over the network via the ESPHome OTA protocol.
Identifying the Gree protocol variant
The climate: platform: gree component needs a model: matching your AC's
remote protocol. gree-ir-blaster.yaml currently ships with model: yan as
a starting guess — this is not verified and must be confirmed against the
actual remote.
To identify the correct variant:
- Flash the firmware and let the device boot (WiFi connected).
- Tail the logs:
docker compose run --rm esphome logs gree-ir-blaster.yaml - Point the physical Gree remote at the Grove IR Receiver and press a button
(e.g. power on, or change temperature).
dump: allonremote_receivercauses ESPHome to log the raw/decoded IR data it captured. - Compare the decoded output against the known Gree variants supported by
ESPHome and pick the closest match:
genericyanyaayacyac1fb9yx1ffyag
- Update
model:ingree-ir-blaster.yamlto the matching variant, then redeploy (./deploy.sh) and verify the AC responds correctly to commands sent from Home Assistant (power, mode, temperature, fan speed).
If none of the variants behave correctly, capture the raw IR dumps and check
the ESPHome gree component issue tracker / docs for newer variants.