You are browsing as a guest. Sign up (or log in) to start making projects!

1h 50m 30s logged

Broadlink IR Learning App + Voice Guidance in Setup

The Edge-AI Home Monitoring System now has its own tool for learning IR signals, as well as voice guidance throughout the setup process.

What’s Added

Broadlink IR Learning App

  • New desktop application (customtkinter) that connects to a Broadlink device (RM-series) via broadlink.discover() and authenticates automatically.
  • Device type selection (TV / AC / Decoder) with dynamic list of commands depending on the type (on/off, channel up/down, volume, direction, menu, etc.).
  • “Learn & Save” function: Broadlink enters learning mode, waits for the signal from the real remote control and saves the hex packet.
  • The signals are stored in two places:
  • broadlink_codes.json — file-library of all codes per room/device/command.
  • devices_config.json — so that the device is automatically registered as an entry in the system’s main config, with flag is_broadlink_device: true.

Voice Guidance in Setup Wizard

  • Added text-to-speech (via pyttsx4, in a separate thread so as not to block the UI) to each step of the setup wizard: installing dependencies, downloading AI model, creating password, setting Tailscale, Telegram token/chat ID, and registering devices.
  • Each device type during registration (Tapo, Philips Hue, Shelly, Broadlink, etc.) now “explains” vocally which fields need to be filled in, making the process more accessible for someone who is setting up the system for the first time without reading documentation.
  • Also added broadlink as a new device type in the setup wizard dropdown, which opens the Learning App directly when selected.

Why It Matters

Until now, the system only supported devices with official APIs (Tapo, Hue, Yeelight, LG WebOS, Daikin). Many “dumb” devices at home (old ACs, decoders, TVs without smart features) are controlled only via IR remote — the Broadlink learning app paves the way to integrate virtually any device with an IR remote into the ecosystem, without the need for a special library per brand.

Voice guidance also makes setup more accessible — less need to read README step by step, the system tells you what to do live.

Challenges

  • async_connect of the Kasa class has incorrect syntax (await self.device = ... instead of self.device = await ...) — same problem as previous devlog, still pending.
  • In the Learning App, the device data is temporarily stored in two separate files (broadlink_codes.json and devices_config.json) — care must be taken to ensure that they do not become out of sync if a write fails in the middle.
  • The Broadlink device is always identified as devices[0] by broadlink.discover() — if there are multiple Broadlink devices on the network, the app will always connect to the first one found, without selection.
  • TTS requires CoInitialize/CoUninitialize on each thread (Windows-specific), which makes the code less portable to other OSes.

Next Steps

  • Full support for sending signals via Broadlink devices (not just learning) — i.e. new /api/broadlink endpoint and Broadlink class in the backend that will read the stored hex codes from broadlink_codes.json and send them via device.send_data().
  • Integrate Broadlink devices as actions in the Rule Engine, so they can be used in automations like any other device.
  • Wiring emit_device_event to Broadlink sends, so they can also be trigger sources.
  • Fix bug in Kasa.async_connect before any other work on Kasa progresses.
0
2

Comments 0

No comments yet. Be the first!