My goal here is to control my infrared controlled fireplace from my phone.
StoryMy fireplace came with the following infrared remote control:
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. Many thanks to the DFRobot shop for providing all the components for this project!
Replicate the original infrared remoteBy 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};
ComponentsI will use the following components:
to build me a compact WIFI controlled IR remote in few steps:
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.
TestingIn 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:
I also created an interface in Blynk so I have access to it from my Home project:
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:
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?
Need help?If you require professional help with your projects, don't hesitate to write me a line about your needs at gusgonnet@gmail.com. Thank you!
Comments