Skip to content
  • MySensors
  • 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. Development
  3. Heatpump controller

Heatpump controller

Scheduled Pinned Locked Moved Development
55 Posts 15 Posters 26.1k Views 11 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.
  • T Offline
    T Offline
    ToniA
    wrote on last edited by
    #21

    @hek, I created pull request #211. I think it's good enough, the challenges are really on the Domoticz side.

    1 Reply Last reply
    0
    • hekH Offline
      hekH Offline
      hek
      Admin
      wrote on last edited by
      #22

      Thanks, I'll take a look!

      1 Reply Last reply
      0
      • T Offline
        T Offline
        ToniA
        wrote on last edited by
        #23

        I finally managed to get rid of all compiler warnings :) I must say I like your CI build system, I'm also running Jenkins at work, actually running the build system on Jenkins is my primary job at the moment...

        So the heatpump IR sender node is now one of the examples on the MySensors 'development' branch.

        1 Reply Last reply
        0
        • hekH Offline
          hekH Offline
          hek
          Admin
          wrote on last edited by hek
          #24

          Thanks for the work you've put into the HeatpumpIR library,

          All creds go to @Anticimex who did the setup of the headless Arduino IDE builder in Jenkins. Messy business to get it right ;)

          But it is really nice to get intant compiler feedback on changes and pull requests for different platforms and boards.

          1 Reply Last reply
          0
          • J Offline
            J Offline
            johnr
            wrote on last edited by
            #25

            ToniA, I can collect the Daikin remote from my cabin during next week. I have the following IR-reciever, is it enough to decode it per your instructions?

            http://www.ebay.com/itm/380746925201?rmvSB=true

            1 Reply Last reply
            0
            • T Offline
              T Offline
              ToniA
              wrote on last edited by
              #26

              Yes, I think it would work. I have used this piece of software to decode the bits from the remote.

              If you have any heatpump/AC remotes at hand, you could try it out already now. It should also work with TV remotes etc. The only thing is that you might need to adjust the limits it's using to tell the one's and zero's apart.

              1 Reply Last reply
              0
              • J Offline
                J Offline
                johnr
                wrote on last edited by
                #27

                Hi Toni,

                inally I was able to fetch the Dakikin remote from my cabin. What type of software did you say you use to decode the remote?

                fetsF 1 Reply Last reply
                0
                • T Offline
                  T Offline
                  ToniA
                  wrote on last edited by
                  #28

                  Quite a co-incidence, I just finished decoding the Sharp/IVT infrared protocol, and pushed my decoder changes into Github:

                  https://github.com/ToniA/Raw-IR-decoder-for-Arduino

                  This is the hardware you'd need, just about any Arduino would do, I'm using both Duemilanove and Mega: https://github.com/ToniA/Raw-IR-decoder-for-Arduino/blob/master/arduino_irreceiver.png

                  If you get the hex sequences and timings out, I can assist with the rest. We can discuss the detail over email (take a look at my Github profile...).

                  1 Reply Last reply
                  0
                  • J johnr

                    Hi Toni,

                    inally I was able to fetch the Dakikin remote from my cabin. What type of software did you say you use to decode the remote?

                    fetsF Offline
                    fetsF Offline
                    fets
                    wrote on last edited by
                    #29

                    @johnr did you see that : instructables article and associated github

                    1 Reply Last reply
                    0
                    • T Offline
                      T Offline
                      ToniA
                      wrote on last edited by
                      #30

                      Interesting... I took a look at mharizanov's work, and I think I might have a decoder for the protocol here: https://github.com/ToniA/Raw-IR-decoder-for-Arduino

                      Would you try if this correctly decodes the protocol? I would also appreciate some full outputs of successful decode, together with the explanation of the state the remote control shows after the button press.

                      If the decoder is correct, creating a Daikin module for the HeatpumpIR library will be a piece of cake :)

                      1 Reply Last reply
                      1
                      • T Offline
                        T Offline
                        ToniA
                        wrote on last edited by
                        #31

                        mharizanov's version of Daikin was different, the protocol now seems to have one extra frame which seems to carry the wall clock time.

                        The HeatpumpIR library now has the initial (untested) Daikin support.

                        1 Reply Last reply
                        0
                        • P Offline
                          P Offline
                          Panos Toumpaniaris
                          wrote on last edited by Panos Toumpaniaris
                          #32

                          Hello,

                          I'm trying to build a sensor node to control a Panasonic AirCon and I'm having trouble (using the latest MySensors and Heatpump-IR libs).
                          Whenever the node tries to send IR it restarts. I tried switching RF24's CE and CS pins in case the timers conflict and tried to reduce sram usage as much as I could to no avail.

                          I'm using a nano and RF24 wireless modules. The hardware works ok with other sketches (for example a simple relay ON/OFF).

                          Here's the sketch:

                          #include <Arduino.h>
                          #include <MySensor.h>  
                          #include <MyTransportNRF24.h>
                          #include <SPI.h>
                          #include <Timer.h>
                          #include <avr/pgmspace.h>
                          #include <PanasonicHeatpumpIR.h>
                          
                          
                          #define ACW2_CHILD 2           // Id of the AC Warm 2 hours child
                          #define ACW6_CHILD 3           // Id of the AC Warm 6 hours child
                          
                          
                          
                          MyTransportNRF24 radio(7, 8, RF24_PA_MAX);
                          
                          MySensor gw(radio);
                          
                          MyMessage acw2Msg(ACW2_CHILD, V_LIGHT);
                          MyMessage acw6Msg(ACW6_CHILD, V_LIGHT);
                          
                          IRSender irsender(9);
                          PanasonicNKEHeatpumpIR *ACIR;
                          
                          Timer t;
                          
                          boolean ac_state = false;
                          
                          
                          void setup() {
                          
                          
                            // Initialize library and add callback for incoming messages
                            gw.begin(incomingMessage, AUTO, true);
                          
                            // Register all sensors to gw (they will be created as child devices)
                            gw.present( ACW2_CHILD, S_LIGHT );
                            gw.present( ACW6_CHILD, S_LIGHT );
                            gw.sendSketchInfo("AC", "1");
                          
                            
                          }
                          
                          void loop() {
                            // MySensors Process
                            gw.process();
                          
                            
                          
                            // Timer Process
                            t.update();
                          
                          }
                          
                          void incomingMessage(const MyMessage &message) {
                          
                            if (message.isAck()) {
                                   Serial.println(F("This is an ack from gateway"));
                                }
                                
                            if (message.type == V_LIGHT) {
                              boolean state = message.getBool();
                              
                              if (message.sensor == ACW2_CHILD) {
                                
                                if(state){
                                  Serial.println(F("--- received ACW2 - ON"));
                               schedule_auto(6600000);
                               //schedule_auto(6000);      
                                }
                                else
                                {
                                  Serial.println(F("--- received ACW2 - OFF"));
                                  ac_off();
                                }
                                
                              }
                              
                              if (message.sensor == ACW6_CHILD) {
                                Serial.println(F("--- received ACW6"));
                                 if(state){
                               schedule_quiet(21000000);      
                                   }
                                else
                                {
                                  ac_off();
                                }
                               }
                              }
                          }
                          
                          
                          void schedule_auto(int dur) {
                          
                             Serial.println(F("--- sending auto"));
                             ACIR->send(irsender, POWER_ON, MODE_HEAT, FAN_AUTO, 26, VDIR_MIDDLE, HDIR_AUTO);
                             t.after(dur,ac_off);
                             ac_state = true;
                            
                          }
                          
                          void schedule_quiet(int dur) {
                          
                             
                             Serial.println(F("--- sending quiet"));
                             ACIR->send(irsender, POWER_ON, MODE_HEAT, FAN_1, 25, VDIR_MIDDLE, HDIR_AUTO);
                             t.after(dur,ac_off);
                             ac_state = true;
                            
                          }
                          
                          void ac_off() {
                            Serial.println(F("--- trying off"));
                            if (ac_state) 
                            {
                              Serial.println(F("--- sending off"));
                            ACIR->send(irsender, POWER_OFF, MODE_HEAT, FAN_1, 25, VDIR_MIDDLE, HDIR_AUTO);
                          
                            ac_state = false;
                            gw.send(acw2Msg.set(false), true);
                            gw.send(acw6Msg.set(false), true);
                            }
                           
                          }
                          
                          

                          Here's the Serial output:

                          send: 2-2-0-0 s=255,c=0,t=18,pt=0,l=5,sg=0,st=ok:1.5.1
                          send: 2-2-0-0 s=255,c=3,t=6,pt=1,l=1,sg=0,st=ok:0
                          read: 0-0-2 s=255,c=3,t=6,pt=0,l=1,sg=0:M
                          repeater started, id=2, parent=0, distance=1
                          send: 2-2-0-0 s=2,c=0,t=3,pt=0,l=0,sg=0,st=ok:
                          send: 2-2-0-0 s=3,c=0,t=3,pt=0,l=0,sg=0,st=ok:
                          send: 2-2-0-0 s=255,c=3,t=11,pt=0,l=2,sg=0,st=ok:AC
                          send: 2-2-0-0 s=255,c=3,t=12,pt=0,l=1,sg=0,st=ok:1
                          read: 0-0-2 s=2,c=1,t=2,pt=0,l=1,sg=0:0
                          send: 2-2-0-0 s=2,c=1,t=2,pt=0,l=1,sg=0,st=ok:0
                          --- received ACW2 - OFF
                          --- trying off
                          read: 0-0-2 s=2,c=1,t=2,pt=0,l=1,sg=0:1
                          send: 2-2-0-0 s=2,c=1,t=2,pt=0,l=1,sg=0,st=ok:1
                          --- resend: 2-2-0-0 s=255,c=0,t=18,pt=0,l=5,sg=0,st=ok:1.5.1
                          send: 2-2-0-0 s=255,c=3,t=6,pt=1,l=1,sg=0,st=ok:0
                          read: 0-0-2 s=255,c=3,t=6,pt=0,l=1,sg=0:M
                          repeater started, id=2, parent=0, distance=1
                          send: 2-2-0-0 s=2,c=0,t=3,pt=0,l=0,sg=0,st=ok:
                          send: 2-2-0-0 s=3,c=0,t=3,pt=0,l=0,sg=0,st=ok:
                          send: 2-2-0-0 s=255,c=3,t=11,pt=0,l=2,sg=0,st=ok:AC
                          send: 2-2-0-0 s=255,c=3,t=12,pt=0,l=1,sg=0,st=ok:1
                          

                          the node restarted at " --- resend" ... it should be "---received"...

                          Am I missing something?

                          T 1 Reply Last reply
                          0
                          • D Offline
                            D Offline
                            DirkB19
                            wrote on last edited by
                            #33

                            Hi,

                            Great news ! :smiley:
                            I've tested the DaikinHeatpumpIR library and I can report that it works with my Daikin Heatpump, type RXS25G2V1B
                            FVXS25FV1B
                            the remote is ARC452A1

                            I'm really happy that it works and would like to say thank you to the dev's !
                            Finally I will be able to start some real energy saving by controlling the Daikin heatpump based on conditions like presence, outside temp, (google)-calendar, and heath generated from a second central heating system (allowing me to choose most economic heathing source).

                            I already have a Nano based sensor node (near the Daikin unit) for PIR motion detection and DHT22 temp/humidity, so hopefully I can manage to integrate the simple ON/OFF via IR into the same sketch.
                            If not, another dedicated node will be needed.
                            @ ToniA, do you expect problems when integrating this into the same Mysensors sketch as PIR + DHT22 ?

                            Bye,
                            DirkB

                            T 1 Reply Last reply
                            1
                            • P Panos Toumpaniaris

                              Hello,

                              I'm trying to build a sensor node to control a Panasonic AirCon and I'm having trouble (using the latest MySensors and Heatpump-IR libs).
                              Whenever the node tries to send IR it restarts. I tried switching RF24's CE and CS pins in case the timers conflict and tried to reduce sram usage as much as I could to no avail.

                              I'm using a nano and RF24 wireless modules. The hardware works ok with other sketches (for example a simple relay ON/OFF).

                              Here's the sketch:

                              #include <Arduino.h>
                              #include <MySensor.h>  
                              #include <MyTransportNRF24.h>
                              #include <SPI.h>
                              #include <Timer.h>
                              #include <avr/pgmspace.h>
                              #include <PanasonicHeatpumpIR.h>
                              
                              
                              #define ACW2_CHILD 2           // Id of the AC Warm 2 hours child
                              #define ACW6_CHILD 3           // Id of the AC Warm 6 hours child
                              
                              
                              
                              MyTransportNRF24 radio(7, 8, RF24_PA_MAX);
                              
                              MySensor gw(radio);
                              
                              MyMessage acw2Msg(ACW2_CHILD, V_LIGHT);
                              MyMessage acw6Msg(ACW6_CHILD, V_LIGHT);
                              
                              IRSender irsender(9);
                              PanasonicNKEHeatpumpIR *ACIR;
                              
                              Timer t;
                              
                              boolean ac_state = false;
                              
                              
                              void setup() {
                              
                              
                                // Initialize library and add callback for incoming messages
                                gw.begin(incomingMessage, AUTO, true);
                              
                                // Register all sensors to gw (they will be created as child devices)
                                gw.present( ACW2_CHILD, S_LIGHT );
                                gw.present( ACW6_CHILD, S_LIGHT );
                                gw.sendSketchInfo("AC", "1");
                              
                                
                              }
                              
                              void loop() {
                                // MySensors Process
                                gw.process();
                              
                                
                              
                                // Timer Process
                                t.update();
                              
                              }
                              
                              void incomingMessage(const MyMessage &message) {
                              
                                if (message.isAck()) {
                                       Serial.println(F("This is an ack from gateway"));
                                    }
                                    
                                if (message.type == V_LIGHT) {
                                  boolean state = message.getBool();
                                  
                                  if (message.sensor == ACW2_CHILD) {
                                    
                                    if(state){
                                      Serial.println(F("--- received ACW2 - ON"));
                                   schedule_auto(6600000);
                                   //schedule_auto(6000);      
                                    }
                                    else
                                    {
                                      Serial.println(F("--- received ACW2 - OFF"));
                                      ac_off();
                                    }
                                    
                                  }
                                  
                                  if (message.sensor == ACW6_CHILD) {
                                    Serial.println(F("--- received ACW6"));
                                     if(state){
                                   schedule_quiet(21000000);      
                                       }
                                    else
                                    {
                                      ac_off();
                                    }
                                   }
                                  }
                              }
                              
                              
                              void schedule_auto(int dur) {
                              
                                 Serial.println(F("--- sending auto"));
                                 ACIR->send(irsender, POWER_ON, MODE_HEAT, FAN_AUTO, 26, VDIR_MIDDLE, HDIR_AUTO);
                                 t.after(dur,ac_off);
                                 ac_state = true;
                                
                              }
                              
                              void schedule_quiet(int dur) {
                              
                                 
                                 Serial.println(F("--- sending quiet"));
                                 ACIR->send(irsender, POWER_ON, MODE_HEAT, FAN_1, 25, VDIR_MIDDLE, HDIR_AUTO);
                                 t.after(dur,ac_off);
                                 ac_state = true;
                                
                              }
                              
                              void ac_off() {
                                Serial.println(F("--- trying off"));
                                if (ac_state) 
                                {
                                  Serial.println(F("--- sending off"));
                                ACIR->send(irsender, POWER_OFF, MODE_HEAT, FAN_1, 25, VDIR_MIDDLE, HDIR_AUTO);
                              
                                ac_state = false;
                                gw.send(acw2Msg.set(false), true);
                                gw.send(acw6Msg.set(false), true);
                                }
                               
                              }
                              
                              

                              Here's the Serial output:

                              send: 2-2-0-0 s=255,c=0,t=18,pt=0,l=5,sg=0,st=ok:1.5.1
                              send: 2-2-0-0 s=255,c=3,t=6,pt=1,l=1,sg=0,st=ok:0
                              read: 0-0-2 s=255,c=3,t=6,pt=0,l=1,sg=0:M
                              repeater started, id=2, parent=0, distance=1
                              send: 2-2-0-0 s=2,c=0,t=3,pt=0,l=0,sg=0,st=ok:
                              send: 2-2-0-0 s=3,c=0,t=3,pt=0,l=0,sg=0,st=ok:
                              send: 2-2-0-0 s=255,c=3,t=11,pt=0,l=2,sg=0,st=ok:AC
                              send: 2-2-0-0 s=255,c=3,t=12,pt=0,l=1,sg=0,st=ok:1
                              read: 0-0-2 s=2,c=1,t=2,pt=0,l=1,sg=0:0
                              send: 2-2-0-0 s=2,c=1,t=2,pt=0,l=1,sg=0,st=ok:0
                              --- received ACW2 - OFF
                              --- trying off
                              read: 0-0-2 s=2,c=1,t=2,pt=0,l=1,sg=0:1
                              send: 2-2-0-0 s=2,c=1,t=2,pt=0,l=1,sg=0,st=ok:1
                              --- resend: 2-2-0-0 s=255,c=0,t=18,pt=0,l=5,sg=0,st=ok:1.5.1
                              send: 2-2-0-0 s=255,c=3,t=6,pt=1,l=1,sg=0,st=ok:0
                              read: 0-0-2 s=255,c=3,t=6,pt=0,l=1,sg=0:M
                              repeater started, id=2, parent=0, distance=1
                              send: 2-2-0-0 s=2,c=0,t=3,pt=0,l=0,sg=0,st=ok:
                              send: 2-2-0-0 s=3,c=0,t=3,pt=0,l=0,sg=0,st=ok:
                              send: 2-2-0-0 s=255,c=3,t=11,pt=0,l=2,sg=0,st=ok:AC
                              send: 2-2-0-0 s=255,c=3,t=12,pt=0,l=1,sg=0,st=ok:1
                              

                              the node restarted at " --- resend" ... it should be "---received"...

                              Am I missing something?

                              T Offline
                              T Offline
                              ToniA
                              wrote on last edited by ToniA
                              #34

                              @Panos-Toumpaniaris said:

                              Am I missing something?

                              Yes you are :smiley:

                              You just have an uninitialized pointer to PanasonicNKEHeatpumpIR, while you should have this instead:

                              PanasonicNKEHeatpumpIR *ACIR = new PanasonicNKEHeatpumpIR();
                              
                              P 1 Reply Last reply
                              0
                              • D DirkB19

                                Hi,

                                Great news ! :smiley:
                                I've tested the DaikinHeatpumpIR library and I can report that it works with my Daikin Heatpump, type RXS25G2V1B
                                FVXS25FV1B
                                the remote is ARC452A1

                                I'm really happy that it works and would like to say thank you to the dev's !
                                Finally I will be able to start some real energy saving by controlling the Daikin heatpump based on conditions like presence, outside temp, (google)-calendar, and heath generated from a second central heating system (allowing me to choose most economic heathing source).

                                I already have a Nano based sensor node (near the Daikin unit) for PIR motion detection and DHT22 temp/humidity, so hopefully I can manage to integrate the simple ON/OFF via IR into the same sketch.
                                If not, another dedicated node will be needed.
                                @ ToniA, do you expect problems when integrating this into the same Mysensors sketch as PIR + DHT22 ?

                                Bye,
                                DirkB

                                T Offline
                                T Offline
                                ToniA
                                wrote on last edited by
                                #35

                                @DirkB19 said:

                                @ ToniA, do you expect problems when integrating this into the same Mysensors sketch as PIR + DHT22 ?

                                It should be fine. Just make sure that if you have any interrupt handlers (PIR?), make sure they execute fast so that they don't mess up the timings. It's probably not a very good idea to disable interrupts while sending the IR, as the IR sending takes several hundreds of milliseconds.

                                1 Reply Last reply
                                0
                                • T ToniA

                                  @Panos-Toumpaniaris said:

                                  Am I missing something?

                                  Yes you are :smiley:

                                  You just have an uninitialized pointer to PanasonicNKEHeatpumpIR, while you should have this instead:

                                  PanasonicNKEHeatpumpIR *ACIR = new PanasonicNKEHeatpumpIR();
                                  
                                  P Offline
                                  P Offline
                                  Panos Toumpaniaris
                                  wrote on last edited by
                                  #36

                                  @ToniA said:

                                  @Panos-Toumpaniaris said:

                                  Am I missing something?

                                  Yes you are :smiley:

                                  You just have an uninitialized pointer to PanasonicNKEHeatpumpIR, while you should have this instead:

                                  PanasonicNKEHeatpumpIR *ACIR = new PanasonicNKEHeatpumpIR();
                                  

                                  Sorry I didn't answer sooner.. I was having too much fun with my working node!
                                  I just forgot a constructor and no matter how many times I went through my code I couldn't see it!
                                  Thanks so much Toni!

                                  One down 30 more nodes to go!

                                  1 Reply Last reply
                                  0
                                  • T Offline
                                    T Offline
                                    ToniA
                                    wrote on last edited by
                                    #37

                                    Just got my Sensebenders this week. I can confirm that the HeatpumpIR library works also on the Sensebender :) Nice...

                                    F 1 Reply Last reply
                                    1
                                    • T ToniA

                                      Just got my Sensebenders this week. I can confirm that the HeatpumpIR library works also on the Sensebender :) Nice...

                                      F Offline
                                      F Offline
                                      Fredrik Carlsson
                                      wrote on last edited by
                                      #38

                                      @ToniA
                                      Hey, thanks for all the work you have put down. I have had some other projects going the last year so have not really put down more time on this.

                                      How is it working with the sensebender? Are you using it on batteries?
                                      Any ide about battery usage?

                                      1 Reply Last reply
                                      0
                                      • T Offline
                                        T Offline
                                        ToniA
                                        wrote on last edited by
                                        #39

                                        I just got it running on Sensebender today, on my desk. The problem is that this is not a 'sensor', but an 'actuator'. So it needs to listen to the radio all the time. I believe it would not run on batteries for too long.

                                        I was asking about how to power the Sensebender in another thread, but didn't yet get any real answers. So let's try once more:

                                        What kind of schema should I use to power the Sensebender (with NRF24), provided that I have +5V DC available, and I have a bunch of different capacitors and 'LE33ACZ 5V-3.3V Step Down Regulators'?

                                        1 Reply Last reply
                                        0
                                        • F Offline
                                          F Offline
                                          Fredrik Carlsson
                                          wrote on last edited by Fredrik Carlsson
                                          #40

                                          Hello
                                          It would be nice to make it run on batteries, maybe with 10 seconds sleep, and then wake up only to check with gateway if there is a new command and then sleep again.

                                          I am building a pir sensor now based on 3*aa batteris running on 4,5 volt.I will ust use an LE33 step down directly after the battery pack to provide power to both sensebender+radio+pir. Dont know if that is the optimal way to do it but it should work

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


                                          14

                                          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
                                          • MySensors
                                          • OpenHardware.io
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular