CoretechR / OMOTE

Open Source Remote Using ESP32 and LVGL
https://hackaday.io/project/191752
GNU General Public License v3.0
1.02k stars 114 forks source link

IR learning abilities #10

Open Jonas-fr opened 11 months ago

Jonas-fr commented 11 months ago

Would you consider adding an IR-receiver to allow IR-learning abilities (via a future firmware update) to this remote? It will vastly expand the use-cases for it.

Dark1886 commented 11 months ago

I also believe this would be a good feature, But I think for right now I will just end up using an outboard IR receiver to read the IR codes to be programmed.

EDIT: I noticed there was a IR receiver built-in after posting this, but the @CoretechR beat me to the update.

Jonas-fr commented 11 months ago

This modular approach is sound! Do you have more details about such an external IR receiver and where it could be plugged in on the current remote?

riker09 commented 11 months ago

Not sure if it can be helpful here, but there is Flipper Zero, a hacker tool similar to this project that allows reading IR codes (and replay them).

CoretechR commented 11 months ago

There's an IR receiver built into the remote already (U6). Learning codes is currently not used in the software, but I have tested that the sensor works.

P1030341

Jonas-fr commented 11 months ago

Not sure if it can be helpful here, but there is Flipper Zero, a hacker tool similar to this project that allows reading IR codes (and replay them).

I know very well about it but it's too expensive just for one use case (IR learning).

There's an IR receiver built into the remote already (U6). Learning codes is currently not used in the software, but I have tested that the sensor works.

P1030341

My bad, I didn't saw it along with IR LEDS. Well this is perfect ! Would you be open to future PR regarding IR learning functions then or do you want to focus on the TX side for now?

CoretechR commented 11 months ago

I can't promise anything right now. Honestly I wanted to take a break from this project as I have put too much time into it already. But since so many people seem interested, I might have to keep working on it.

For my previous OLED keyboard project, I created a windows UI for configuring the screens. I imagine something similar could be done with the remote. A web interface hosted on the ESP32 would make it cross-platform, but I'm not sure about the performance. The IR learning would be part of that interface.

Jonas-fr commented 11 months ago

You don't have to promise anything, you can (should!) take a break whenever you like! I was just asking if that (RX abilities) would be a direction you'd like for this project in the short/middle term or not.

Anyway thank you for all the work you've already put into this project!

Dark1886 commented 11 months ago

Just adding an idea that could help with IR command learning, could the commands be added into the eeprom locations to allow dynamic changing without needing to hardcode into the values in the source code. I'm hoping to work on this when I can get my hands on the parts.

CoretechR commented 11 months ago

@Dark1886 Sure, the flash memory of the ESP32 would be the best place to store the commands. You're welcome to try an implement this.

Dark1886 commented 11 months ago

Just a thought, If adding IR learning functionality on-board may be difficult, an IR reading mode could be implemented that could spit out the received IR signal to some serial/http Post/MQTT log. It doesn't directly learn the function, but it could make capturing and programming the IR codes a lot more simple.

KlausMu commented 5 months ago

I implemented an IR receiver, looks like this: 20240117_083432_cr_klein 20240117_083501_cr_klein

Even recognizes the codes which the OMOTE is sending by itself :-)

But it is only showing the received IR codes, it does not store them anywhere. Because then you would need code to assign the learned IR code to keys or touch events. And that is much more complex. So after receiving an IR code, you have to put that IR code into the C++ code to use it.

I can publish this later. But currently I'm still working on some other features. I'm afraid my IR receiver code can not be provided as a pull request to the original source file. I did more or less a complete rewrite. I used a more modular approach, with separation of code into devices (describing their abilities), the gui parts (single files for each device), the user interfaces (keypad, touch), and a command pattern for sending and receiving commands like INCREASE_VOLUME, beside some other stuff. Overall more than 40 (small) files. But (at least to me) much better understandable and customizable than a single file with >1000 lines. Still need some time to finish it. So stay tuned ...