ESP32-MiniWebRadio icon indicating copy to clipboard operation
ESP32-MiniWebRadio copied to clipboard

feature request > ADD IR BUTTONS

Open clear-sky opened this issue 2 years ago • 9 comments

Hi dear wolle! some users like to control your radio with remote completely in this condition it is better to use a remote that have more keys like : menu exit up down left right ok etc

clear-sky avatar Oct 21 '23 19:10 clear-sky

At the moment I am preparing the SW for the Arduino V3 (IDF 5.1) including all necessary libraries. After that I can add more IR functions.

schreibfaul1 avatar Oct 22 '23 21:10 schreibfaul1

thanks for the reply!

clear-sky avatar Oct 22 '23 21:10 clear-sky

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Jan 06 '24 02:01 github-actions[bot]

Hi Dear Wolle I decided to add ir bottons but found some problems i intend to increase ir bottons to 50 and can not correct some functions if possible please help

line 575 from main.cpp

void saveIRbuttonsToNVS() {
    uint8_t  ir_addr = ir.get_irAddress();
    uint8_t* ir_buttons = ir.get_irButtons();
    char     buf[12];
    pref.putShort("irAddress", ir_addr);
    for(uint8_t i = 0; i < 20; i++) {
        sprintf(buf, "button_%d", i);
        pref.putShort(buf, ir_buttons[i]);
        log_i("i=%i ir_buttons[i] %X", i, ir_buttons[i]);
    }
    pref.putShort("IR_numButtons", 20);
}

void loadIRbuttonsFromNVS() {
    // load IR settings from NVS
    uint numButtons = pref.getShort("IR_numButtons", 0);
    ir.set_irAddress(pref.getShort("irAddress", 0));
    char    buf[12];
    uint8_t cmd = 0;
    for(uint i = 0; i < numButtons; i++) {
        sprintf(buf, "button_%d", i);
        cmd = pref.getShort(buf, 0);
        ir.set_irButtons(i, cmd);
    }
}

line 3278 from main.cpp

    if(cmd == "loadIRbuttons"){    loadIRbuttonsFromNVS(); // update IR buttons in ir.cpp
                                   char buf[150];
                                   uint8_t* buttons = ir.get_irButtons();
                                   sprintf(buf,"0x%02x,", ir.get_irAddress());
                                   for(uint8_t i = 0; i< 20; i++){
                                        sprintf(buf + 5 + 5 * i, "0x%02x,", buttons[i]);
                                   }
                                   buf[5 + 5 * 20] = '\0';
                                   webSrv.reply(buf, webSrv.TEXT); return;}

clear-sky avatar May 22 '24 18:05 clear-sky

Hi dear Wolle! my problem is "buf " values especially in this line buf[5 + 5 * 20] = '\0';

clear-sky avatar May 24 '24 18:05 clear-sky

Hi clear-sky, that won't be enough, the remote control code is stored in NVS for each button. Then the button must be assigned a function. This is currently lacking. One idea might be to assign buttons to several functions, such as audio player, DLNA or ...

schreibfaul1 avatar May 25 '24 10:05 schreibfaul1

Hi Dear Wolle! Have you enough time to add ir buttons?

clear-sky avatar Aug 07 '24 06:08 clear-sky

Hi clear-sky, there are enough ideas. Now I want to fix the bugs after the last update, the new AAC decoder does not always work. I would like to extend the OPUS decoder so that streams work in hybrid mode. The IR will not continue until the end of fall.

schreibfaul1 avatar Aug 08 '24 16:08 schreibfaul1

If possible, add at least one on/off button. At the same time, keep the ability to turn the radio off by long pressing the "mute" button so that you can turn the radio off with a remote that does not have a separate on/off button.

valera39 avatar Aug 08 '24 18:08 valera39

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Mar 17 '25 02:03 github-actions[bot]

This issue was closed because it has been inactive for 14 days since being marked as stale.

github-actions[bot] avatar Mar 31 '25 02:03 github-actions[bot]