If you don’t know this, you can dumb your remote control with this library and with a IR Receiver (In the library you have and example of “Dump”, just execute that and press the buttons of your remote control).

Step 1: Connect the IR Emitter to Arduino and also the Triggers
Connect the IR Emitter to Arduino board.

Step 2: The Code
I was lucky and this library also has a specific IR command for Sony’s TV remote controls, so I just search a lot in the internet and I found this page http://files.remotecentral.com/library/3-4/sony/television/index.html which has the IR Codes of the remote control buttons . NO ALL IR CODES OF THAT PAGE WORKS!!! For example there is one PowerOn/Off comand that doesn’t work.

If you do it with raw code, you have to put this line after the line 33 (you have to know what speed you IR Emitter works with (mine 38 khz):

int khz = 38;

Just copy that (Obviously you need to change the line 33 with your IR Emitter digital pin.

/*
Cayenne Button Widget Example
This sketch shows how to set up a Button Widget with Cayenne.
The Cayenne Library is required to run this sketch. If you have not already done so you can install it from the Arduino IDE Library Manager.
Steps:
1. In the Cayenne Dashboard add a new Button Custom Widget.
2. Select a digital pin number. Do not use digital pins 0 or 1 since those conflict with the use of Serial.
3. Attach a digital output device (e.g. a LED) to the digital pin on your Arduino matching the selected pin.
4. Set the token variable to match the Arduino token from the Dashboard.
5. Compile and upload this sketch.
6. Once the Arduino connects to the Dashboard you should be able to control the digital output device with the Button widget.
Notice that there isn't much coding involved to interact with the digital pins.
Most of it is handled automatically from the Cayenne library.
For further examples of how to receive data from Cayenne see the example sketches under Actuators.
*/
#define CAYENNE_PRINT Serial // Comment this out to disable prints and save space
// If you're not using the Ethernet W5100 shield, change this to match your connection type. See Communications examples.
#include <CayenneEthernet.h>
// Cayenne authentication token. This should be obtained from the Cayenne Dashboard.
char token[] = "********";
#include <IRremote.h>
#include <IRremoteInt.h>
IRsend irsend;
IRrecv irrecv(3);
unsigned int SpeakersOnOff[] = {0000, 0067, 0000, 000d, 0060, 0018, 0018, 0018, 0018, 0018, 0018, 0018, 0018, 0018, 0030, 0018, 0018, 0018, 0030, 0018, 0030, 0018, 0018, 0018, 0018, 0018, 0018, 0018, 0018, 03f2};
unsigned int PowerOnOff[] = {0000, 0067, 0000, 000d, 0060, 0018, 0018, 0018, 0018, 0018, 0018, 0018, 0030, 0018, 0030, 0018, 0030, 0018, 0018, 0018, 0030, 0018, 0018, 0018, 0018, 0018, 0018, 0018, 0018, 0410};
void setup() {
pinMode(8, INPUT);
pinMode(6, INPUT);
Serial.begin(9600);
Cayenne.begin(token);
}
void loop() {
Cayenne.run();
if(digitalRead(8)==HIGH){
irsend.sendSony(SpeakersOnOff, 20);
while(digitalRead(8)==HIGH){}
}
if(digitalRead(6)==HIGH){
irsend.sendSony(PowerOnOff, 20);
while(digitalRead(6)==HIGH){}
}
}

Hi again @Neoxelox, Another cool project, thanks for sharing these with our community. You can edit your post by looking for the pencil icon which will appear on your posts when you scroll to them while logged in as yourself. I’ve highlighted it in this image: [image]