Skip to content
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. OpenHardware.io
  3. 💬 Heatpump / airconditioner controller
  • Getting Started
  • Controller
  • Build
  • Hardware
  • Download/API
  • Forum
  • Store

💬 Heatpump / airconditioner controller

Scheduled Pinned Locked Moved OpenHardware.io
mysensorsinfraredheatpumpcontest2016
7 Posts 5 Posters 3.4k Views 7 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • openhardware.ioO Offline
    openhardware.ioO Offline
    openhardware.io
    wrote on last edited by openhardware.io
    #1

    https://www.openhardware.io/view/41/Heatpump-airconditioner-controller

    1 Reply Last reply
    2
    • K Offline
      K Offline
      ksga
      wrote on last edited by
      #2

      Too cool - I can make my heatpump beep and stuff from my smartphone - live will surely never be the same again :)

      There is one more trick I would love to teach it though - it seems that the code is prepared for "fan swing" commands, but they don't seem to be implemented in either the Arduino code, or in the LUA script for Domoticz.

      Does anyone have some pointers on how to activate these bits?

      1 Reply Last reply
      0
      • bjacobseB Offline
        bjacobseB Offline
        bjacobse
        wrote on last edited by bjacobse
        #3

        since I am still using Mysensors ver 1.5.4 I am not able to send text strings from Domoticz to my mysensor heatpump IR. So I have taken the scale down approach to create a switch that can switch on or off my IVT. Since we anyway always use same configuration, I took the liberty to hardcode this into my Mysensors code.
        I use Arduino code library created by ToniA
        My sketch is solely made for my IVT heatpump, but it's easy to modify to your heatpump. I have commented away all those other heatpump instances, since they took up almost all memory

        #include <Arduino.h>
        #include <MySensor.h>
        
        #include <FujitsuHeatpumpIR.h>
        #include <PanasonicCKPHeatpumpIR.h>
        #include <PanasonicHeatpumpIR.h>
        #include <CarrierHeatpumpIR.h>
        #include <MideaHeatpumpIR.h>
        #include <MitsubishiHeatpumpIR.h>
        #include <SamsungHeatpumpIR.h>
        #include <SharpHeatpumpIR.h>
        #include <DaikinHeatpumpIR.h>
        #include <MitsubishiHeavyHeatpumpIR.h>
        #include <HyundaiHeatpumpIR.h>
        #include <HisenseHeatpumpIR.h>
        #include <GreeHeatpumpIR.h>
        #include <FuegoHeatpumpIR.h>
        #include <ToshibaHeatpumpIR.h>
        #include <IVTHeatpumpIR.h>
        
        
        IRSenderPWM irSender(3);       // IR led on Arduino digital pin 3, using Arduino PWM
        //IRSenderBlaster irSender(3); // IR led on Arduino digital pin 3, using IR Blaster (generates the 38 kHz carrier)
        
        
        // Array with all supported heatpumps
        HeatpumpIR *heatpumpIR[] = {/*new SharpHeatpumpIR(),
                                    new PanasonicCKPHeatpumpIR(), new PanasonicDKEHeatpumpIR(), new PanasonicJKEHeatpumpIR(),
                                    new PanasonicNKEHeatpumpIR(), new PanasonicLKEHeatpumpIR(),
                                    new CarrierNQVHeatpumpIR(), new CarrierMCAHeatpumpIR(),
                                    new MideaHeatpumpIR(), new FujitsuHeatpumpIR(),
                                    new MitsubishiFDHeatpumpIR(), new MitsubishiFEHeatpumpIR(), new MitsubishiMSYHeatpumpIR(),
                                    new SamsungHeatpumpIR(), new SharpHeatpumpIR(), new DaikinHeatpumpIR(),
                                    /*new MitsubishiHeavyZJHeatpumpIR(), new MitsubishiHeavyZMHeatpumpIR(),
                                    new HyundaiHeatpumpIR(), new HisenseHeatpumpIR(), new GreeHeatpumpIR(),
                                    new FuegoHeatpumpIR(), new ToshibaHeatpumpIR(),
                                    */new IVTHeatpumpIR(),
                                     NULL};
        
        #define CHILD_1  3  // childId
        MySensor gw;
        MyMessage msg(CHILD_1, V_VAR1);
        int i = 0;//Select specific heatpump model
        
        void setup()
        {
          Serial.begin(115200);
          //Serial.begin(9600);
          delay(500);
        
         // Serial.println(F("Starting"));
          //gw.begin(incomingMessage);
          gw.begin(incomingMessage, AUTO, true);
         
          // Send the sketch version information to the gateway and Controller
          gw.sendSketchInfo("Heatpump IR switch", "1.0");
        
          // Register a sensors to gw. Use binary light for test purposes.
          gw.present(CHILD_1, S_LIGHT);
          
          const char* buf;
        
            // Send the same IR command to all supported heatpumps
            Serial.print(F("Sending IR to "));
        
            buf = heatpumpIR[i]->model();
            // 'model' is a PROGMEM pointer, so need to write a byte at a time
            while (char modelChar = pgm_read_byte(buf++))
            {
              Serial.print(modelChar);
            }
            Serial.print(F(", info: "));
        
            buf = heatpumpIR[i]->info();
            // 'info' is a PROGMEM pointer, so need to write a byte at a time
            while (char infoChar = pgm_read_byte(buf++))
            {
              Serial.print(infoChar);
            }
            Serial.println();
         
        }
        
        void loop()
        {
          gw.process();
        }
        
        
        void incomingMessage(const MyMessage &message) {
            Serial.print("Receive message: ");
            if (message.type==V_LIGHT) {
             int incomingRelayStatus = message.getInt();
             //Serial.print(F("Incoming Relaystatus: "));
             Serial.println(incomingRelayStatus);
             if (incomingRelayStatus == 1) {
              heatpumpIR[i]->send(irSender, POWER_ON, MODE_HEAT, FAN_1, 23, VDIR_AUTO, HDIR_AUTO);
              Serial.println(F("ON, 23 degree"));
             } else {
              heatpumpIR[i]->send(irSender, POWER_OFF, MODE_HEAT, FAN_1, 23, VDIR_AUTO, HDIR_AUTO);
              Serial.println(F("OFF"));
              }
           }
        }
               
        
        1 Reply Last reply
        0
        • bjacobseB Offline
          bjacobseB Offline
          bjacobse
          wrote on last edited by
          #4

          I copied ToniA's approach to get 5V from the Heatpump, and soldered wires to the IR detection circuit:

          4_1483048855084_WP_20161229_019.jpg 3_1483048855084_WP_20161229_018.jpg 2_1483048855084_WP_20161229_017.jpg 1_1483048855084_WP_20161229_016.jpg 0_1483048855083_WP_20161229_015.jpg

          1 Reply Last reply
          2
          • M Offline
            M Offline
            markcame
            wrote on last edited by
            #5

            First , I started to build an arduino pro version of the sensors but i have some trouble, it seems that the code sended over ir is not stable using an arduino as decoder i see that sometims one ore more bit is delayed or not send and accordingly the heatpump does not start... there are settings that i have to change for the PWM on an arduino pro mini ?
            Second if someone is interested i decoded the ir codes of my heatpump a mitsubishi not supported on the provided library on the forum, i can share the reverse of the protocol if someone is interested

            bjacobseB 1 Reply Last reply
            0
            • M markcame

              First , I started to build an arduino pro version of the sensors but i have some trouble, it seems that the code sended over ir is not stable using an arduino as decoder i see that sometims one ore more bit is delayed or not send and accordingly the heatpump does not start... there are settings that i have to change for the PWM on an arduino pro mini ?
              Second if someone is interested i decoded the ir codes of my heatpump a mitsubishi not supported on the provided library on the forum, i can share the reverse of the protocol if someone is interested

              bjacobseB Offline
              bjacobseB Offline
              bjacobse
              wrote on last edited by
              #6

              @markcame

              Hi you should provide your heatpump info to Toni at the below link. check manufacturer + model + relevant data from your remote control and also your protocol info. then other persons using your heatpump can benefit from your work :-)

              https://github.com/ToniA/arduino-heatpumpir

              PS. I am for my heatpump not using arduino/mysensors, as it was actually much easier to use/integrate Wemos D1 Pro mini + ESPEASy + P_115 heatpumpir into my Domoticz.
              https://www.domoticz.com/wiki/AC_/_heatpumpIR#Check_heatpumpIR

              1 Reply Last reply
              0
              • E Offline
                E Offline
                evb
                wrote on last edited by
                #7

                I recently build successfully a mysensor node based on an Arduino Uno, a Robolink IR sensor and a Robolink DHT11 sensor. The last two from an Elektor sensor kit ever bought for my son when he was still interested by electronics :wink: .

                My controller is Home Assistant, so I did a merge of the given MySensors example sketch and the Home Assistant example sketch together with the DHT11 sketch.
                The airco is a Samsung one, so in the sketch you will find these defines uncommented. Replace by your airco manufacturer.

                People interested in building one, can find my sketch on https://github.com/ericvb/MySensorsArduinoSketches

                @ToniA a big thanks for the work to decode all these IR sequences!

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                2

                Online

                11.7k

                Users

                11.2k

                Topics

                113.0k

                Posts


                Copyright 2019 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • OpenHardware.io
                • Categories
                • Recent
                • Tags
                • Popular