require "network"

local ip_list = "192.168.0.0, 192.168.0.1, 192.168.122.1, 192.168.0.34"
local ip_range = "192.168.0.0 - 192.168.122.9"
local ports = { 2020, 30, 8080 }
local handle_results = "HUB:zwave/scripts/handle_network_scan_results"
local scan_id1 = network.start_scan_network( ip_list, "IPv4", handle_results )
local scan_id2 = network.start_scan_network( ip_range, "IPv4", handle_results, ports )
network.stop_scan_network( scan_id1 )
network.stop_scan_network( scan_id2 )