Page 1 of 1

Open / run URL every x hours

Posted: Sunday 25 July 2021 12:26
by sammyke007
Hi

I'm running FullyKiosk on a tablet and I would like to restart my FullyKiosk every 6 hours. This is be possible with opening the following URL:

Code: Select all

http://192.168.1.182:2323/?cmd=restartApp&password=mypassword
For now, I have a dummy device with the above URL as "On command" configured with a timer putting the device on+off every 6 hours. This works partially, but sometimes I get

Code: Select all

 Error: Error opening url: http://192.168.1.182:2323/?cmd=restartApp&password=mypassword 
Anyone can help me with putting this in a DZVents script please?
I don't seem to understand all the URL calling methods... (POST/GET/...)

Re: Open / run URL every x hours  [Solved]

Posted: Sunday 25 July 2021 12:47
by erem
something like this

Code: Select all

return {
    on = {
        timer = { 'every 6 hours' }
    },
    execute = function(domoticz, item)
        if (item.isTimer) then
            domoticz.openURL({
            url = 'http://192.168.1.182:2323/?cmd=restartApp&password=mypassword',
            method = 'GET'
            })
        end
    end
}

Re: Open / run URL every x hours

Posted: Tuesday 27 July 2021 18:45
by sammyke007
Works fine, tnx Rob!!