All Projects → geoffdavis → Esphome Mitsubishiheatpump

geoffdavis / Esphome Mitsubishiheatpump

Licence: bsd-2-clause
ESPHome Climate Component for Mitsubishi Heatpumps using direct serial connection

Projects that are alternatives of or similar to Esphome Mitsubishiheatpump

Irremoteesp8266
Infrared remote library for ESP8266/ESP32: send and receive infrared signals with multiple protocols. Based on: https://github.com/shirriff/Arduino-IRremote/
Stars: ✭ 1,964 (+4264.44%)
Mutual labels:  home-automation, esp32, esp8266
Dsckeybusinterface
An Arduino/esp8266/esp32 library to directly interface with DSC security systems.
Stars: ✭ 202 (+348.89%)
Mutual labels:  home-automation, esp32, esp8266
Feature Requests
ESPHome Feature Request Tracker
Stars: ✭ 160 (+255.56%)
Mutual labels:  home-automation, esp32, esp8266
Openmqttgateway
MQTT gateway for ESP8266, ESP32, Sonoff RF Bridge or Arduino with bidirectional 433mhz/315mhz/868mhz, Infrared communications, BLE, Bluetooth, beacons detection, mi flora, mi jia, LYWSD02, LYWSD03MMC, Mi Scale, TPMS, BBQ thermometer compatibility, SMS & LORA.
Stars: ✭ 2,413 (+5262.22%)
Mutual labels:  home-automation, esp32, esp8266
Open Home Automation
Open Home Automation with Home Assistant, ESP8266/ESP32 and MQTT
Stars: ✭ 820 (+1722.22%)
Mutual labels:  home-automation, esp32, esp8266
Home Assistant Config
My Home Assistant configuration & documentation.
Stars: ✭ 99 (+120%)
Mutual labels:  home-automation, esp32, esp8266
Blynk Server
Blynk is an Internet of Things Platform aimed to simplify building mobile and web applications for the Internet of Things. Easily connect 400+ hardware models like Arduino, ESP8266, ESP32, Raspberry Pi and similar MCUs and drag-n-drop IOT mobile apps for iOS and Android in 5 minutes
Stars: ✭ 8 (-82.22%)
Mutual labels:  home-automation, esp32, esp8266
Mysensors
MySensors library and examples
Stars: ✭ 1,150 (+2455.56%)
Mutual labels:  home-automation, esp32, esp8266
hassio
ESPHome Hass.io addon files
Stars: ✭ 175 (+288.89%)
Mutual labels:  home-automation, esp8266, esp32
issues
Issue Tracker for ESPHome
Stars: ✭ 182 (+304.44%)
Mutual labels:  home-automation, esp8266, esp32
Esphome Core
🚨 No longer used 🚨 - The C++ framework behind ESPHome
Stars: ✭ 545 (+1111.11%)
Mutual labels:  home-automation, esp32, esp8266
houseflow
Home automation platform for microcontrollers(including ESP8266/ESP32), Raspberry Pi, and others. Made with Rust and C++.
Stars: ✭ 88 (+95.56%)
Mutual labels:  home-automation, esp8266, esp32
home-assistant-opentherm-thermostat
Home Assistant OpenTherm Thermostat
Stars: ✭ 26 (-42.22%)
Mutual labels:  home-automation, esp8266, esp32
home
Monorepo for all home automation related development, including integrated firmware, PCBs, configuration, and bridges
Stars: ✭ 104 (+131.11%)
Mutual labels:  home-automation, esp8266, esp32
Esphome
ESPHome is a system to control your ESP8266/ESP32 by simple yet powerful configuration files and control them remotely through Home Automation systems.
Stars: ✭ 4,324 (+9508.89%)
Mutual labels:  home-automation, esp32, esp8266
Guislice
GUIslice drag & drop embedded GUI in C for touchscreen TFT on Arduino, Raspberry Pi, ARM, ESP8266 / ESP32 / M5stack using Adafruit-GFX / TFT_eSPI / UTFT / SDL
Stars: ✭ 534 (+1086.67%)
Mutual labels:  esp32, esp8266
Arduino Homekit Esp8266
Native Apple HomeKit accessory implementation for the ESP8266 Arduino core.
Stars: ✭ 545 (+1111.11%)
Mutual labels:  esp32, esp8266
Esp Dash
A blazing fast library to create a functional dashboard for ESP8266 and ESP32
Stars: ✭ 548 (+1117.78%)
Mutual labels:  esp32, esp8266
Autoconnect
An Arduino library for ESP8266/ESP32 WLAN configuration at runtime with the Web interface
Stars: ✭ 513 (+1040%)
Mutual labels:  esp32, esp8266
Platformio Core
PlatformIO is a professional collaborative platform for embedded development 👽 A place where Developers and Teams have true Freedom! No more vendor lock-in!
Stars: ✭ 5,539 (+12208.89%)
Mutual labels:  esp32, esp8266

esphome-mitsubishiheatpump

Wirelessly control your Mitsubishi Comfort HVAC equipment with an ESP8266 or ESP32 using the ESPHome framework.

Features

  • Instant feedback of command changes via RF Remote to HomeAssistant or MQTT.
  • Direct control without the remote.
  • Uses the SwiCago/HeatPump Arduino libary to talk to the unit directly via the internal CN105 connector.

Requirements

Supported Microcontrollers

This library should work on most ESP8266 or ESP32 platforms. It has been tested with the following MCUs:

  • Generic ESP-01S board (ESP8266)
  • WeMos D1 Mini (ESP8266)
  • Generic ESP32 Dev Kit (ESP32)

