Create App to Mute TV then Auto Unmute After Ad

Want to be able to set timer for flipper to auto unmute TV. If streamer says ads will last 2:00 flipper could be set to send unmute signal in 1:55

I know nothing about code but really want this lol. How the hell would I learn how to do this, what can I do to help etc. :blush:

This might point you in the right direction. You would want to learn C to create Flipper apps.

Ok Iā€™ll try and work on learning C and the successive ir thing is awesome! I was actually looking for that feature!

Shewww this stuff is overwhelming lolā€¦how do I even open a flipper file to view the contents? I would like to start looking at the coding language but donā€™t even know where to start with that. Sorry Iā€™m just sooo many levels below you all, but have always found this stuff very interesting!

1 Like

Everyone has to start somewhere. C is a lower level language and is more difficult to learn then something like Python. Maybe you should start by finding some beginning tutorials on C. You probably want to stay away from C#, C++, and Objective C because much of that wonā€™t be relevant. Those are extended versions of C.

https://www.youtube.com/results?search_query=learn+C+-ā€œC%23ā€+-ā€œC%2B%2Bā€

1 Like

Which flipper files are you trying to open? Most files for the protocols like the .nfc, .sub, .ir, etc. can be opened by downloading them to a computer and opening them in any text editor.

As for the applications (.fap) from what I understand that is the compiled code and cannot be opened as is. Since all of the official Flipper apps (and most of not all third-party apps) are open source, you can download the source code to take a look.

@jmr I hate the fact that the Flipper will likely make me learn C :frowning: I have been getting by with Python thus far in life because I am a lazy coder and I love having ready made libraries for whatever I want to do

Ok thanks for getting me pointed in the right direction! Iā€™ll start studying C!

Ok awesome thatā€™s what I needed to know! Iā€™ll start looking over the code!

In this thread here Successive IR Signals

Option 2 looks like you are editing the code in the assets folder. The library is ā€œFiletype: IR library fileā€

How can I add to the library to get the unmute code I need it to reference? I canā€™t seem to properly view any fap files.

What if I sent the unmute command then sent a trash command with a very low frequency which would create a delay for x number of seconds

Then send the unmute code again.

I was looking into delay functions and sleep functions but idk if I can even attempt that yet at this point.

Do my questions even make sense or am I way off track?

May need help finding the source code?

For example this code here has a time delay but I donā€™t see where I can download anything other than the fap file, which I donā€™t think I can view can I?

I donā€™t think this is the best way to go but hereā€™s where Iā€™m at so farā€¦I used the audio universal to send mute and then mute again to unmute

BUT I need to figure out how to program in a time delay

Filetype: IR library file
Version: 1

name: Mute
type: raw
frequency: 38000
duty_cycle: 0.330000
data: 4532 4446 526 474 526 474 526 500 500 475 525 1474 527 1501 500 500 500 500 500 1501 500 1501 500 1501 500 1501 500 499 501 499 501 499 501 499 501 4490 500 500 500 500 525 476 499 501 499 1503 498 503 497 503 497 503 497 1504 497 1504 497 1504 497 503 497 503 497 1504 497 1504 497 1504 496 503 497 503 497 503 497 1504 497 55319 4505 4472 499 501 499 502 498 502 498 503 497 1504 497 1504 497 503 497 503 497 1504 497 1504 497 1504 497 1504 496 503 497 503 497 503 497 503 497 4493 496 503 497 503 497 503 497 503 497 1504 496 503 497 503 497 503 497 1504 497 1504 497 1504 497 503 497 503 497 1504 497 1504 497 1504 497 503 497 503 497 503 497 1504 497 55315 4505 4473 498 501 499 502 498 502 498 502 498 1504 497 1504 497 503 497 503 497 1504 497 1504 497 1504 496 1504 497 503 497 503 497 503 497 503 497 4492 497 503 497 503 497 503 497 503 497 1504 497 503 497 503 497 503 497 1504 497 1504 497 1504 497 503 497 503 497 1504 497 1504 497 1504 497 503 497 503 497 503 497 1504 496

