找回密碼
 立即註冊
    查看: 190|回覆: 0

    【冷氣遙控 5/7】接進 HomeKit 用 Siri 控制

    [複製鏈接]

    !lvup!   100%

    386

    主題

    27

    回帖

    2200萬

    積分

    管理員

    積分
    22006063
    發表於 2026-9-25 01:54:26 | 顯示全部樓層 |閱讀模式
    冷氣在 Home Assistant 裡能動之後,再接進 iPhone 的「家庭」App,就可以用 Siri 講、可以在鎖定畫面直接調、也可以寫進 Apple 的捷徑。

    冷氣在 Home Assistant 裡能動之後,再接進 iPhone 的「家庭」App,就可以用 Siri 講、可以在鎖定畫面直接調、也可

    路徑是:ESP32 →(紅外線)→ 冷氣,ESP32 →(Wi-Fi)→ Home Assistant →(HomeKit 協定)→ iPhone。

    ESP32 本身不會講 HomeKit,一定要經過 Home Assistant 轉一手。

    第零步:確認你的起點

    這一篇從「Home Assistant 裡已經有一個會動的冷氣實體」開始。你手上的 ESPHome 設定檔至少要長這樣(跟 4/7 的成品相同,platform 那一行換成你自己找到的):
    1. esphome:
    2.   name: ac-ir
    3.   friendly_name: 冷氣紅外線
    4. esp32:
    5.   board: esp32dev
    6.   framework:
    7.     type: esp-idf
    8. logger:
    9. api:
    10.   encryption:
    11.     key: !secret api_encryption_key
    12. ota:
    13.   - platform: esphome
    14.     password: !secret ota_password
    15. wifi:
    16.   ssid: !secret wifi_ssid
    17.   password: !secret wifi_password
    18. captive_portal:
    19. remote_transmitter:
    20.   id: ir_tx
    21.   pin: GPIO14
    22.   carrier_duty_percent: 50%
    23. remote_receiver:
    24.   id: ir_rx
    25.   pin:
    26.     number: GPIO16
    27.     inverted: true
    28.     mode:
    29.       input: true
    30.       pullup: true
    31.   tolerance: 55%
    32.   idle: 25ms
    33. sensor:
    34.   - platform: dht
    35.     pin: GPIO17
    36.     model: DHT22
    37.     temperature:
    38.       name: "客廳溫度"
    39.       id: room_temp
    40.     humidity:
    41.       name: "客廳濕度"
    42.     update_interval: 30s
    43. climate:
    44.   - platform: coolix
    45.     name: "客廳冷氣"
    46.     transmitter_id: ir_tx
    47.     receiver_id: ir_rx
    48.     sensor: room_temp
    49.     supports_cool: true
    50.     supports_heat: false
    複製代碼

    接線是 GPIO14 經電晶體接到紅外線 LED、GPIO16 接到接收頭的 OUT 腳位、GPIO17 接到 DHT22 的 DATA,感測器的 VCC 接 3.3V、GND 接 GND。

    以下還有約 80% 的內容
    登入後即可閱讀完整教學

    登入繼續閱讀使用 Google 登入
    您需要登入後纔可以回帖 登入 | 立即註冊

    本版積分規則

    延伸閱讀

    加入惟家 LINE 群 QR Code加入惟家 LINE 群

    Archiver|手機版|惟家的智能論壇

    GMT+8, 2026-11-10 00:27 , Processed in 0.118024 second(s), 25 queries .

    快速回覆 返回頂部 返回列表