Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
print ''
print '#################################disable-connection-monitor#################################'
try:
devMgr.DisableConnectionMonitor()
except WeaveDeviceMgr.DeviceManagerException, ex:
print str(ex)
exit()
print "Connection monitor disabled"
print ''
print '#################################start-system-test#################################'
try:
devMgr.StartSystemTest(WeaveDeviceMgr.SystemTest_ProductList["thermostat"], 1)
except WeaveDeviceMgr.DeviceManagerException, ex:
print str(ex)
exit()
print "Start system test complete"
print ''
print '#################################stop-system-test#################################'
try:
devMgr.StopSystemTest()
except WeaveDeviceMgr.DeviceManagerException, ex:
print str(ex)
exit()
print "Stop system test complete"
print ''
print '#################################pair-token#################################'
interval = int(args[0])
if (interval < 0 or interval > 65535):
print "Invalid value specified for interval: " + args[0]
return
timeout = int(args[1])
if (timeout < 0 or timeout > 65535):
print "Invalid value specified for interval: " + args[1]
return
else:
print "Usage:"
self.do_help('rendezvous')
return
try:
self.devMgr.EnableConnectionMonitor(interval, timeout)
except WeaveDeviceMgr.DeviceManagerException, ex:
print str(ex)
return
print "Connection monitor enabled"