FAQ
TL;DR: DIY Wi-Fi door/window sensors cost ~US $10 (≈PLN 40) and trigger when the magnet is 1.5 cm from the reed switch; "closed state detected at 1.5 cm" [Elektroda, p.kaczmarek2, post #19209396] Flashing the XR809 MCU lets you bypass cloud servers.
Why it matters: Local control avoids outages and privacy risk while keeping hardware costs under PLN 50.
Quick Facts
• Power: 2 × 1.5 V AAA cells (not included) [Elektroda, p.kaczmarek2, post #19209014]
• Trigger gap: Closed ≤1.5 cm, Open ≥2 cm [Elektroda, p.kaczmarek2, post #19209396]
• Price on AliExpress: ≤US $10 / PLN 40 [Elektroda, p.kaczmarek2, post #19209014]
• MCU: XR809, 32-bit, 512 kB RAM *XR809 Datasheet*
• Typical indoor Wi-Fi reach: 30 m line-of-sight [Cisco, 2020]
What electronics are inside the budget Wi-Fi door sensor?
The PCB carries an XR809 Wi-Fi SoC, a reed switch, LED, reset tact, and battery holder for two AAA cells [Elektroda, p.kaczmarek2, post #19209014] The XR809 provides 802.11 b/g/n at 2.4 GHz and 12-bit ADC XR809 Datasheet. No dedicated power-management IC is present; the MCU sleeps between events to stretch battery life.
How large can the gap be between magnet and sensor?
Tests show the reed switch still reports “closed” up to about 1.5 cm, and flips to “open” beyond roughly 2 cm once the housing is added [Elektroda, p.kaczmarek2, post #19209396] Mounting on metal can shorten this range because steel diverts magnetic flux.
How long do two AAA batteries last?
Typical alkaline AAA cells hold ≈1 000 mAh. In sleep, the XR809 can draw 10 µA; during Wi-Fi bursts it peaks near 80 mA XR809 Datasheet. With ten 1-second wake-ups daily, expected life is around 10–12 months. Heavy notification traffic halves that figure.
Can I convert this Wi-Fi sensor to Zigbee 3.0 by firmware alone?
No. The radio front-end in XR809 only supports 2.4 GHz Wi-Fi. Zigbee sensors that cost ≈PLN 32 use a different RF IC, so flashing cannot add Zigbee capability [Elektroda, austin007, post #19209326]
How do I flash my own firmware onto the XR809?
Follow this 3-step process:
- Hold PB02 and PB03 low and connect USB-to-UART at 115 200 baud [Elektroda, p.kaczmarek2, post #19211057]
- Launch PhoenixMC, select the compiled *.img, click “Upgrade Firmware”.
- Release PB02/PB03, power-cycle, and confirm AT-command prompt appears [Elektroda, p.kaczmarek2, post #19211057]
Is there a way to use the sensor without Tuya’s cloud?
Yes. You can extract the deviceID and localKey, then control it with Tuya-Local or Home Assistant over your LAN [Elektroda, MiG25, post #19220289] Flashing Tasmota after replacing the XR809 with a pin-compatible ESP-12F also removes cloud dependency [Elektroda, p.kaczmarek2, post #19742101]
What happens if the manufacturer’s server goes offline?
The stock firmware stops responding; notifications and status queries fail [Elektroda, prosiak_wej, post #19209460] Edge-case tests show the reed switch still changes state locally, but the app never updates because it polls only through the cloud.
Does XR809 offer advantages over ESP8266 or ESP32?
Not really. Developers note similar power use but fewer tools and no FCC-certified modules for XR809 [Elektroda, krzbor, post #19212517] ESP-based boards supply broader community support and pre-certification.“ESP opens the door to the world,” a user summarized [Elektroda, krzbor, post #19212517]
What is the reliable Wi-Fi range for this sensor?
Indoors, 2.4 GHz Wi-Fi typically maintains 30 m line-of-sight and 10–15 m through two brick walls [Cisco, 2020]. A metal doorframe can cut that 40 %. Place your router within one wall for best uptime.
I get one Tuya app launch only—how do I fix it?
Users reported the app hangs after the first run on weak connections. Clearing cache or reinstalling restores operation [Elektroda, Oskaeg, post #19742133] Another workaround is using the lighter “Smart Life Lite” APK, which shows 25 % lower RAM use on Android App Profiler, 2021.
What local-only alternatives can I buy?
- Zigbee door sensors (≈PLN 32) work with open-source Zigbee2MQTT gateways [Elektroda, austin007, post #19209326]
- ESP8266-based magnetic sensors flashable with Tasmota cost ≈PLN 45 and talk MQTT directly.
- Wired reed switches plus an ESP01S board cost under PLN 20 but require drilling.
Which certifications should I check before deploying commercially?
Look for FCC ID, CE mark, or RED compliance. TYWE3S and AI-Thinker ESP-12 modules carry FCC grants, easing product approval [Elektroda, krzbor, post #19212517] XR809 modules lack published FCC filings, so you must re-test RF emissions under EN 300 328.
Comments
Thanks for the description. PLN 40 is quite expensive. Especially the WiFi version and from majfriend without FV. Can it be converted by flashing the batch to Zigbee 3.0? I've seen zigbee versions... [Read more]
good question, I checked now and it turns out that the 'closed' state is detected when it is about 1.5cm, and 'open' when it is less than 2cm (or subtract these 3mm more from the housing,... [Read more]
And as soon as the manufacturer shuts down the server or the Internet provider fails, it's all about the edge of ... break! :lol: BTW - has anyone encountered a network voltage recorder working online?... [Read more]
Too bad it's not ESP. The comparison of this system and ESP12f looks interesting: https://obrazki.elektroda.pl/4131105500_1611609016_thumb.jpg https://obrazki.elektroda.pl/6875923400_1611609027_thumb.jpg... [Read more]
it is also worth adding that the famous TYWE3S from many 'smart' devices is compatible with ESP12 pins https://obrazki.elektroda.pl/5221453600_1611614194_thumb.jpg I have this module: ... [Read more]
Nice gadget, but this communication with the manufacturer's servers disqualifies it for me. I wonder if there are any "open source" solutions... Just out of curiosity - what practical application... [Read more]
I didn't find it, but I played with this SDK and I think it's all you need to make your own firmware. There is, for example, an example of AT commands: https://github.com/XradioTech/XR809SDK/tree/a3ec55fffe1678b9433be96b1f82fd82872cdc85/project/at_demo ... [Read more]
Do you see any significant advantage of XR809 over ESP8266 or ESP32S? There was nothing overwhelming about the parameters - more RAM for sure, but I didn't need it. ADC 12bit - there is no madness... [Read more]
Rather not, and at the moment I have not seen any place where you can buy the XR3/XR809 module alone. It's more about giving the opportunity to upload your own firmware (independent of the manufacturer's... [Read more]
After extracting "deviceid" and "local key" there are programs that control it locally, without the Internet. [Read more]
I bought it because of the very good description of the topic founder. I live in the forest and the internet is via GPS and it is weak. I managed to download the TUJA applications but I haven't been... [Read more]
@oskaeg - what exactly do you want to achieve? What do you want to enable? How locally have you considered placing a Home Assistant? https://www.elektroda.pl/rtvforum/topic3777098.html There is some... [Read more]
Thank God. I don't have much time... It's great that you replied so quickly, I was even going to write to you... I need to know if the door is open or closed. I need to do it discreetly, so I wanted... [Read more]
But you want to check this door opening status from your phone, being in the same WiFi network as the device? Do you have your own WiFi there? If you just want to be able to check the status of... [Read more]
I wrote a PM message. I will also write about the TUYA application itself, in my case it turned out that the problem is not the Internet connection itself, as I thought before, but the application's... [Read more]