本文整理汇总了Python中openzwave.option.ZWaveOption.set_poll_interval方法的典型用法代码示例。如果您正苦于以下问题:Python ZWaveOption.set_poll_interval方法的具体用法?Python ZWaveOption.set_poll_interval怎么用?Python ZWaveOption.set_poll_interval使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类openzwave.option.ZWaveOption
的用法示例。
在下文中一共展示了ZWaveOption.set_poll_interval方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: setup
# 需要导入模块: from openzwave.option import ZWaveOption [as 别名]
# 或者: from openzwave.option.ZWaveOption import set_poll_interval [as 别名]
def setup(self, updateCallback):
dispatcher.connect(self.onNetworkReady, ZWaveNetwork.SIGNAL_NETWORK_READY)
dispatcher.connect(self.onNetworkStart, ZWaveNetwork.SIGNAL_NETWORK_STARTED)
dispatcher.connect(self.onNetworkFailed, ZWaveNetwork.SIGNAL_NETWORK_FAILED)
# TODO: make udev.symlink rule to a specific port (USB0/1)
# Uncomment this to run on PC (remember to update the zwave config path)
#options = ZWaveOption("/dev/ttyUSB0", \
# config_path="/home/<USER>/software/python-openzwave-0.2.6/openzwave/config", \
options = ZWaveOption("/dev/serial/by-path/platform-bcm2708_usb-usb-0:1.2:1.0-port0", \
config_path="/home/pi/software/python-openzwave-0.2.6/openzwave/config", \
user_path=".", cmd_line="")
options.set_append_log_file(False)
options.set_console_output(False)
options.set_save_log_level('Debug')
options.set_poll_interval(30);
options.set_suppress_value_refresh(False)
options.addOptionBool("AssumeAwake", True)
options.set_logging(False)
options.lock()
self.network = ZWaveNetwork(options, autostart=False)
self.onDeviceUpdateCallback = updateCallback
self.network.start()
self.addedConnections = False
Timer(2*60, self.setupConnections).start()