Skip to content
Back to search

ir-studio

Pure-Go 38 kHz Infrared Studio for M5Stack CardputerZero (/dev/lirc*, Flipper .ir, on-device IR ML, Smart AC, GEN:TV-B-Gone, MCP server)

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/igenexxx--ir-studio/badge.svg)](/listings/igenexxx--ir-studio)

HTML

<a href="/listings/igenexxx--ir-studio"><img src="/api/listings/igenexxx--ir-studio/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 122 lines
  1. # IR Studio
  2. Native 38 kHz Infrared transceiver studio, multi-protocol encoder/decoder, Flipper Zero `.ir` library manager, Universal Power-Off `PROBE`, multi-device `MACRO` runner, and on-device pure-Go IR ML engine for the **M5Stack CardputerZero** (`/dev/lirc*`, `320×170` RGB565 `/dev/fb0`, 46-key TCA8418 `evdev` keyboard).
  3. Built in pure Go (`CGO_ENABLED=0`, zero external runtime dependencies, zero `lircd`/`ir-ctl` subprocesses) with automatic **`SIM`** fallback when no `/dev/lirc*` hardware is attached.
  4. > [!CAUTION]
  5. > **Legal & Responsible Use Disclaimer:** This software is provided strictly for **educational, research, diagnostics, and authorized control** of infrared appliances and hardware that you own or have explicit permission to operate. Unauthorized disruption, tampering, or interference with third-party equipment, public displays, or commercial/industrial systems is strictly prohibited and may be punishable by law. Provided **"AS IS"** without warranty of any kind; use entirely at your own risk.
  6. ---
  7. ## Features
  8. - **Live IR Capture, Oscilloscope, Carrier Measurement/Sweeper & ML Denoiser (`RX`):** Streams `/dev/lirc*` `LIRC_MODE_MODE2` pulses off the UI thread, enables hardware RX carrier frequency measurement (`LIRC_SET_MEASURE_CARRIER_MODE` / `LIRC_MODE2_FREQUENCY`) when supported, decodes `NEC`, `NECext`, `Samsung32`, `RC5`, `RC6`, `SIRC`, and `Kaseikyo`, monitors live **Ambient IR Interference** (`CLEAN` / `MODERATE` / `SATURATED`), rescues jittery captures with the **1D K-Means IR Pulse Denoiser (`ML-CLEAN`)**, sweeps held captures across `36 / 38 / 40 / 56 kHz` (`5 SWEEP` / `R`), and matches single buttons against `Flipper-IRDB` via **8D IR Fingerprint k-NN**.
  9. - **Virtual Remote Deck & Smart AC Controller (`REMOTE` + `AC`):** 2-column scrollable button pad for any `.ir` file with hold-to-repeat transmission, one-tap **Carrier Frequency Sweeper (`5 SWEEP`)**, lossless **Pronto Hex (`0000 006D ...`)** import/export (`ParseProntoHex` / `FormatProntoHex`), in-place `LEARN+` (`6`), `RENAME` (`R`), and `DEL` (`7`) authoring for `USER` remotes, one-key `PROMO` from read-only database packs, plus an interactive **Smart AC State-Frame Controller (`1` or `8 AC`)** with checksummed parametric encoders for `Gree`, `Midea`, `Daikin`, `LG_AC`, `Samsung_AC`, and `Mitsubishi`.
  10. - **Universal Power-Off, Built-in `GEN:TV-B-Gone` & `GEN:TV-Service` Packs (`PROBE`):** Ships with two compiled-in read-only virtual packs ready immediately before `--sync`: **`GEN:TV-B-Gone`** (top-100 offline universal `Power` codes across TVs, Projectors, and Soundbars) and **`GEN:TV-Service`** (discrete `Power_ON`/`Power_OFF`/`HDMI_1..4` and vendor service commands such as LG `IN_START`/`EZ_ADJUST`, Samsung service codes, Sony/Panasonic/Philips discrete remotes), plus synced read-only `.ir` packs (`~/ir-studio/databases/<pack>/`), Action Filters (`Power`, `Cool`, `Mute`), **Smart Probe Ranking (`R`)**, instant `STOP` (`4` / `Space`), 12-slot `>` / `*` rewind markers, single-shot `5 TRY`, and one-key `6 SAVE` (`PromoteToUser`).
  11. - **38 kHz IR Optical Data Modem, Tripwire, Flicker Meter & RPM Tachometer (`internal/irmodem`, `internal/irml`, `internal/lirc`):** Pure-Go framed optical modem (`<= 64 B` payload + CRC-8-CCITT, tolerating `±120 µs` jitter), bounded 38 kHz reflective/beam-break **Optical Tripwire** probe, RX-only **LED/Screen PWM Flicker Meter** (0-alloc IEEE 1789 eye-safety classification: `SAFE` / `LOW_RISK` / `HIGH_FLICKER` / `NO_FLICKER`), and **Optical IR RPM Tachometer** (38 kHz probe + median-filtered blade-division `1..12` blades with `SIM` fallback and guaranteed `38 kHz / 33%` restore).
  12. - **Dual-Scope `.ir` Library (`SAVED`):** Strictly isolates your read-write **User Library** (`~/ir-studio/remotes/`) from read-only **Database Packs** (`~/ir-studio/databases/<pack>/`). Supports `[x]` multi-select (`Space`/`1`/`D`), 2-step batch `DEL`, and ML-powered **`PURGE`** for noise-only captures.
  13. - **Multi-Device IR Macros (`MACRO`):** Chains commands across multiple User Library remotes with configurable `50–10000 ms` delays (`~/.config/ir-studio/macros.json`, `0600`) and instant mid-run `context.Context` cancellation.
  14. - **Hardware, DB Sync & Opt-In MCP (`SET`):** Configure `/dev/lirc*` device, TX carrier (`36 / 38 / 40 / 56 kHz`) and duty cycle (`33% / 50%`), manage and incrementally sync HTTPS `Flipper-IRDB` sources (`ETag`/`SHA` delta sync), and toggle the opt-in **MCP Server**.
  15. ---
  16. ## 6-Tab Controls (46-Key TCA8418)
  17. ### Global Keys
  18. | Key | Action |
  19. | :--- | :--- |
  20. | **`Tab`** / **`9`** / **`0`** | Cycle active tab (`RX` → `REMOTE` → `PROBE` → `SAVED` → `MACRO` → `SET`) |
  21. | **`F` / `X` / `Z` / `C`** (or Arrows) | Up / Down / Left / Right navigation across lists, grids, waveform pan, and settings |
  22. | **`4` `5` `6` `7` `8`** | Context-sensitive bottom softkeys aligned at `x = [49, 105, 161, 217, 273]` |
  23. | **`Enter`** | Primary action (Send button, Start/Stop Probe, Open remote, Run macro, Toggle setting) |
  24. | **`Space` / `1` / `D`** | Toggle `[x]` multi-select (`SAVED`, `PROBE`, `SET → Sources`); `Space` also stops active `PROBE` |
  25. | **`R`** | Trigger **Smart Probe Ranking** in `PROBE` tab (sort pack by 8D IR cosine similarity) |
  26. | **`H`** | Toggle 5-page built-in Help modal (`Z`/`C` flips pages `1/5..5/5`) |
  27. | **`Esc`** / **`Backspace`** | Cancel active TX/RX/Probe/Macro, close modal, or exit cleanly (restores 38 kHz / 33% defaults) |
  28. ### Per-Tab Bottom Softkeys (`4` – `8`)
  29. | Tab | `4` | `5` | `6` | `7` | `8` |
  30. | :--- | :--- | :--- | :--- | :--- | :--- |
  31. | **`RX`** | `HOLD` / `LEARN` | `CLEAN` / `SWEEP` | `DIFF` (AC) | `SAVE` | `CARR` (36–56k) |
  32. | **`REMOTE`** | `SEND` | `SWEEP` (36–56k) | `LEARN+` | `DEL` | `AC` / `PROMO` |
  33. | **`REMOTE → AC`** | `PWR` | `FAN` | `SWING` | `SEND` | `SAVE` (`AC_*.ir`) |
  34. | **`PROBE`** | `RUN` / `STOP` | `TRY` | `SAVE` | `ACT` (Filter) | `PACK` (`GEN:TVBG`) |
  35. | **`SAVED`** | `OPEN` | `SEND` | `PROMO` / `PURGE` | `DEL` | `SRC` (User/DB) |
  36. | **`MACRO`** | `RUN` / `STOP` | `NEW` | `ADD` | `DEL` | `EDIT` |
  37. | **`SET`** | `TOGGLE` | `SYNC` | `ADD` (Src) | `DEL` (Src) | `SAVE` |
  38. ---
  39. ## CLI Flags
  40. ```bash
  41. # Launch interactive 320x170 UI in offline simulator mode (no /dev/lirc* required)
  42. ir-studio --sim
  43. # Headless hardware diagnostic: discover /dev/lirc*, print features & ambient IR status, exit
  44. ir-studio --probe
  45. # Run incremental ETag/SHA delta sync for all enabled Flipper-IRDB sources and exit
  46. ir-studio --sync
  47. # Run pure-Go JSON-RPC 2.0 stdio MCP server (requires mcp_enabled: true in Settings)
  48. ir-studio --mcp
  49. ```
  50. ---
  51. ## Built-In MCP Server (SSH Opt-In)
  52. The pure-Go stdio **MCP Server** is **disabled by default** (`~/.config/ir-studio/config.json` → `"mcp_enabled": false`). Enable **MCP Server** inside the **`SET`** tab, then connect an AI agent directly over SSH:
  53. ```bash
  54. ssh <cardputer-host> /usr/share/APPLaunch/bin/ir-studio --mcp
  55. ```
  56. ### Exposed MCP Tools (30 Tools)
  57. | Group | Tool Names | Safety Gates |
  58. | :--- | :--- | :--- |
  59. | **Status & RX** | `ir_get_status`, `ir_learn_signal` | Serialized via `lircMu`; `context.Context` timeout (`500–15000 ms`); hardware `LIRC_MODE2_FREQUENCY` reporting when supported |
  60. | **TX, AC, Sweep & Macros** | `ir_transmit_button`, `ir_send_ac_state`, `ir_sweep_carrier`, `ir_run_macro`, `ir_list_macros` | TX/AC/Sweep tools require **`confirm_ir: true`**; repeat cap `<= 5`; macro cap `<= 30 s`; guaranteed `38 kHz / 33%` carrier restore |
  61. | **Pronto Hex, Modem & Optical Lab** | `ir_import_pronto`, `ir_export_pronto`, `ir_modem_send`, `ir_modem_recv`, `ir_tripwire_probe`, `ir_measure_flicker`, `ir_measure_rpm` | `ir_modem_send`, `ir_tripwire_probe` & `ir_measure_rpm` require **`confirm_ir: true`**; `ir_measure_flicker` is RX-only (`window_ms: 200..5000`); `ir_measure_rpm` divides by `blades: 1..12` and restores `38 kHz / 33%` |
  62. | **On-Device ML** | `ir_analyze_pulses`, `ir_classify_signal`, `ir_match_fingerprint`, `ir_rank_probe_pack`, `ir_purge_noise` | `ir_purge_noise` defaults to **`dry_run: true`**; deletion requires `confirm: true` (User Library only) |
  63. | **Library & Packs** | `ir_list_remotes`, `ir_read_remote`, `ir_save_remote`, `ir_delete_remote`, `ir_list_databases`, `ir_promote_remote` | Path-sandboxed (`1 MiB` cap); includes compiled-in read-only `GEN:TV-B-Gone` & `GEN:TV-Service` (`virtual: true`); `ir_delete_remote` requires **`confirm: true`** |
  64. | **DB Sources** | `ir_list_sources`, `ir_add_source`, `ir_remove_source`, `ir_sync_sources`, `ir_delete_pack_files` | HTTPS-only URLs; `ir_remove_source` & `ir_delete_pack_files` require **`confirm: true`** (virtual packs rejected) |
  65. ---
  66. ## Build, Test & Packaging
  67. ```bash
  68. # Run full unit, fuzz-seed, and race-detector test suite
  69. go test -race -cover ./...
  70. # Regenerate 320x170 & 640x340 UI screenshots + 256x256 icon
  71. go run ./cmd/shots
  72. # Cross-compile ARM64 binary (CGO_ENABLED=0) and build APPLaunch .deb package in dist/
  73. ./scripts/build_deb.sh
  74. ```
  75. Deploy to CardputerZero (non-root execution via Linux `lirc`, `video`, and `input` groups):
  76. ```bash
  77. scp dist/ir-studio_*_arm64.deb cardputer@<CARDPUTER_IP>:~
  78. ssh cardputer@<CARDPUTER_IP> "sudo dpkg -i ~/ir-studio_*_arm64.deb"
  79. ```
  80. ---
  81. ## Documentation & Interactive Learning Portal
  82. Full step-by-step guides, 38 kHz Infrared & LIRC theory, on-device ML architecture, Flipper-IRDB pack workflows, and an interactive **IR Protocol & 1D K-Means Waveform Lab** live in the shared Learning Portal:
  83. - [Learning Portal (Local Relative Link)](../learning-portal/index.html)
  84. - [IR Studio App Guide & Controls](../learning-portal/content/ir-studio/guide.md)
  85. - [Infrared, LIRC & Protocol Theory](../learning-portal/content/ir-studio/ir-domain.md)
  86. - [On-Device IR ML: Denoiser, Classifier & Fingerprint](../learning-portal/content/ir-studio/ir-ml.md)
  87. - [Domain Glossary](../learning-portal/content/glossary.md)

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.