This is designed specifically for a Nest model E thermostat & Mitsubishi MSZ-GE heat pump,

but could be adapted for any IR-controlled heat pump via the excellent Arduino-HeatpumpIR library.
A little more work may be required if you want to make this work with the original Nest (which has 6 HVAC signals).

The Arduino monitors the HVAC signals from the Nest, and detects what state the heat pump should be in. When the Nest changes the HVAC state the Arduino emits an IR command to put the heat pump in the right mode.

Since the HVAC signals are pretty dumb, you have to decide what temperature/fanspeed/direction is suitable for each mode. For my apartment I chose Heating Stage 1 to heat to 22C, and Heating Stage 2 to heat to 31C with full fan speed. The Nest will use Stage 2 to rapidly bring the room up to temperature, then drop back to Stage 1 as it nears the target.

The biggest downside is that the IR remote that comes with the heatpump cannot know the current state of the heat pump, but since the Arduino only sends IR commands on HVAC transitions, you are free to override the heat pump state with the original remote.

Pros

  • Cool tech, modern design
  • Has smarts to "pre-heat" your home before you return from work, or before you wake up
  • Fairly good at regulating temperature

Cons

  • Actually less featured than the original remote (no ability to set temperature, or use the "dry" mode)
  • Can only turn the heatpump on & off. Modern heatpumps have inverter systems and can vary their power depending on the target temperature, so this may be slightly less efficient

The source can be found here: https://github.com/jorticus/Nest-IR