Scene to Initiate a Repair or Heal

Is it possible to have a scene to initiate a repair or heal process?

Yes, you can put some code in the scene to initiate a heal.

This is the code. You can also run it from Test Luup code. The comments after the arguments are the UI descriptions of each argument.

local arguments = {
    ["BatteryMinutes"] = 60, -- Wait X minutes for battery operated devices to be discovered.
    ["Node"] = "",           -- Repair only node X (leave blank for all)
    ["StressCycles"] = 2,    -- Number of cycles to stress test each node
    ["Configure"] = 1,       -- Re-configure all the devices when done. (1=yes, 0=no)
    ["ManualRoute"] = 0      -- Only update Vera routing (overrides other settings) (1=yes, 0=no)
}

luup.call_action( "urn:micasaverde-com:serviceId:ZWaveNetwork1", "HealNetwork", arguments, 0)

Thanks. Do I copy th ecode exactly as stated or replace “argument” with the sequence 60,“”,2,1,0

I tried it both ways and nothing seemed to happen.

Ron

Yes, copy the code exactly. Of course, you can change the parameters as you see fit, but the structure is the same.

How did you try? I tested it from Test Luup code and it works for me.

I have not yet been successful, in a scene or in Luup test. Here is what I pasted:

local arguments = {
[“BatteryMinutes”] = 60, – Wait X minutes for battery operated devices to be discovered.
[“Node”] = “”, – Repair only node X (leave blank for all)
[“StressCycles”] = 2, – Number of cycles to stress test each node
[“Configure”] = 1, – Re-configure all the devices when done. (1=yes, 0=no)
[“ManualRoute”] = 0 – Only update Vera routing (overrides other settings) (1=yes, 0=no)
}

luup.call_action( “urn:micasaverde-com:serviceId:ZWaveNetwork1”, “HealNetwork”, arguments, 0)

I have no idea why it’s not working for you. Change the last argument of the call_action function from 0 to 1 and try again.

Changing the zero to a one works. Not sure why but it does. Thanks.

I’m glad that it’s working. Device #1 is actually the Z-Wave Network, so “1” is more correct than “0”.