CoolMasterNet暖通空调桥的轻量级PythonAPI

pycoolmasternet的Python项目详细描述


用于与CoolMasterNethvac桥交互的python 3库。

安装

pip安装pycoolmasternet

或者您可以从https://github.com/koreth/pycoolmasternet获取代码

用法

frompycoolmasternetimportCoolMasterNet# Supply the IP address and optional port number (default 10102).## By default, properties will be refreshed by querying the device# if last refresh was more than 1 second ago; pass auto_update=False# to disable that behavior (in which case you will need to call# update_status() explicitly).cool=CoolMasterNet('192.168.0.123',port=12345,auto_update=False)# Returns a list of CoolMasterDevice objectsdevices=cool.devices()# Device's unit ID on the CoolMasterNet bridge, e.g., "L7.001"device.uid# Temperature unit: imperial, celsiusdevice.unit# Current reading of device's thermometerdevice.temperature# Current setting of device's thermostatdevice.thermostatdevice.set_thermostat(28)# True if device is turned ondevice.is_ondevice.turn_on()device.turn_off()# Fan speed: low, med, highdevice.fan_speeddevice.set_fan_speed('med')# Mode of operation: auto, cool, dry, fan, heatdevice.modedevice.set_mode('cool')# Swing mode: horizontal, vertical, auto, 30, 45, 60, stop# Numeric settings are degrees of louver tilt. On read, the property can# be None if the bridge reports that the device doesn't support swing.device.swingdevice.set_swing('30')# Dict with all the properties listed abovedevice.status# Force refresh of status (by default, device auto-updates its status# if most recent update is more than 1 second ago)device.update_status()

许可证

这段代码是在麻省理工学院的许可下发布的。

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

推荐PyPI第三方库


热门话题
安卓中的java标签长点击问题   JavaSpringMVC多行表单提交提交新的ModelAttribute   程序来查找java程序中的方法数   在JSF中自动选择java下拉列表   java onNext为ArrayList的每个元素触发,而不是使用RXJava触发一次   为什么java不允许创建内部类的实例?   JavaJSF<p:calendar>小部件在选择不同月份时不会刷新   java如何限制JFileChooser只允许选择特定数量的文件?   java ANT build无法识别geckodriver可执行文件“驱动程序可执行文件不存在”   java TextView空指针异常   java试图在安卓中传递参数   如何将XML配置转换为Java   java支持使用JAXRPC的soap服务,但pom中没有定义它。xml   在Java中检查整个ArrayList