控制数字记录器网络电源开关

dlipower的Python项目详细描述


https://img.shields.io/travis/dwighthubbard/python-dlipower.svghttps://img.shields.io/coveralls/dwighthubbard/python-dlipower.svghttps://img.shields.io/pypi/v/dlipower.svghttps://img.shields.io/badge/python-3.4,3.5,3.6-blue.svghttps://img.shields.io/pypi/l/dlipower.svgDocumentation Status

说明

这是一个python模块和一个脚本,用于管理 数字记录器网络电源开关。

模块提供一个名为 允许管理网络电源的电源开关 从python程序切换。

当作为脚本运行时,它充当命令 用于管理DLI电源开关的线路实用程序。

支持的设备

该模块已经过以下测试 数字记录器电源网络电源开关:

  • Proswitch
  • Webpowerswitch II
  • Webpowerswitch III
  • Webpowerswitch四
  • 网络电源开关V
  • 以太网电源控制器III

示例

importdlipowerprint('Connecting to a DLI PowerSwitch at lpc.digital-loggers.com')switch=dlipower.PowerSwitch(hostname="lpc.digital-loggers.com",userid="admin")print('Turning off the first outlet')switch.off(1)print('The powerstate of the first outlet is currently',switch[0].state)print('Renaming the first outlet as "Traffic light"')switch[0].name='Traffic light'print('The current status of the powerswitch is:')print(switch)ConnectingtoaDLIPowerSwitchatlpc.digital-loggers.comTurningoffthefirstoutletThepowerstateofthefirstoutletiscurrentlyOFFRenamingthefirstoutletas"Traffic light"Thecurrentstatusofthepowerswitchis:DLIPowerSwitchatlpc.digital-loggers.comOutletHostnameState1TrafficlightOFF2killerrobotON3BuitenverlictiON4MeetingRoomLiOFF5BrocadeLVM123ON6ShoretelABC123ON7Shortel24V-TON8Shortel24V-TON

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java HttpSession API   如果模式可用,xml java将忽略DTD进行验证   java从远程位置调用Jersey API   在Java中直接从URL读取html   如何使用#Hibernate#Spring#Java在MySql中存储“日期”?   java如何在JSP中迭代列表对象?   java如何使用PDFBox确定实际PDF内容的位置?   utf 8计算Java字符串的UTF8长度,而不实际对其进行编码   java我正在尝试通过whatsapp或任何其他messenger应用程序发送/共享mp3原始文件。   使用Java定期将记录写入CSV文件   用于队列和工作程序设计的java实时执行器池   java与t1的区别是什么。当前线程和线程。当前线程?   java将大字符串写入文本文件?   java传递给侦听器   java如何从对象列表向JComboBox添加项