Supported Mitsubishi Climate Units

The underlying HeatPump library works with a number of Mitsubishi HVAC units. Basically, if the unit has a CN105 header on the main board, it should work with this library. The HeatPump wiki has a more exhaustive list.

The same CN105 connector is used by the Mitsubishi KumoCloud remotes, which have a compatibility list available.

The whole integration with this libary and the underlying HeatPump has been tested by the author on the following units:

  • MSZ-GL06NA
  • MFZ-KA09NA

Usage

Step 1: Build a control circuit.

Build a control circuit with your MCU as detailed in the SwiCago/HeatPump README. You can use either an ESP8266 or an ESP32 for this.

Note: several users have reported that they've been able to get away with not using the pull-up resistors, and just directly connecting a Wemos D1 mini to the control board via CN105.

Step 2: Use ESPHome 1.15.0-dev or higher

The code in this repository makes use of a number of features in the as-yet unreleased 1.15.0 version of ESPHome, including various Fan modes.

Step 3: Clone this repository into your ESPHome configuration directory

This repository needs to live in your ESPHome configuration directory, as it doesn't work correctly when used as a Platform.IO library, and there doesn't seem to be an analog for that functionality for ESPHome code.

On Hass.IO, you'll want to do something like:

  • Change directories to your esphome configuration directory.
  • mkdir -p src
  • cd src
  • git clone https://github.com/geoffdavis/esphome-mitsubishiheatpump.git

Step 4: Configure your ESPHome device with YAML

Create an ESPHome YAML configuration with the following sections:

  • esphome: libraries: [https://github.com/SwiCago/HeatPump]
  • esphome: includes: [src/esphome-mitsubishiheatpump]
  • climate: - set up a custom climate entry, change the Serial port as needed.
  • ESP8266 only: logger: baud_rate: 0 - disable serial port logging on the sole ESP8266 hardware UART

The custom climate definition should use platform: custom and contain a lambda block, where you instanciate an instance of the MitsubishiHeatPump class, and then register it with ESPHome. It should allso contain a "climates" entry. On ESP32 you can change &Serial to &Serial1 or &Serial2 and re-enable logging to the main serial port.

If that's all greek to you, here's an example. Change "My Heat Pump" to whatever you want.

climate:
  - platform: custom
    lambda: |-
      auto my_heatpump = new MitsubishiHeatPump(&Serial);
      App.register_component(my_heatpump);
      return {my_heatpump};
    climates:
      - name: "My Heat Pump"

Note: this component DOES NOT use the ESPHome uart component, as it requires direct access to a hardware UART via the Arduino HardwareSerial class. The Mitsubishi Heatpump units use an atypical serial port setting ("even parity"). Parity bit support is not implemented in any of the existing software serial libraries, including the one in ESPHome. There's currently no way to guarantee access to a hardware UART nor retrieve the HardwareSerial handle from the uart component within the ESPHome framework.

Example configuration

Below is an example configuration which will include wireless strength indicators and permit over the air updates. You'll need to create a secrets.yaml file inside of your esphome directory with entries for the various items prefixed with !secret.

esphome:
  name: denheatpump
  platform: ESP8266
  board: esp01_1m
  # Boards tested: ESP-01S (ESP8266), Wemos D1 Mini (ESP8266); ESP32 Wifi-DevKit2

  libraries:
    - SwiCago/HeatPump

  includes:
    - src/esphome-mitsubishiheatpump

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Denheatpump Fallback Hotspot"
    password: !secret fallback_password

captive_portal:

# Enable logging
logger:
  # ESP8266 only - disable serial port logging, as the HeatPump component
  # needs the sole hardware UART on the ESP8266
  baud_rate: 0

# Enable Home Assistant API
api:

ota:

# Enable Web server.
web_server:
  port: 80

  # Sync time with Home Assistant.
time:
  - platform: homeassistant
    id: homeassistant_time

# Text sensors with general information.
text_sensor:
  # Expose ESPHome version as sensor.
  - platform: version
    name: denheatpump ESPHome Version
  # Expose WiFi information as sensors.
  - platform: wifi_info
    ip_address:
      name: denheatpump IP
    ssid:
      name: denheatpump SSID
    bssid:
      name: denheatpump BSSID

# Sensors with general information.
sensor:
  # Uptime sensor.
  - platform: uptime
    name: denheatpump Uptime

  # WiFi Signal sensor.
  - platform: wifi_signal
    name: denheatpump WiFi Signal
    update_interval: 60s


climate:
  - platform: custom
    # ESP32 only - change &Serial to &Serial1 or &Serial2 and remove the
    # logging:baud_rate above to allow the built-in UART0 to function for
    # logging.
    lambda: |-
      auto my_heatpump = new MitsubishiHeatPump(&Serial);
      App.register_component(my_heatpump);
      return {my_heatpump};
    climates:
      - name: "Den Heat Pump"

See Also

Other Implementations

The gysmo38/mitsubishi2MQTT Arduino sketch also uses the SwiCago/HeatPump library, and works with MQTT directly. The author found it's WiFi stack to not be particularly robust, but the controls worked fine. Like this ESPHome repository, it will automatically register the device in your HomeAssistant instance if you have HA configured to do so.

There's also the built-in to ESPHome Mitsubishi climate component. It's only in the dev branch at the moment (2020-03-11). The big drawback with the built-in component is that it uses Infrared Remote commands to talk to the Heat Pump. By contrast, the approach used by this repository and it's underlying HeatPump library allows bi-directional communication with the Mitsubishi system, and can detect when someone changes the settings via an IR remote.

Reference documentation

The author referred to the following documentation repeatedly:

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].