如何在 Python-Openzwave 上为设备设置轮询间隔。命令 network.set_polling_interval(time)似乎没有更改默认轮询间隔
代码
network = ZWaveNetwork(options, autostart=False)
dispatcher.connect(louie_network_started,ZWaveNetwork.SIGNAL_NETWORK_STARTED)
dispatcher.connect(louie_network_failed, ZWaveNetwork.SIGNAL_NETWORK_FAILED)
dispatcher.connect(louie_network_ready, ZWaveNetwork.SIGNAL_NETWORK_READY)
network.start()
network.set_poll_interval(1000)
print network.get_poll_interval()
这里似乎设置为指定的值
#We wait for the network.
#print "***** Waiting for network to become ready : "
for i in range(0,90):
if network.state>=network.STATE_READY:
#print "***** Network is ready"
break
else:
#sys.stdout.write(".")
#sys.stdout.flush()
time.sleep(1.0)
print network.get_poll_interval()
这里它重置为默认值