--[[
%% properties

%% globals
--]]

function postMethod(data) 
    local http = net.HTTPClient() 
      http:request("http://127.0.0.1:11111/api/settings/reboot", { 
        options = { 
            method = 'POST', 
              headers = { 
                --headers here, using loopback (none required) 
            }, 
              data = data.payload, 
              timeout = data.timeout or 5000 
        }, 
        success = data.success, 
          error = function(err) 
            print('[ERROR] ' .. err) 
        end 
    }) 
end
    fibaro:debug("Probíhá restart HC2...")
    fibaro:sleep(3000)
    postMethod("reboot")