Hi guys,
Normally LUA scripts are stored in "domoticz/scripts/lua".
I've written some lua scripts in the domoticz internal editor but they don't apear in folder "domoticz/scripts/lua".
Are those scripts stored somewere else?
I have search in the forum but not find the answer, maybe used wrong keywords....
Thanks in advance,
Pauls
Storage location LUA scripts
Moderator: leecollings
- Egregius
- Posts: 2592
- Joined: Thursday 09 April 2015 12:19
- Target OS: Linux
- Domoticz version: v2024.7
- Location: Beitem, BE
- Contact:
Re: Storage location LUA scripts
Those are stored in the database.
-
- Posts: 28
- Joined: Sunday 19 June 2016 9:06
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Storage location LUA scripts
Thanks,
And what is preferable, using the internal editor or using a text editor and store in the lua directory?
Personally i like the internal editor, but i don't know the downside of this.
Any recommandations to be aware of?
And what is preferable, using the internal editor or using a text editor and store in the lua directory?
Personally i like the internal editor, but i don't know the downside of this.
Any recommandations to be aware of?
- Dnpwwo
- Posts: 820
- Joined: Sunday 23 March 2014 9:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Melbourne, Australia
- Contact:
Re: Storage location LUA scripts
I would check out the wiki, specifically http://www.domoticz.com/wiki/Domoticz_a ... ua_scripts. But there is no compelling reason to go either way. Its a personal choice.
Functionally, storing them in the database via the editor or using the file system are the same. If you aren't particularly technical then the editor is good because the database is backed up over time and your scripts are too.
If you have an editor you particularly like you may prefer to use file based. If you go file based you need to version and backup your scripts yourself.
Functionally, storing them in the database via the editor or using the file system are the same. If you aren't particularly technical then the editor is good because the database is backed up over time and your scripts are too.
If you have an editor you particularly like you may prefer to use file based. If you go file based you need to version and backup your scripts yourself.
The reasonable man adapts himself to the world; the unreasonable one persists to adapt the world to himself. Therefore all progress depends on the unreasonable man. George Bernard Shaw
- Egregius
- Posts: 2592
- Joined: Thursday 09 April 2015 12:19
- Target OS: Linux
- Domoticz version: v2024.7
- Location: Beitem, BE
- Contact:
Re: Storage location LUA scripts
You could consider file based 
I'm addicted to speed so I did a test once.
A file base script
A database script
A script in on/off action.
They were executed in that order. So if you have 100 file scripts the database script is only triggered after those.
One should also try not to have many script files. Try to combine them or use a placeholder that call's scripts outside the lua folder.
My test also pointed that that even 100 empty scripts cause a delay of about exactly the same amount of msec.

I'm addicted to speed so I did a test once.
A file base script
A database script
A script in on/off action.
They were executed in that order. So if you have 100 file scripts the database script is only triggered after those.
One should also try not to have many script files. Try to combine them or use a placeholder that call's scripts outside the lua folder.
My test also pointed that that even 100 empty scripts cause a delay of about exactly the same amount of msec.
-
- Posts: 28
- Joined: Sunday 19 June 2016 9:06
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Storage location LUA scripts
Thanks guys, especially for your patience.
I've read that section multiple time, but probably to much focussed on the coding itself!
I will stick to the internal Ace editor, till now it served me well.
I've read that section multiple time, but probably to much focussed on the coding itself!
I will stick to the internal Ace editor, till now it served me well.
Who is online
Users browsing this forum: No registered users and 1 guest