Skip to content
This repository

Project for controlling a heat pump over the internet using a Raspberry Pi and an IR Toy

branch: master


Control any 38 KHz infrared device using Google Calendar for scheduling. I'm using a Raspberry pi Raspberry Pi and an IR Toy to manage my heat pump.


  • Simple and small python programs to query a Google Calendar for the current event.
  • Gets the corresponding IR code from a JSON file of IR codes. In my case this is a list of temperatures and codes.
  • Sends the IR code to the device using the IR Toy. It will only send a new signal if it's different from the last one sent.
  • Can handle very long IR codes, much longer than Lirc or the IguanaIR can handle. This is needed for the Mitsubishi heat pump IR codes. Has been used to successfully send a 15 second IR signal. Note: this project is not compatible with Lirc, but the IR Toy can be used with Lirc directly.


  • My Mitsubishi heat pump is great but only has a very simple timer. You can purchase a programmable thermostat, but it's expensive and doesn't do anything I'm after. Being able to control this with a Google Calendar is ideal since it is a very powerful calendar that is available from the web, smart phones, and has a well documented API for communicating with it. No need to reinvent the wheel.
  • I'm interested in being able to set the temperature of my house before I get home or before I get up in the morning. There are some excellent products for this, such as the Nest and Ecobee, but unfortunately they don't work with heat pumps like mine. They're full of advanced features that I have no intention of implementing, like motion sensing. I'm simply after a good calendar integration with low cost open-source hardware.
  • Both the Raspberry Pi and the IR Toy are low cost, low power, and have an excellent open source community behind them.
  • There are a few other projects doing similar things, but they don't have any calendar integration or require specialized hardware.

Project components

  • A Python module for transmitting and receiving IR codes from an IR Toy. See the github project page for more info: PyIrToy. I split this into a different project and added it to pypi to make it easy for others to use.
  • A command line program called This is the main part of this project, it queries the Calendar and sends an IR code if required.
  • Two command line utilities called and for recording and transmitting IR codes. is mainly used for testing the recorded codes. records the IR codes to a JSON file that can be used by
Something went wrong with that request. Please try again.