Restart Luup when ZWave network abnormal

Hi Experts, I would like to poll ZWave network/Luup engine whether somewhat reasons which is abnormal, hang or crash then restart Luup engine or Vera for recovery. I know how to restart Luup engine or reboot Vera but don’t know how to confirm if Luup engine or ZWave network unstable. I am thinking if abnormal on Luup engine or ZWave will make network ping failure as well. Any idea and advice will be greatly appreciated. I am using VeraLit and Vera3 UI5 latest public firmware. Thanks.

I have developed two scenes with its schedule trigger in 15 mins for (1) Polling my Aeon Repeater to check if its job can be executed successfully (2) Pinging my home router IP to very if the network is normal internally to decide the healthiness of Vera. If (1) failed, it will reload Luup engine. If (2) failed, it will reboot Vera.

Here is the code for your reference:

(1) Polling my Aeon Repeater

function check_job_status( )

local job_status , job_notes = luup.job.status(lul_job, 169)

if (job_status == 4) then
luup.log(" VERA ZWAVE POLL: Transmission succeeded")
else
if(job_status == 3 or job_status == 2) then
luup.call_action(“urn:micasaverde-com:serviceId:HomeAutomationGateway1”, “Reload”, {}, 0)
----Add code to send SMS to me
else
luup.log(" VERA ZWAVE POLL: Waiting and Callback again")
luup.call_timer( ‘check_job_status’, 1, ‘5’, ‘’, ‘’ )
end
end
end

lul_resultcode, lul_resultstring, lul_job, lul_returnarguments = luup.call_action(“urn:micasaverde-com:serviceId:HaDevice1”, “Poll”, {}, 169)
check_job_status()

(2) Ping my home router IP

local ping = os.execute(“ping -c 1 192.168.1.1”)
if ping ~= 0 then
luup.log(“Auto Reboot: Network down. Rebooting in 2 seconds.”)
----Add code to send SMS to me
luup.sleep(2000)
os.execute(“reboot”)
end

Is it a good approach? Any comment will be appreciated. Thanks.

I do a similar thing to you to check LAN connectivity but I never considered polling a device to check Z-Wave network status. Your approach sounds interesting. Can you confirm it is working?

I have a problem with my veralite where occasionally, the orange status light goes out and I loose all Z-Wave functionality and I need to restart the device. I’m assuming an approach like yours would allow me to detect and resolve such issues automatically.

I’m also interested to hear how others may be tackling these issues.