Skip to content

Control your Remko Air Conditioner via MQTT using an ESP8266

License

Notifications You must be signed in to change notification settings

xn--nding-jua/remko2mqtt

Repository files navigation

remko2mqtt

Control your Remko Air Conditioner via MQTT using an ESP8266

Content

Introduction

With this Arduino-project you can control your Remko air conditioner (mainly the MXW, but maybe the SKW, RVT, ATY, ML, RVD or RXT, too) via MQTT and - for example - NodeRED. As the Remko Smart-Control WiFi-Stick only supports devices since 08/2021 I was not able to use this option for my devices, so I programmed this piece of software. At the moment the following device is tested:

  • MXW353 (manufactured in 2016)

Current state of this project:

  • Investigation of the original interface-PCB using the switchboard with the original 5-pin-cable (+5V, GND, XT and RCV) together with IR-controller
  • Write code to emulate the necessary commands with 1800 Baud
  • Create an adapter-board using ESP8266 to emulate original interface-PCB (mainly a simple level-shift from 3V3 to 5V)
  • Enhance code to support more than one device addressed via MQTT-topic using multiple GPIOs
  • Read-function to receive and evaluate commands of IR-remote-control
  • Discover the used protocol for XYE-connection to use RS485 with address-setting for supporting multiple devices
  • Reverse engineering of the communication-protocol of an original Remko Smart-Control WiFi-Stick to find more commands
  • Enhance the written ESP8266-program with discovered commands of original WiFi-Stick
  • Test more devices (task for the community ;-) )

At the moment the following commands are supported via direct connection of ESP8266 to display-PCB (without using interface-PCB):

  • set device on/off
  • set operation mode (Auto, heating, cooling, drying)
  • set desired temperature (17°C ... 24°C)
  • toggle led

Future "nice-to-have" feature will be:

  • bidirectional communication to readout the current temperature and maybe other information about the air-conditioner
  • Follow-Me-Function for remote-temperature (cmd is implemented, but untested. I fear the IR-remote will not send current temperature via RF when the command is sent by another device)

Using the software

To use this software with your own Remko-devices you have to compile the software using Arduino with installed ESP8266-support and PubSubClient-library. In the config.h you have to configure the software (IP-Addresses, MQTT-Server, and so on). You can choose between using WiFi or an ethernet-connection using the W5500-ethernet-shield. Furthermore you can select how many Remko-devices you'd like to use (at the moment up to four) and on which GPIO you want to output the commands. The IP-addresses and MQTT-topics can be set within the config.h, too. Finally, I've implemented an OTA-firmware-update-feature that allows you to update the firmware via the webpage. Just open the IP-address of the device with a browser, click on the button "Firmwareupgrade" and follow the instructions. A new firmware-binary can be created using Arduino using "Ctrl+Alt+S".

Via MQTT the current settings will be published. As the communication with the air-conditioner is unidirectional these values get invalid if you are using the original IR-remote-control.

The ESP8266 can be connected via a simple level-shifter-circuit using a BC337 transistor (or similar): image

Information about the used communication-protocol

Remko uses predefined commands/bit-pattern for each function of their IR-remote controls and uses these static commands/patterns for their interface-PCB, too. The Sino Wealth SH79F161F 8051 microcontroller on the interface-PCB sends these commands, when it detects a change on SWITCH1/2 or ON/OFF inputs, for example.

So each temperature-value of the remote-control has its individual bit-pattern. I've implemented an Arduino-Test-Sketch to send this bit-pattern via a GPIO. I've already implemented the most-important functions (on/off, temperature-setpoint, operation-mode, etc.):

// TurnOn
{0x0, 0xFF, 0xAE, 0xBB, 0xBA, 0xBA, 0xBA, 0xEB, 0xAE, 0xBB, 0xBB, 0xBB, 0xAE, 0xAA, 0xEE, 0xAE, 0xAE, 0xAA, 0xBB, 0xEE, 0xFE}

// TurnOff
{0x0, 0xFF, 0xAE, 0xBB, 0xBA, 0xBA, 0xBA, 0xEB, 0xBA, 0xBB, 0xEB, 0xEE, 0xAA, 0xAE, 0xEE, 0xAE, 0xAA, 0xEA, 0xEE, 0xEE, 0xFE}

With this knowledge we can connect an own ESP8266 to the XT-pin instead of using the original interface-PCB (see highlighted connector CN501):

image

Electrical and timing-parameters are:

  • On connector CN501 (GND, 5V, XT, REC, 5V) the interface-PCB transmit commands on pin XT
  • Standby-voltage is +5V and individual bits toggle between +5V and 0V (TTL-level)
  • A command is send two times right after each other
  • Each bit takes 550µs, so we have a communication with 1800 baud
  • Communication starts with 8 bits (4.4ms) at low level (GND), followed by 8 bits (4.4ms) at high-level (5V)
  • Communication ends on high-level (5V)

image

Outlook

It would be great to use the available RS485-connection on CON403 using the XYE-pins and the address-encoder to connect multiple device. Anyway, as the RS485 IC is connected to the microcontroller only unidirectional, we do not have any advantages except an easier connection when running long cables. For the moment the found solution is sufficient for smaller installations with one to four devices within a smaller radius.

About

Control your Remko Air Conditioner via MQTT using an ESP8266

Resources

License

Stars

Watchers

Forks

Packages

No packages published