Closed soufianechekroud closed 4 years ago
Sure it is possible. Just include the IR-Library you favour and change the onChangeChannel / onChangeChannelNumber callback to send the IR codes your TV needs.
Thank's for your fast reply, can you give me a simple example
Which IR module and IR library do you use?
I used ESP32/ESP8266 with IR Emmiter with Kakopappa TV example. Libraires : "IRremoteESP8266" and "IRsend". now i try yhe "TV code" for SinricPro, it's work in serial monitor fine but i want to send ir codes in each commande.
Ok, so show me the code you use to send IR code to switch to a specific channel. Alexa supports switching channels by using a channel name like "NBC" or by a number.
In my case i dont need channel names or numbers, i need only to switch channel up or down ! using your code example and IR codes like that " TV_POWER_H = 0xF10EF6; "
Your example
thanks
You dont have to send me my own example back here ;)
Okay, so you only want to switch UP and DOWN.
Then you only have to use the onSkipChannels
callback.
The parameter channelCount
will be -1
when you want to switch "down" and +1
if you want to switch "UP".
Edit1--- If channelCount = -1, send your "down IR command" If channelCount = +1, send your "up IR command" ---Edit1
Just try to set channelName
to "" and channelCount
to 0
. Alexa awaits a real channel name and the channel number here...
Edit2:
You can also use the onChannelNumber
callback. You only have to translate the given channel number into a series of IR commands, corresponding to the number IR codes on your remote control. And i think you have to send an "OK" IR command or something like that that will do the final switch on your TV. This will enable you to say "Alexa, switch TV to channel 21"... then in your sketch the onChangeChannelNumber
gets called with parameter channelNumber = 21
.
Your Sketch have to send IR commands for "2", "1", "OK" then
Can you please provide a "small" codesnippet how you would send an "UP" or "DOWN" or even a number IR-Command?
Closed because requested information was not delivered
I am currently working on a tutorial to do exactly this, i shall upload it in a couple of weeks. https://www.youtube.com/channel/UCQlMVtTTtNYMCdhDZO5dGuw
Hi sinric developers! I want de tell you thank you for your job, it's a magic. I'am a sinric user and i want to switch to the pro version, so is it possible to use "TV/AC examples" to send IR codes using ESP, and how can i modify the sketch to send IR code to each commande if it is possible. Thank's