name: Mute
type: raw
frequency: 38000
duty_cycle: 0.330000
data: 4532 4446 526 474 526 474 526 500 500 475 525 1474 527 1501 500 500 500 500 500 1501 500 1501 500 1501 500 1501 500 499 501 499 501 499 501 499 501 4490 500 500 500 500 525 476 499 501 499 1503 498 503 497 503 497 503 497 1504 497 1504 497 1504 497 503 497 503 497 1504 497 1504 497 1504 496 503 497 503 497 503 497 1504 497 55319 4505 4472 499 501 499 502 498 502 498 503 497 1504 497 1504 497 503 497 503 497 1504 497 1504 497 1504 497 1504 496 503 497 503 497 503 497 503 497 4493 496 503 497 503 497 503 497 503 497 1504 496 503 497 503 497 503 497 1504 497 1504 497 1504 497 503 497 503 497 1504 497 1504 497 1504 497 503 497 503 497 503 497 1504 497 55315 4505 4473 498 501 499 502 498 502 498 502 498 1504 497 1504 497 503 497 503 497 1504 497 1504 497 1504 496 1504 497 503 497 503 497 503 497 503 497 4492 497 503 497 503 497 503 497 503 497 1504 497 503 497 503 497 503 497 1504 497 1504 497 1504 497 503 497 503 497 1504 497 1504 497 1504 497 503 497 503 497 503 497 1504 496

1 Like

I have a bit of experience with the universal remote .ir files. I ran 65 thousand on my Fire TVā€¦ TWICE! It was a long process. :rofl: 256 codes take around one minute and fifteen seconds to send. So just over 3 codes per second on average. There is some variation depending on the actual code. You donā€™t want to attempt to open .fap files because those are compiled binary. Instead you want to download the source code for them. The source code is human readable and you can edit it. Then after making edits you can compile it so it can run on the Flipper. I believe we still have to compile .fap files for the version of firmware we are running. Keep that in mind if you run into an incompatibility.
EDIT: You could send the following code hundreds of times as a delay. Notice that I called it Mute. You want the codes using the name of the button you want to press even if it doesnā€™t perform that function. It should send a code your TV doesnā€™t recognize. Iā€™ll see if I can find a better delay code.

#
name: Mute 
type: parsed
protocol: NEC
address: 20 00 00 00
command: 02 00 00 00

You can give this a try. It sends blank codes for about 2 minutes with a leading and trailing mute. I used my phone camera and the IR LED does not appear to send any signal accept the one at the beginning and end of the file. I donā€™t think there is any reason sending ā€œblankā€ pulses would be harmful to the Flipper but I canā€™t make guarantees.
audio.ir (148.8 KB)

So that git repo you linked is from a guy that just kind of collects a bunch of stuff for Flippers and then compiles it into a repo anyone can access. What you probably want is the official Flipper source code which can be found here https://github.com/flipperdevices/flipperzero-firmware/tree/dev/applications/main/infrared. This jumps directly to the infrared application code.

I will admit I am not familiar enough with C to point you in the right direction as far as where to begin modifying the code, but you may also want to read up on this https://github.com/DroomOne/Flipper-Plugin-Tutorial which explains creating a basic plugin/application for the flipper zero.

1 Like

The a brilliant work around!!! I could even add other delays via the other buttons! THANK YOU! Iā€™ll work on that some today and post the file!

1 Like

Awesome! Thanks for those resources! Yeah one hard thing for me has been sorting through the chaos of so many links and repos. Iā€™m sure theyā€™ll get more familiar as time goes on, but for now itā€™s a lot lol.

2 Likes

Still working on the codeā€¦it works great though just need to get the timings fine tuned! Will try and post file after Iā€™m able to finish it.