Enable Javascript

Gebruikerswaardering: 5 / 5

Ster actiefSter actiefSter actiefSter actiefSter actief

myMidea.ino: split AC IR control with an Web Browser interface
Midea Group’s: Toshiba, Midea, Comfee, Eureka, COLMO, Beverly, Vandelo, Little Swan
Ewald sr, July 2020 www.kendziorra.nl


Control your air conditioning automatically and manual with a Web Browser from wherever you are. I am not using the "recommended" APP via Amazon, it is too unsafe for me.
The IR-LED must be able to see the air conditioner (as the standard remote control). The temperature sensor must be open but protected from direct "AC airflow" and "controller board" heat.
The controller does all the necessary work according to the entered and, in EEPROM, saved values.
We use a NTP server and my sMsecTime.h library to get the Local (DST/Summer) time. The outside temperature is obtained every five  minute, depending on the entered Lat/Lon values, from https://openweathermap.org/ (API with a free KEY) and my sOpenweathermap.h.
Communication is done using a simple HTML WebSocket Client (all modern Web Browsers). It is a command line application but also a good guide to create your own graphical interface.
We need only these extra libraries:
https://github.com/Links2004/arduinoWebSockets WebSocket Server.
http://www.kendziorra.nl/arduino/112-my-simplelib-libraries a collection of all my simple, small and easy to use libraries.
Maybe also interesting my article: DECODING INFRARED PROTOCOLS
On my website you will also find: MIDEA AC IR PROTOCOL

 1   Arduino.../ESP... board (from UNO to ESP32 or any other type board)
 1   OPEN-SMART 38KHz IR Emitter (VCC 5V pin) (there are also modules without 38KHz pulses)
 1   OPEN-SMART DS18B20 one-wire temperature censor
 6   Dupont female to female jumper wires


  1. Wire the Arduino.../ESP... board with the two OPEN-SMART modules.
    We use only two digital IO-ports and the VCC/GND pins.
    (set  the DS18B20 47K PULL-UP)
  2. Download myMidea from my website.
  3. Download simpleLIB from my website.
  4. Download WebSocket Server: https://github.com/Links2004/arduinoWebSockets
  5. Find your www IP: http://kendziorra.nl/mijnip.php
  6. Get a free weather key from: https://openweathermap.org/
  7. Get "your" local Timezone string from: https://sites.google.com/a/usapiens.com/opnode/time-zones
  8. Load the ino-file in a editor, edit editMidea.h (pict.1).
  9. Set the used IP as static in your router and port forwarding it.
  10. Compile and upload myMidea over USB.
  11. Load the html-file in a editor, edit it with the same values as in editMidea.h (pict.1).
  12. Now myMidea is working and the myMidea HTML can used in a Web Browser.
  13. Commands should begin and end with a "|" (pict.2).
  14. Place the IR-LED in the field of view of the air conditioner.
  15. Now you can also use the ArduinoOTA function to upload changed code.

An automatic or manual command is repeated once after a minute, in case someone is between the IR LED and AC.
If no temperature difference is measured five minutes after a ON command, it is repeated one more time.
An automatic command is suspended as long as a possible anti-yoyo-delay has not yet expired (standard 10 minutes anti-yoyo).

 (pict.1) Edit editMidea.h and myMidea.html.

(pict.2) The myMidea command line HTML in a WebBrowser.