Egregius, oddly enough the script does function, just with a delay. It's saved under "All".
Thanks for pointing out where to find script types for the script manager.
Script editor Topic is solved
Moderators: leecollings, remb0
-
- Posts: 543
- Joined: Saturday 02 July 2016 5:17
- Target OS: Linux
- Domoticz version: Beta
- Contact:
Re: Script editor
Unless otherwise stated, all my code is released under GPL 3 license: https://www.gnu.org/licenses/gpl-3.0.en.html
- Egregius
- Posts: 2582
- Joined: Thursday 09 April 2015 12:19
- Target OS: Linux
- Domoticz version: v2024.7
- Location: Beitem, BE
- Contact:
Re: Script editor
Well yes, it will function. But the light will go out when a new motion event is triggered after 900 seconds (didn't really look where the difference is calculated from). I would think you should check on if motion = off.
-
- Posts: 543
- Joined: Saturday 02 July 2016 5:17
- Target OS: Linux
- Domoticz version: Beta
- Contact:
Re: Script editor
My setup is so that at each last motion sensor "echo", it checks if theres been no motion in other areas of the house for 900 seconds and if not it turns off those lights.
So lets say I walk from the bathroom to the living room, while in the living room I trigger the motion sensor after 15 minutes, the setup goes "ok" bens no longer in the bathroom, turn off those lights.
This is done rather than simply saying if no motion in x room for x seconds turn off the light, since it can be hard to accurately tell if I am still in a room just based on motion so I use motion in another location to tell that I am definitely not in the particular room.
The time delay is there to avoid turning lights on and off unnecessarily if I walk between rooms frequently in a space of time (15 minutes in this case), it also works fairly well when multiple people are around.
So lets say I walk from the bathroom to the living room, while in the living room I trigger the motion sensor after 15 minutes, the setup goes "ok" bens no longer in the bathroom, turn off those lights.
This is done rather than simply saying if no motion in x room for x seconds turn off the light, since it can be hard to accurately tell if I am still in a room just based on motion so I use motion in another location to tell that I am definitely not in the particular room.
The time delay is there to avoid turning lights on and off unnecessarily if I walk between rooms frequently in a space of time (15 minutes in this case), it also works fairly well when multiple people are around.
Last edited by ben53252642 on Thursday 22 December 2016 14:54, edited 1 time in total.
Unless otherwise stated, all my code is released under GPL 3 license: https://www.gnu.org/licenses/gpl-3.0.en.html
- Egregius
- Posts: 2582
- Joined: Thursday 09 April 2015 12:19
- Target OS: Linux
- Domoticz version: v2024.7
- Location: Beitem, BE
- Contact:
Re: Script editor
Oh, that way, nice
Lights don't turn of automatically in 'living' rooms. I only use auto light off in hallway, garage and kitchen (if no other light is lit).
But if you live alone sounds like a nice solution.
Lights don't turn of automatically in 'living' rooms. I only use auto light off in hallway, garage and kitchen (if no other light is lit).
But if you live alone sounds like a nice solution.
-
- Posts: 543
- Joined: Saturday 02 July 2016 5:17
- Target OS: Linux
- Domoticz version: Beta
- Contact:
Re: Script editor
Solved the delay issue, turns out I had the Z-Stick set to poll every 1 second and there was just way too much traffic on the Z-Wave network.
The script doesn't appear to cause any noticeable delay.
The script doesn't appear to cause any noticeable delay.
Unless otherwise stated, all my code is released under GPL 3 license: https://www.gnu.org/licenses/gpl-3.0.en.html
-
- Posts: 20
- Joined: Wednesday 08 October 2014 21:52
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Script editor
Stumbled on this thread looking for a way to edit existing dzVents scripts on the file system through a browser. I've testing creating a new script in the browser and watching it execute in the log, which is great...but, is there any best practice on moving all my existing scripts so that I can manage them through the web browser?
Is it as simple as moving them all on the file system to the generated_scripts folder? Or do I need to recreate them one-by-one so that they are (also) stored in the DB?
Is it as simple as moving them all on the file system to the generated_scripts folder? Or do I need to recreate them one-by-one so that they are (also) stored in the DB?
- McMelloW
- Posts: 427
- Joined: Monday 20 November 2017 17:01
- Target OS: Raspberry Pi / ODroid
- Domoticz version: V2024.1
- Location: Harderwijk, NL
- Contact:
Re: Script editor
Hi to all
Where can I find how to use the editor and is there a list of short key strokes like find and replace etc?
Where can I find how to use the editor and is there a list of short key strokes like find and replace etc?
Greetings McMelloW
- waltervl
- Posts: 5148
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Script editor
There is a base instruction here: https://www.domoticz.com/wiki/Events but no list of short key strokes like find and replace etc. If somebody can point me in the right direction I will add them.
Edit: Going through this topic there was this link listed: https://github.com/ajaxorg/ace/wiki/Def ... -Shortcuts
Edit: and added to the Domoticz Wiki: https://www.domoticz.com/wiki/Events#Te ... _Shortcuts
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
- McMelloW
- Posts: 427
- Joined: Monday 20 November 2017 17:01
- Target OS: Raspberry Pi / ODroid
- Domoticz version: V2024.1
- Location: Harderwijk, NL
- Contact:
Re: Script editor
Thanks very much. This is most helpful.waltervl wrote: ↑Friday 25 February 2022 16:44There is a base instruction here: https://www.domoticz.com/wiki/Events but no list of short key strokes like find and replace etc. If somebody can point me in the right direction I will add them.
Edit: Going through this topic there was this link listed: https://github.com/ajaxorg/ace/wiki/Def ... -Shortcuts
Edit: and added to the Domoticz Wiki: https://www.domoticz.com/wiki/Events#Te ... _Shortcuts
Greetings McMelloW
Who is online
Users browsing this forum: No registered users and 1 guest