家里的网络设备全是 Ubiquiti 的,路由、AP、交换机一套。平时放在那里不用管,挺好的。
唯一的问题是交换机的端口指示灯。每个端口都有一个小灯,有流量的时候一直闪。白天看不出来,晚上卧室里黑着灯,那几个绿点在墙角一直闪烁,很扰人。
APP 和网页端没有关闭选项
第一反应是去 UniFi 的网页管理端找设置,找了一圈没有。又去手机 APP 里翻,也没有。Ubiquiti 的设备管理做得很细,但偏偏漏掉了这个最基础的需求。
论坛上搜了一下,发现有人提这个需求,Ubiquiti 官方的回复大意是"已记录,后续考虑"——这种回复通常意味着遥遥无期。
不过有人找到了 SSH 的解法。
用命令行关掉
SSH 进交换机,执行一条命令:
swctrl led set off
所有端口指示灯立刻熄灭。安静了。
如果以后需要重新打开:
swctrl led set on
就这一条命令,比我预想的简单得多。
一个 bug
用了一段时间之后发现,我的 Flex 10 GbE(一台小型万兆交换机,4个 RJ45 万兆口加 1个 RJ45 千兆口)有点不对劲。
执行关灯命令之后,那个 1G 的 RJ45 口会不定期地自己亮起来,过一会儿又灭掉,循环往复。另外 4 个 10G 的 RJ45 口没有这个问题,一关就一直关着。
目前没找到根本解决办法。暂时的应对方案是用 cron 定期重新执行一次关灯命令,算是绕过去了。不优雅,但能用。
低端型号没有 SSH
还有一个更麻烦的情况:部分低端交换机不支持 SSH,比如 Flex Mini 2.5G,就完全没有办法用命令行控制了。
网页端没有选项,SSH 也进不去,指示灯就只能一直亮着。
唯一的物理解法:黑色胶布。
我确实考虑过,但最终没动手——总觉得把一台还在保修期内的设备贴上胶布,有点说不过去。
Ubiquiti 的产品在专业功能上做得很深,但有时候会忽略一些家用场景下最基本的需求。端口指示灯开关这件事,对数据中心来说可能无所谓,对放在卧室里的家用交换机来说,真的是个实际问题。
希望官方能在后续固件或 APP 更新里加上这个选项。不需要多复杂,一个开关就够了。
My home network runs entirely on Ubiquiti — router, APs, switches. It mostly sits there and does its job without any fuss.
The one exception: switch port LEDs. Every port has a small indicator light, and when there’s traffic it blinks continuously. Fine during the day. At night with the lights off, those little green dots flickering in the corner are genuinely annoying.
No off switch in the app or web UI
My first instinct was to check the UniFi web interface. Nothing. Checked the mobile app. Also nothing. Ubiquiti’s device management goes surprisingly deep in some areas, but somehow this most basic quality-of-life option isn’t there.
A quick search on the forums shows plenty of people asking for it. Ubiquiti’s responses have been some variation of “noted, will consider” — which usually means indefinitely deferred.
Fortunately, someone found an SSH workaround.
One command via SSH
SSH into the switch and run:
swctrl led set off
All port LEDs go dark immediately. Silence.
To turn them back on later:
swctrl led set on
One command. Simpler than I expected.
A bug worth noting
After running this for a while, I noticed something odd on my Flex 10 GbE — a small switch with four 10 RJ45 gigabit ports and one RJ45 gigabit port.
After running the off command, the 1G RJ45 port light keeps coming back on its own at random intervals, then going off again. The four 10G RJ45 ports stay dark without any issue.
I haven’t found a clean fix. My current workaround is a cron job that re-runs the off command periodically. Not elegant, but functional.
Lower-end models don’t support SSH
There’s a more limiting case: some entry-level Ubiquiti switches don’t support SSH at all. The Flex Mini 2.5G is one example — no command-line access means no way to control the LEDs programmatically.
No web UI option, no SSH. The lights stay on.
The only remaining option is black electrical tape.
I considered it. I haven’t done it yet — something about taping over a device that’s still under warranty feels wrong, even if it would work perfectly well.
Ubiquiti builds impressive depth into the professional side of their products, but occasionally misses things that matter in home deployments. LED control doesn’t matter in a data center. It matters quite a bit when the switch lives in a bedroom.
A simple on/off toggle in the app or web UI would solve this entirely. Hopefully it shows up in a firmware or app update at some point.