return {
    -- The script is active
    active = true,

	on = {
        timer = {
            'every 5 minutes'
        }
	},
    -- Custom logging level for this script
    logging = {
        level = domoticz.LOG_INFO,
        marker = "AWTRIX3_Screensaver"
    },

    -- Event execution when the timer triggers the script
    execute = function(domoticz)
        
        local function getRandomEffect()
            -- Define the array of 10 strings
            local effects = {
                "Fade",
                "MovingLine",
                "BrickBreaker",
                "PingPong",
                "Radar",
                "Checkerboard",
                "Fireworks",
                "PlasmaCloud",
                "Ripple",
                "Snake",
                "Pacifica",
                "TheaterChase",
                "Plasma",
                "Matrix",
                "SwirlIn",
                "SwirlOut",
                "LookingEyes",
                "TwinklingStars",
                "ColorWaves"
            }
        
            -- Generate a random index between 1 and the length of the array
            local randomIndex = math.random(#effects)
        
            -- Return the string at the random index
            return effects[randomIndex]
        end

        screensaverPage = {
                            appname = "screensaver",
                            effect = getRandomEffect(),
                            duration = 10
                        }

        local pageJSON = domoticz.utils.toJSON(screensaverPage)
        domoticz.log("Sending screensaver to AWTRIX3: " .. pageJSON, domoticz.LOG_INFO)
        
        local appDevice = domoticz.devices('AWTRIX3 - Send Custom App')
        if appDevice then
            appDevice.setDescription(pageJSON)
            appDevice.switchOn().afterSec(2)
        else
            domoticz.log("'AWTRIX3 - Send Custom App' device not found", domoticz.LOG_ERROR)
        end
   end
}