You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i am trying to put my device in inclusion mode to add door switch and this is my code
import logging
import sys, os
import resource
#logging.getLogger('openzwave').addHandler(logging.NullHandler())
#logging.basicConfig(level=logging.DEBUG)
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger('openzwave')
import openzwave
from openzwave.node import ZWaveNode
from openzwave.value import ZWaveValue
from openzwave.scene import ZWaveScene
from openzwave.controller import ZWaveController
from openzwave.network import ZWaveNetwork
from openzwave.option import ZWaveOption
import time
import six
if six.PY3:
from pydispatch import dispatcher
else:
from louie import dispatcher
device="/dev/ttyACM0"
log="None"
for arg in sys.argv:
if arg.startswith("--device"):
temp,device = arg.split("=")
elif arg.startswith("--log"):
temp,log = arg.split("=")
elif arg.startswith("--help"):
print("help : ")
print(" --device=/dev/yourdevice ")
print(" --log=Info|Debug")
Warning (from warnings module):
File "/home/pi/zwave python.py", line 51
controller.begin_command_add_device()
DeprecationWarning: Call to deprecated function begin_command_add_device.
Traceback (most recent call last):
File "/home/pi/zwave python.py", line 51, in
controller.begin_command_add_device()
File "/usr/local/lib/python2.7/dist-packages/openzwave/object.py", line 48, in new_func
return func(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/openzwave/controller.py", line 1148, in begin_command_add_device
self.CMD_ADDDEVICE, self.zwcallback, highPower=high_power)
File "src-lib/libopenzwave/libopenzwave.pyx", line 4207, in libopenzwave.PyManager.beginControllerCommand
TypeError: an integer is required
INFO:openzwave:Driver ready using library Static Controller version Z-Wave 6.02
INFO:openzwave:home_id 0xe3140147, controller node id is 1
The text was updated successfully, but these errors were encountered:
i am trying to put my device in inclusion mode to add door switch and this is my code
import logging
import sys, os
import resource
#logging.getLogger('openzwave').addHandler(logging.NullHandler())
#logging.basicConfig(level=logging.DEBUG)
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger('openzwave')
import openzwave
from openzwave.node import ZWaveNode
from openzwave.value import ZWaveValue
from openzwave.scene import ZWaveScene
from openzwave.controller import ZWaveController
from openzwave.network import ZWaveNetwork
from openzwave.option import ZWaveOption
import time
import six
if six.PY3:
from pydispatch import dispatcher
else:
from louie import dispatcher
device="/dev/ttyACM0"
log="None"
for arg in sys.argv:
if arg.startswith("--device"):
temp,device = arg.split("=")
elif arg.startswith("--log"):
temp,log = arg.split("=")
elif arg.startswith("--help"):
print("help : ")
print(" --device=/dev/yourdevice ")
print(" --log=Info|Debug")
options = ZWaveOption(device,
config_path="/usr/local/lib/python2.7/dist-packages/python_openzwave/ozw_config/",
user_path=".", cmd_line="")
options.set_log_file("OZW_Log.log")
options.set_append_log_file(False)
options.set_console_output(True)
options.set_save_log_level(log)
#options.set_save_log_level('Info')
options.set_logging(False)
options.lock()
network = ZWaveNetwork(options, log=None)
controller=ZWaveController(None,network)
controller.begin_command_add_device()
##controller.cancel_command()
##if(controller.begin_command_add_device()==True):
print "device in inclusion mode"
This the error i get
Python 2.7.16 (default, Apr 6 2019, 01:42:57)
[GCC 8.2.0] on linux2
Type "help", "copyright", "credits" or "license()" for more information.
===================== RESTART: /home/pi/zwave python.py =====================
INFO:openzwave:Start Openzwave network.
Warning (from warnings module):
File "/home/pi/zwave python.py", line 51
controller.begin_command_add_device()
DeprecationWarning: Call to deprecated function begin_command_add_device.
Traceback (most recent call last):
File "/home/pi/zwave python.py", line 51, in
controller.begin_command_add_device()
File "/usr/local/lib/python2.7/dist-packages/openzwave/object.py", line 48, in new_func
return func(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/openzwave/controller.py", line 1148, in begin_command_add_device
self.CMD_ADDDEVICE, self.zwcallback, highPower=high_power)
File "src-lib/libopenzwave/libopenzwave.pyx", line 4207, in libopenzwave.PyManager.beginControllerCommand
TypeError: an integer is required
The text was updated successfully, but these errors were encountered: