$USD
  • EUR€
  • £GBP
  • $USD
PROJECTS ArduinoGravity

Control an IR Fireplace From the Internet

DFRobot Feb 08 2018 285

My goal here is to control my infrared controlled fireplace from my phone.

Since I want to control it from my phone and perhaps further automate it, like automatically turning it off, I will replicate its commands into a Particle Photon. That way, I can control it from my phone (or almost any connected device) via WIFI.

This is one implementation of my infrared replicator.

Hardware components:

Gravity: DIGITAL IR Transmitter Module
Particle Photon

Software apps and online services:

Blynk

Replicate the original infrared remote

By following all the steps in my infrared replicator project I was able to obtain all the IR codes of the remote. With those IR codes I created a firmware and exposed them all in Particle cloud functions.

I decoded all the buttons in the remote with the help of the IR receiver circuit (see section Build the IR receiver circuit):
>> On/Off
>> Timer
>> Temperature
>> Blower/Fan
>> Blue flame color
>> Orange flame color


Here is each IR code in C code:

unsigned int napoleon_onOff[67] = {3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0};
unsigned int napoleon_orange[67] = {3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0};
unsigned int napoleon_blue[67] = {3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0};
unsigned int napoleon_blower[67] = {3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0};
unsigned int napoleon_timer[67] = {3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0};
unsigned int napoleon_temperature[67] = {3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0};

Components

I will use the following components:

to build me a compact WIFI controlled IR remote in few steps:

Step 1: Drill a hole in the plastic box for the IR Led

Step 2: Glue the IR transmitter board

Step 3: Wire the python to the IR board (VIN, GND and A5)

Step 4: Close the box

Step 5: Admire your work from a different angle

Once you packed all the components in the enclosure, place it somewhere in front of your fireplace - since it's infrared it needs to have a clear line of sight, free from any obstacles:

Power it up and you are ready to go.

Testing

In case you want to test your project, you can always point it to a turned on Samsung TV and hit the cloud exposed functions I left in the firmware. They both send a Volume up or Volume down command, so if you place your project in front of the TV you could test your setup so far by hitting the Call button in the functions circled in blue in your Particle devices interface:

Trouble shooting your setup with a Samsung TV

Blynk interface

I also created an interface in Blynk so I have access to it from my Home project:

Assign V50-V55 to the buttons and you are ready to go

Blynk definition for the buttons:

#define BLYNK_FIREPLACE_ON_OFF V50
#define BLYNK_ORANGE V51
#define BLYNK_BLUE V52
#define BLYNK_BLOWER V53
#define BLYNK_TIMER V54
#define BLYNK_TEMPERATURE V55

How does one button look like:

Add few buttons in the Blynk interface and you are ready to go

Conclusion

In a couple of hours and armed with the right components and knowledge I was able to control my recently installed infrared fireplace from my phone.

What do you think would be next (or first!)? "Alexa turn the fireplace on" or "Hey Google turn on the fireplace"? Or maybe both at the same time?
More details.

REVIEW