众博平台app下载专区

Sunday, January 8, 2017

pwrusbctl: A command-line tool for controlling USB-connected power strips

Over the past few days I wrote a command-line tool for controlling and monitoring . These are clever devices that connect to a computer via USB and allow power monitoring and controlling the state of the outlets. I decided to call it pwrusbctl and you can .

The company that sells them offer a binary blob driver, but I wanted something that I could extend and modify. I also want it to work with my RaspberryPi.

PowerUSB Basic connected to a RaspberryPi
I used HIDAPI as an abstraction over HID which makes the codebase portable. It has been tested to work on Linux and Mac OS. You can find more documentation in the README on GitHub. Here is an example of the output:
[andrew@andrew-rpi-1 pwrusbctl]$ ./pwrusbctl --reset_charge_accumulator --device_info --log_indefinitely --power --energy --interval 2000000
Found PowerUSB device type: Basic
Power: 32.200001W
Energy: 0.000000kWh
Power: 32.200001W
Energy: 0.000537kWh
Power: 27.599998W
Energy: 0.000537kWh
Power: 27.599998W
Energy: 0.000537kWh
Power: 50.599998W
Energy: 0.000537kWh
Power: 172.500000W
Energy: 0.000537kWh
Power: 342.700012W
Energy: 0.000537kWh
Power: 519.799988W
Energy: 0.000537kWh
Power: 545.099976W
Energy: 0.000537kWh
五万怎么投资理财 互联网彩票最新新闻 互联网彩票最新消息2020 互联网彩票能开通吗 五D开奖号码 互联网销售彩票行为 互联网彩票解禁提案 五个人打的扑克叫什么 五个人的扑克牌 五个数字的彩票叫什么