Page 1 of 1
Script on DOMOTICZ for WINDOWS
Posted: Wednesday 24 June 2015 15:33
by forumfab
Sorry to re-open this discussion
Is there someone that can explain how, what are the limitation, and so on to use script .bat on DOMOTICZ under windows
It's seems that the syntax is "script//DOMOTICZ/scripts/yourscript.bat "
But in fact that does'nt works , i means that it seems that the famous "yourscript.bat", couldn't be place outside the limitation of the DOMOTICZ application itselve
The DOMOTICZ application is place in
c:\Programmes\Domoticz folder which seems to be the "root" for the domoticz application, that why the script are in c:\Programmes\Domoticz\scripts\ folder, and taht the syntax is script//DOMOTICZ/scripts/yourscript.bat "
So if "yourscript.bat, is for exemple
c:\copy file1.txt to file2.txt
This .bat willn't works
Is that correct, is that wrong,
Where must be the .bat, and want can and can't contain the .bat
The problem of the right and path don't appear to be very clear in fact
Thanks in advance
Re: Script on DOMOTICZ for WINDOWS
Posted: Wednesday 24 June 2015 21:56
by Domosapiens
Take a look at the Wiki:
Batch Scripts (MSWindows)
http://www.domoticz.com/wiki/Scripts#Ba ... Windows.29
script://Domoticz\scripts\soundplay.bat
and look out for
\
and not
/
Any place
on the same disk as Domoticz will work.
Hope this helps
Domosapiens
Re: Script on DOMOTICZ for WINDOWS
Posted: Wednesday 24 June 2015 23:01
by forumfab
Thanks Domosapiens for your answer and your help
That don't works
Here is my scripts for the on function
script://Domoticz\scripts\voix1.bat
The script voix1.bat works when i launch it inside the DOS console from the c:\Program Files\Domoticz\scripts\ folder
The script is simple
c:\rundevant.exe
The program "rundevant.exe" of course fully works
There must be something faulty with the script inside DOMOTICZ for windows
The script can't be more simple, the program more simple
Re: Script on DOMOTICZ for WINDOWS
Posted: Wednesday 24 June 2015 23:15
by forumfab
Does anyone know if domoticz on windows need spécial right to execute a script
Does domoticz for windows need some kind of right like if it was a special user for windows
Re: Script on DOMOTICZ for WINDOWS
Posted: Wednesday 24 June 2015 23:59
by Domosapiens
Strange ...
script://Domoticz\scripts\soundplay.bat
works on my Vista PC
????sapiens
Re: Script on DOMOTICZ for WINDOWS
Posted: Thursday 25 June 2015 10:20
by forumfab
Hi,
Same problem with all the windows os
I did try on 3 différents computer and OS, Windows XP, VISTA, WINDOWS 8
Impossible to run script .bat on DOMOTICZ
This problem seems to have never been solve
Regards
Re: Script on DOMOTICZ for WINDOWS
Posted: Thursday 25 June 2015 11:21
by mrf68
In my LUA scripts I run .cmd files:
if .....
then os.execute ("C:\\PS\\somescript.cmd")
I have to use double backslashes. It's on Windows 7 Enterprise. In the cmd file I run a powershell script that sends messages via Pushover. And this works for me.
Re: Script on DOMOTICZ for WINDOWS
Posted: Thursday 25 June 2015 13:11
by forumfab
Hi mrf68,
Idem with .cmd
Idem with or without double backslashes
Idem on 3 différents os, on 3 différents computers , XP, VISTA, WINDOW 8
the script .cmd is working is the dos console, but not inside the script
regards
Re: Script on DOMOTICZ for WINDOWS
Posted: Thursday 25 June 2015 18:38
by sijones
I take it your running domoticz as a service on windows?
Does your program you're trying to run have gui interface? If it does then you will need to go to the properties of the domoticz service and tick allow interaction with desktop otherwise the program can not display as it's running under the system user and won't have display permissions.
Re: Script on DOMOTICZ for WINDOWS
Posted: Thursday 25 June 2015 21:12
by forumfab
Hi sijones,
I did re-install Domoticz for windows on one pc under windows 8, with this option.
For the moment that don't change anything, but i'll will try more ahead tomorow with this option
Thanks for your help
Regards
Re: Script on DOMOTICZ for WINDOWS
Posted: Friday 26 June 2015 13:40
by forumfab
Hi sijones,
This doesn't works !
There must be a problem of initial pointing
It's seems that Domoticz for windows doesn't know wher is the basic position od the "scripts" folder
When we use "Domoticz\scripts\myscript.cmd
It's assume that this will correspond to
"c:\program files\Domoticz\scripts\myscript.cmd"
And it's seems to be wrong
It's crazy to use some kind of speudo LINUX referencies on Windows
Why not to let use the normal Windows referencies like
script://c:\program files\Domoticz\scripts\myscript.cmd
it's not normal that there is so much demand for this problem od scripting on domoticz for windows, without a clear information from the Domoitcz conceptors ....!
Re: Script on DOMOTICZ for WINDOWS
Posted: Monday 16 November 2015 0:56
by proncola
For windows scripts, I discovered that the scripts have to be under the following directory (given my install under c: drive):
"ProgramData\Domoticz"
and not
"Program Files\Domoticz"
Then, 'Action On' should contain something like:
script://yourPythonScript.py
I haven't tested Windows batch files.
Pascal
Re: Script on DOMOTICZ for WINDOWS
Posted: Sunday 22 November 2015 14:56
by forumfab
proncola wrote:For windows scripts, I discovered that the scripts have to be under the following directory (given my install under c: drive):
"ProgramData\Domoticz"
and not
"Program Files\Domoticz"
Then, 'Action On' should contain something like:
script://yourPythonScript.py
I haven't tested Windows batch files.
Pascal
Hi proncola,
Thank for this answer !
This doesn't works for me i am on an XP windows
Bests regards
Re: Script on DOMOTICZ for WINDOWS
Posted: Sunday 22 November 2015 15:30
by SweetPants
Try script:///<your script>