Skip to content

Instantly share code, notes, and snippets.

@Landrash
Last active August 19, 2016 06:01
Show Gist options
  • Save Landrash/67323b466d135349134ed483996dd43a to your computer and use it in GitHub Desktop.
Save Landrash/67323b466d135349134ed483996dd43a to your computer and use it in GitHub Desktop.
Python configure multi sensor script for zwave by robbiet480
from openzwave.option import ZWaveOption
options = ZWaveOption('/dev/zwave', config_path='/home/pi/python-openzwave/openzwave/config', user_path='.', cmd_line='')
# or /usr/local/share/python-openzwave/config if installed
# /home/pi/python-openzwave/openzwave/config if testing
options.set_append_log_file(False)
options.set_console_output(True)
options.set_save_log_level('Debug')
options.set_logging(False)
options.lock()
from openzwave.network import ZWaveNetwork
network = ZWaveNetwork(options, log=None)
node2 = network.nodes[2]
print(node2.product_name) # this is the multisensor on my network. Yours may be a different node.
# get current config values
node2.get_sensors()
node2.request_all_config_params()
# set timing and stuff on multisensor
node2.request_config_param(111) # this shows the current interval (3600 seconds)
node2.set_config_param(111, 120) # set the temperature sensor interval to 120 seconds
node2.set_config_param(3, 125) # set motion sensor On duration to just over 2 minutes. (shorter and it never registers as on!)
# set reporting of power level on Aeon smart energy switches
node5.set_config_param(101,2) # send multisensor info about power
node5.set_config_param(111,20) # send it every 20 seconds.
network.stop()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment