F1p / Home-Assistant-Mitsubishi-Ecodan-CN105-to-MQTT

Originally based on the CN105 decode by m000c400, this fork provides CN105 control from basic microcontrollers like the ESP8266 or ESP32
7 stars 1 forks source link
cn105 controller ecodan home-assistant mitsubishi mqtt

Mitsubishi Ecodan Bridge CN105

This software between the Mitsubishi Ecodan FTC controller and a MQTT Broker allows data to be read and commands to be sent.

Hardware

Supported Hardware is ESP8266 ebay sold hardware: https://www.ebay.co.uk/itm/325967595655

M5Stack Atom S3 Lite

  1. Download the files from the /build folder.

  2. Download esptool.exe from Espressif.

  3. Place all the files in the same folder, press and hold the side button of the M5Stack, locate the COM port your M5Stack is on

  4. Open CMD prompt in the folder with the files saved and run:

    esptool.exe --chip esp32s3 --port "COM12" --baud 921600  --before default_reset --after hard_reset write_flash -e -z --flash_mode dio --flash_freq 80m --flash_size 4MB 0x0 "ECODAN_Bridge_v5.2.0.bootloader.bin" 0x8000 "ECODAN_Bridge_v5.2.0.partitions.bin" 0xe000 "boot_app0.bin" 0x10000 "ECODAN_Bridge_v5.2.0.bin"
  5. The Pins on the M5Stack are: 1 = Tx, 2 = Rx

Wemos D1 Mini

  1. Download the files from the /build folder.

  2. Download upload.py from Github

  3. Place all the files in the same folder, locate the COM port your Wemos D1 Mini is on

  4. Open CMD prompt in the folder with the files saved and run:

    python upload.py --chip esp8266 --port "COM4" --baud "115200" "" erase_flash --before default_reset --after hard_reset write_flash 0x0 "ECODAN_Bridge_v5.2.1_WemosD1.bin"
  5. The Pins on the Wemos D1 Mini are: D0 = Tx, D5 = Rx

Mitsubishi CN105 Protocol Decode

For Ecodan ASHP Units this is the protocol decode information https://gitter.im/Mitsubishi-CN105-Protocol-Decode/community

Physical

Serial, 2400, 8, E, 1

Command Format

Header Payload Checksum
5 Bytes 16 Bytes 1 Byte

Header

Sync Byte Packet Type Uknown Unknown Payload Size
0xfc Type 0x02 0x7a Length

Sync Byte

0xfc

Packet Types

Value Packet Type Direction
0x41 Set Request To Heat Pump
0x61 Set Response From Heat Pump
0x42 Get Request To Heat Pump
0x62 Get Response From Heat Pump
0x5A Connect Request To Heat Pump
0x5B Get Request To Heat Pump
0x7A Connect Response From Heat Pump
0x7B Get Response From Heat Pump
0x5B Extended Connect Request To Heat Pump
0x7B Extended Connect Response To Heat Pump

Length

Payload Size (Bytes)

Payload

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Command x x x x x x x x x x x x x x x CHK

Checksum

Checksum = 0xfc - Sum ( PacketBytes[0..20]) ;

Set Request - Packet Type 0x41

Available Commands

Active commands so far identified. Command Brief Description
0x32 Update Settings
0x34 Hot Water, Holiday and Prohibits
0x35 Thermostat Setpoints

0x32 - Set Options

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
0x32 Flags Flags P Unk DHW HC1 HC2 DHWSP DHWSP Z1SP Z1SP Z2SP Z2SP MRC MRC CHK

0x34 - Hot Water and Holiday Mode

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
0x34 Flags Flags DHW HOL IDHW Z1HI Z1CI Z2HI CZ2I SCM Unk1 Unk2 Unk3 Unk4 Unk5 CHK