By 苏剑林 | December 05, 2022
Some time ago, I bought an XGIMI projector, only to realize after starting to tinker with it that XGIMI has almost nothing to do with Xiaomi—it simply cannot interact with XiaoAI. Among the many brands with "Mi" in their names, XGIMI is one of the few that cannot be integrated into the Mi Home ecosystem. I suspect many users were misled by the name XGIMI at first; the irony is that XGIMI projectors are even sold on the Xiaomi Mall (facepalms).
Since I already bought it and the seven-day no-reason return period has passed, I can't return it. I decided to try and "brute-force" some interaction to see if I could make it work.
Existing Solutions
First, I searched online. The reference solutions provided by netizens generally fall into several categories: one is using a "Mi Home Smart Plug + Power-on scheduled startup" to control the power (in fact, the main automation needed is just switching it on and off); another is connecting it to Home Assistant and controlling it via ADB; and a third is modifying the remote control by adding an infrared (IR) module to it, then using XiaoAI's IR remote control function.
Among these, the "Mi Home Smart Plug + Power-on startup" is relatively simple, but while it handles powering on, turning it off is difficult—can you only use the remote or resort to violent power cutting? The Home Assistant route is a long technical path that I won't consider for now. Modifying the remote control requires high manual skill (soldering). For those with poor manual skills, there are modification services on Taobao, or even pre-modified remotes (but they sell for 500 RMB). The advantage of modifying the remote is that it retains almost all functions, but once modified, the original remote is basically ruined and can only be used via voice IR. Also, to be honest, if you're going to modify the remote, why not just solder a Mi Home breaker directly to it? Why go through the extra step of IR?
Principle Analysis
In summary, the above solutions all have their own pros and cons, and none were particularly satisfying to me. After repeated searching, I finally found a "nearly perfect" solution that requires almost no modification and has extremely low hardware and learning costs.
The principle is simple. A method like modifying the remote is theoretically applicable to turning any appliance into a smart-controlled one. However, for an XGIMI projector, it is not just an appliance; it is also a computer running an Android operating system. What are the characteristics of a computer? It can be controlled by a mouse and keyboard, and there can be multiple mice and keyboards, both wired and wireless. We can view the projector's original remote as a Bluetooth keyboard for the "computer." Then, in theory, we can connect another wireless keyboard to control it. This way, the original remote remains unaffected while adding a new control channel.
However, there is a problem: most mainstream wireless mice or keyboards are based on Bluetooth or 2.4G communication. These methods are one-to-one, and XiaoAI cannot intervene. What communication methods can XiaoAI use? XiaoAI's only built-in external control method is Infrared. Therefore, we need an "Infrared Wireless Keyboard" (strictly speaking, we only need the receiver). I searched on Taobao, and such a thing actually exists, and it's not expensive!

Infrared to USB Module
The New Solution
What does this device do? It's simple: it can receive IR signals and map them to specific keys (it's programmable/learnable). It supports many keys, including conventional keyboard and mouse operations as well as multimedia operations. The multimedia section is shown below:

Infrared to USB configuration software
So, the logic is now very clear. Buy one of these IR learning modules, plug it into a computer, and open the configuration software. On the XiaoAI side (via a Mi Home IR Remote Hub), randomly add a projector remote. Place XiaoAI and the IR learning module in the same area. Press a button on the XiaoAI virtual remote (like the "Power" button). The configuration software will show the received signal. Map that signal to the corresponding function key (like "Shutdown") in the software. My tests confirm that keys like Shutdown, Volume Up/Down, Mute, OK, and Pause all work on the projector.
After the learning process is complete, plug it into the XGIMI projector's USB port. You can then use XiaoAI's IR remote to control the XGIMI projector. With IR control, you can also set up scenes for voice control. I won't go into detail on those. Overall, there are only two function keys that cannot be learned. The first is XGIMI's own voice input key; XGIMI's voice control uses "near-field voice," with the microphone located on its original remote, so it must be used with that remote. However, in practice, XGIMI's built-in voice assistant is quite poor, so it doesn't matter much. The second is that the power key can only shut down, not turn on. This is easy to understand—while we can shut down a computer using a mouse or keyboard, it's rare to see a mouse or keyboard capable of turning a computer on from a cold start.
Therefore, turning it on still requires the "Mi Home Smart Plug + Power-on startup" method, while turning it off can be done using the IR remote we just learned. So how do we achieve a complete power-off? (If the power isn't cut, we can't use the 'Power-on startup' next time). Some smart plugs have power statistics features; you can set it to cut power after checking that the power has remained low for a period of time. That's one solution. What if the plug doesn't have power statistics? That's also simple: keep the plug powered on by default. Set a "Projector Power On" scene where the content is "Turn off the plug for 10 seconds and then turn it back on." This means the plug is normally live, and only when you want to start the projector does it cut power for a brief moment and then restore it. This way, the XGIMI projector will turn on via its "Power-on startup" setting.
Summary
This article explored a "nearly perfect" solution for controlling an XGIMI projector using XiaoAI.
Reprinting Note: Please include the original address of this article: https://kexue.fm/archives/9365
If you found this article helpful, you are welcome to share or donate. Donating isn't about profit, but about letting me know how many readers genuinely follow Scientific Spaces. Of course, if you ignore it, it won't affect your reading. Once again, welcome and thank you!
How to cite this article:
Su Jianlin. (Dec. 05, 2022). "Smart Home: A Simple Solution for Controlling XGIMI Projectors with XiaoAI" [Blog post]. Retrieved from https://kexue.fm/archives/9365