Firefly Smart Sub-GHz and Infrared Gateway
by G-Labs

Open media
Firefly is an open-source smart home hub that integrates traditional devices, including air conditioners, TVs, motorized gates, and remote-controlled sockets—into your connected home via Wi-Fi. The hub unifies standard IR remotes, 433/315 MHz radio frequency remotes, and classic X10 devices into a single app.
What you can do with Firefly :
Even though it is a DIY project, building it is surprisingly simple. There is no messy wiring and zero soldering needed: standard, ready-made electronic modules plug directly into the Firefly board like Lego bricks, fitting neatly inside a 3D-printed translucent case that doubles as a decorative soft light.
Instead of a single, complex circuit board, Firefly relies on four separate, interchangeable modules. Each component handles a dedicated task and connects directly to the main board via standard pin headers:

Waveshare ESP32-S3-Zero
CC1101 433MHz 8-pin SPI Wireless Module with SMA antenna
5V High-Power Infrared Transmitter 3-pin
KY-022 IR Receiver ModuleAll four components are standard, widely produced electronic modules that cost very little. They are readily available on major marketplaces (such as AliExpress, Amazon, or eBay) and can be snapped together in less than 5 minutes—making it an accessible, rewarding build for anyone.
In short, to build your own Firefly gateway, simply get these four modules and plug them into the Firefly board. You can get this board (PCB) and its 3D-printed case by ordering them from online fabrication services like JLCPCB or PCBWay using the open-source Gerber and 3D print files provided below.
With the Firefly gateway and the HomeGenie Panel app, you can easily capture commands sent by your existing remote controls and wireless sensors. Once recorded, these sequences can be replayed on demand or scheduled automatically using the built-in Scheduler, without writing a single line of code.




You can use this exact same workflow to automate and control virtually any IR or RF device in your home:
HomeGenie Panel lets you connect multiple Firefly gateways. Since you can also choose to enable remote access over the Internet, you can effortlessly control multiple devices across different rooms and locations using a single app!
The Firefly gateway comes with a powerful built-in scheduler that lets you automate devices completely locally, without relying on third-party cloud subscriptions or internet connectivity:


<hex_code>/<repeat_count>/<repeat_delay_ms>00260009A5A3.../3/100 sends the code 3 times with a 100 ms interval between signals (defaults are 1 repeat and 1 ms delay if omitted).
Besides time-based events, the built-in Firefly Scheduler can also trigger actions based on incoming IR and RF signals, such as toggling lights, relays, or scenes whenever a specific wireless button is pressed.
sensors Capture the Signal: Press the physical remote-control button or wireless switch. Firefly intercepts the transmission and logs the unique packet under the "Receiver.RawData" property (e.g., C117D3E8).
alt_route Create Event Trigger & Link Devices: Access the menu of the widget (⋯) to open the schedule manager and tap the Add (+) button to create a new rule:



Integrating Firefly with HomeGenie Server is seamless and straightforward. Like all devices running the HomeGenie Mini firmware, once connected to Wi-Fi, Firefly is automatically discovered by HomeGenie Server and appears among the UPnP modules.

Click the Connect button on the Firefly widget to link HomeGenie Server to Firefly over a persistent MQTT channel. Once connected, the IR and RF modules—along with any other hardware modules implemented on the Firefly device—will immediately become available in HomeGenie.

Clicking the Modules button on the Firefly widget opens a dialog displaying the widgets for all modules available on Firefly (IR, RF), allowing you to add them directly to any dashboard group.

Once integrated with HomeGenie Server, all Firefly transceiver modules become native building blocks within the automation engine. You can create automation scripts that react in real time to incoming IR, RF, and X10 signals—such as triggering complex scenes whenever a wireless button or security sensor is activated. Centralized schedules can also broadcast IR and RF commands to automate traditional devices.
This brings different technologies together: a simple 433 MHz wall switch or an ordinary IR remote button can directly toggle modern ZigBee or Z-Wave lights throughout your home. It provides the ideal balance between everyday convenience and security: fast, battery-friendly physical controls for daily lighting, while keeping sensitive operations (such as smart door locks) protected on encrypted protocols.
FireflyUse these files to order the PCB and 3D-printed case from manufacturing services such as JLCPCB or PCBWay.
PCB Gerber download REV. 4A (v1.2+)
3D-Printed Case (3MF) download REV. 3A (v1.2+)The 3D case archive includes two versions of the 3MF project to ensure broad slicer compatibility. For the best light diffusion from the onboard status LED, printing in natural/translucent PETG or PLA is recommended. Select the appropriate file based on your slicing software:
firefly-enclosure-3a.3mf
Default project file with embedded slicer modifiers (recommended for PrusaSlicer, Bambu Studio, OrcaSlicer).
firefly-enclosure-3a-nm.3mf (No Modifiers)
Alternative version without slicer modifiers. Use this file for slicers that do not support 3MF modifier meshes to ensure proper slicing and printing.
Firefly PCB: requires the following header sockets:Modules you will need to source in order to complete the gateway:
It is recommended to power the device from a 5V USB power supply of at least 1A (2A preferred).
Connect your ESP32/ESP8266 microcontroller to your computer via USB, select your firmware version, and click "Create device" to upload the HomeGenie Mini firmware.
Installing firmware directly from this page works only in browsers with Web Serial API enabled.
First, ensure that you do not have multiple ESP devices connected to your USB ports. Please connect only one device at a time.
If only one device is connected and the firmware uploader still fails to connect (or gets stuck at "Connecting..."), your device might need to be put into Boot Mode manually. (This is often required with development boards such as the classic ESP32-CAM).
START THIS PROCEDURE AFTER THE PORT SELECTION WINDOW APPEARS.Firefly exposes a clean REST API for seamless integration with third-party applications and custom scripts:
# Send an IR signal (e.g. TV Power)
curl "http://<device_ip>/api/HomeAutomation.RemoteControl/IR/Control.SendRaw/0000006D.../1/100"
# Send a raw 433.92 MHz RF packet
curl "http://<device_ip>/api/HomeAutomation.RemoteControl/RF/Control.SendRaw/C133E068/10/100"
# Turn ON X10 module A1
curl "http://<device_ip>/api/HomeAutomation.X10/A1/Control.On"
# Set Dimmer A2 to 50%
curl "http://<device_ip>/api/HomeAutomation.X10/A2/Control.Level/50"Pre-compiled binaries and source code are open-source on GitHub:
In addition to the common Device API, this device implements the following modules and API.
IR moduleIR module is associated to IR transceiver hardware.
HomeAutomation.RemoteControl/IR
Receiver.RawDataControl.SendRaw/<raw_hex_string>/<repeat_count>/<repeat_delay_ms>RF moduleRF module is associated to RF transceiver hardware.
HomeAutomation.RemoteControl/RF
Receiver.RawDataControl.SendRaw/<raw_hex_string>/<repeat_count>/<repeat_delay_ms>X10 moduleRF module is associated to RF transceiver hardware.
HomeAutomation.X10/RF
Receiver.RawDataControl.SendRaw/<raw_hex_string>/<repeat_count>/<repeat_delay_ms>