首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >禁用KSTAR Powercom 600 of的beep (USB为MEC0003)

禁用KSTAR Powercom 600 of的beep (USB为MEC0003)
EN

Ask Ubuntu用户
提问于 2020-06-16 10:48:21
回答 1查看 1.7K关注 0票数 1

我买了一个KSTAR 600 USB线互动UPS与USB。它可以正常工作,但是我想在停电的时候关掉蜂鸣声。

当我将USB电缆插入我的笔记本(运行Ubuntu18.04)时,它似乎是syslog中的一个MEC0003设备:

代码语言:javascript
复制
Jun 16 11:48:50 smurfenaar kernel: [103981.169542] usb 1-3: Product: MEC0003

我需要什么软件和配置来关闭蜂鸣声?

EN

回答 1

Ask Ubuntu用户

回答已采纳

发布于 2020-06-16 11:11:59

我让它使用网络UPS工具(NUT)

为KSTAR

配置NUT

代码语言:javascript
复制
$ sudo apt install nut nut-cgi

Sudo编辑的/etc/nut/ups.conf包含:

代码语言:javascript
复制
# Set maxretry to 3 by default, this should mitigate race with slow devices:
maxretry = 3

[kstar]
driver = nutdrv_qx
port = auto
desc = "Description of this UPS"

以及编辑/etc/nut/upsd.users

代码语言:javascript
复制
[admin]
password = youradminpassword
actions = SET
instcmds = ALL

最后,sudo编辑/etc/nut/nut.conf并确保MODE设置为standalone

代码语言:javascript
复制
MODE=standalone

启动ups驱动程序和NUT deamon:

代码语言:javascript
复制
$ sudo upsdrvctl start
Network UPS Tools - UPS driver controller 2.7.4
Network UPS Tools - Generic Q* USB/Serial driver 0.28 (2.7.4)
USB communication driver 0.33
Using protocol: Q1 0.07
Can't autodetect number of battery packs [-1/13.70]
Battery runtime will not be calculated (runtimecal not set)

$ sudo systemctl start nut-server

检查beep状态

若要查看当前的beep状态,请使用upsc命令:

代码语言:javascript
复制
$ upsc kstar
Init SSL without certificate database
battery.voltage: 13.70
device.type: ups
driver.name: nutdrv_qx
...

ups.beeper.status: enabled

...

禁用beep

使用upscmd命令和在/etc/nut/upsd.users中配置的用户名和密码:

代码语言:javascript
复制
$ upscmd -u admin -p admin kstar beeper.toggle 

我们看到蜂鸣声现在被禁用了

代码语言:javascript
复制
$ upscmd -u admin -p admin kstar beeper.toggle 
OK

$ upsc kstar | grep beep
Init SSL without certificate database
ups.beeper.status: disabled

upsc可能需要1秒钟或5秒钟才能反映状态变化。你看,空调坏了以后不要再嗡嗡叫了。

票数 1
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/1250840

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档