Page 1 of 1

activate/deactivate script

Posted: Wednesday 27 November 2019 10:52
by Knibor
Hi

Because I have a lot of scripts, my Rasp pi is slow, but sometimes I do not need some scripts.
Is there a way to activate/deactive a script with a virtual Switch?

Thanks

Re: activate/deactivate script

Posted: Wednesday 27 November 2019 11:34
by AllesVanZelf
If you created these scripts in Domoticz - settings - more options - events, you can switch them on and off.

Re: activate/deactivate script

Posted: Wednesday 27 November 2019 12:12
by waaren
Knibor wrote: Wednesday 27 November 2019 10:52 Hi

Because I have a lot of scripts, my Rasp pi is slow, but sometimes I do not need some scripts.
Is there a way to activate/deactive a script with a virtual Switch?

Thanks
I too have a lot of scripts but they only account for a fraction of the CPU usage of my systems. Why do you think the response time degradation is caused by your scripts ?

in dzVents you can use a function in the active = section to control if / when a script is active.

I use this for another reason (Only active in the first 3 minutes after a domoticz start) but I trust you get the idea

Code: Select all

 active = function(domoticz)
                return domoticz.startTime.secondsAgo < 180
            end,

Re: activate/deactivate script  [Solved]

Posted: Thursday 28 November 2019 23:20
by Knibor
Hello, thanks for the response.
Domoticz memory is over 90MB. Because of this Domoticz became very slow and sometimes got stuck, so I had to reset DM. The reason was that I accidentally set the trigger format wrong for a Lua script, causing DM memory to run from 70MB to over 90MB. The problem is solved for the time being. Only I have to look again at how to get DM memory further down. Any suggestions?

Re: activate/deactivate script

Posted: Thursday 28 November 2019 23:53
by waaren
Knibor wrote: Thursday 28 November 2019 23:20 Hello, thanks for the response.
Domoticz memory is over 90MB. Because of this Domoticz became very slow and sometimes got stuck, so I had to reset DM. The reason was that I accidentally set the trigger format wrong for a Lua script, causing DM memory to run from 70MB to over 90MB. The problem is solved for the time being. Only I have to look again at how to get DM memory further down. Any suggestions?
There seem to be a memory leak of some kind in recent beta's, It is being investigated what is causing it. Until it is fixed I suggest you look at your memory every once in a while and restart domoticz when you see domoticz repsonsetimes are getting very high.

btw. 90 Mb is not extreme; I did see > 200 MB on my PI-3 for domoticz without any performance issue.