Gad_Ofir
(Gad Ofir)
March 9, 2018, 11:27pm
1
Hi i am runing OH on windows machine, can i use Exec to run VBS script on the pc that is runing OH?
also if anyone has any idea how to contorl VLC that is runing on that PC?
so lets say if want a full autuamted PC for movie or gaming needs
thanks allot!
rlkoshak
(Rich Koshak)
March 10, 2018, 7:11pm
2
If you can run it from the cmd prompt you can run it using exec. You may need to use full paths to things though.
Gad_Ofir
(Gad Ofir)
March 11, 2018, 9:04pm
3
i have tried to follow the guide but i dont get it,maybe becuse i am windows user
i missing the thing i need to do in things file, if can please help me with syntex
i just want to be able to run simple script
lets say its on C:home.vbs
home.things
???
home.items
Switch YourTrigger
home.sitemap
Switch item=YourTrigger
by the way i was just on colordo springs!!! more in Lone tree
rlkoshak
(Rich Koshak)
March 11, 2018, 11:50pm
4
The full syntax with examples are in the README.
https://docs.openhab.org/v2.1/addons/bindings/exec/readme.html
I love this part of the country. I hope to never have to move away.
Gad_Ofir
(Gad Ofir)
March 12, 2018, 8:19pm
5
already been throgh all the guides
still not able to make it run
and nothing in the logs
Items:
Switch YourTrigger { channel=“exec:command:myscript:run”}
things
Thing exec:command:myscript [command=“vbs ./conf/scripts/XGame.vbs %2$s”, interval=0, autorun=false ]
if you can please tell me what i am missing here
rlkoshak
(Rich Koshak)
March 13, 2018, 2:49am
6
I really don’t use this binding and have never used it on windows.
What is in the logs when you trigger the item?
Gad_Ofir
(Gad Ofir)
March 13, 2018, 6:10am
7
no error just the value changing from 1 to 0
rlkoshak
(Rich Koshak)
March 13, 2018, 2:16pm
8
Which logs are you looking at? You should be seeing lines in openhab.log that shows what the script is returning.
My last advice is to try How to solve Exec binding problems
Gad_Ofir
(Gad Ofir)
March 14, 2018, 12:30am
9
Hi its working!
i will try to put here my wisdom
install Exec
things file
Thing exec:command:myscript [command=“amd”, interval=0, autorun=false ]
Items
number YourTrigger { channel=“exec:command:myscript:run”}
the file is a VBS script compiled to EXE with a freeware
put the file in C folder
configre env varibles , so AMD file will run as native app
https://superuser.com/questions/756969/how-to-add-new-application-to-run-from-command-prompt
reboot all , windows and open hab for sure
working for me if anyone needs help
Trouble shooting:
if you are able to run calc with no issue you are on step 4
Thing exec:command:myscript [command=“Calc”, interval=0, autorun=false ]
if you are not able to run Calc i cannot help you for me exec worked OOB, only had issue with syntex and type of file i am runing
hopes this will help someone