(Last Updated: April 30, 2020)

Disable Vera Zwave device polling at the device level



  • for k, v in pairs(luup.devices) do
      local var= luup.variable_get("urn:micasaverde-com:serviceId:ZWaveDevice1", "PollSettings",k)
      local bat =  luup.variable_get("urn:micasaverde-com:serviceId:HaDevice1", "BatteryLevel",k)
       if var ~= nil  and v.device_num_parent== 1 and bat == nil then
         if var ~= 0 then 
         luup.variable_set("urn:micasaverde-com:serviceId:ZWaveDevice1", "PollSettings", "0", k)
         luup.variable_set("urn:micasaverde-com:serviceId:ZWaveDevice1", "PollNoReply", "0", k)
         end
       end
    end
    

Log in to reply