I played a little with the ‘Infrared’ of the Flipper Zero. For longer my plan was to put all .ir files into a searchable database to perform more analysis.
Now I’ve done it - at least the first step. There is a lot of space for improvement, but today I was able to made my first queries.
The Project: FlipperMgmt/irfiles_import.py at main · LupusE/FlipperMgmt · GitHub
Because I’ve organized all my git clones in one subfolder, the expected path is …/Flipper-IRDB/ and the result will be written in …/.
You can open the database with any SQLite (or SQLite-able) Client.
If you’d like to know what are the most used ‘Power’ address/command pairs:
SELECT name,address,command, COUNT(name) FROM irbutton WHERE name like 'Power' AND Type like 'parsed' GROUP BY address,command ORDER BY COUNT(name) DESC
or if you’d like to just find the TV power commands:
SELECT name,address,command, COUNT(name) FROM irbutton LEFT JOIN irfile ON irbutton.md5hash = irfile.md5hash WHERE name like 'power' AND category = 'TVs' AND Type like 'parsed' GROUP BY address,command ORDER BY COUNT(name) DESC
- Write a file exporter
– Write a Android tool to generate files …
– … or a web frontend?
- Write a documentation
- normalize the data
- Write a check (based on MD5) to update the db
– Write an output to MySQL/MariaDB/MS SQL/Postgress/…
- Cleanup the code
As said before, the files are not very uniform. So one next step is to analyze the ‘irbutton.name’ and write a translation table… but not today.